Posted 08 October 2016 - 04:08 AM
I have been studying differential equations (DEs), and have just recently investigated Euler's method for approximating solutions to DEs.
The DE of interest to this post is as follows: dy/dx = y
The solution to this DE is the standard exponential function e^x, so I thought, well when x=1, y would equal e, so I thought this would be a fun way to approximate e.
It's accurate to 4 decimal places, which isn't much, but it's an approximation after all. :P/>
Thanks for reading! :D/>
~Incin
The DE of interest to this post is as follows: dy/dx = y
The solution to this DE is the standard exponential function e^x, so I thought, well when x=1, y would equal e, so I thought this would be a fun way to approximate e.
It's accurate to 4 decimal places, which isn't much, but it's an approximation after all. :P/>
Here it is in all of it's 30 lines of glory (half of which is a comment xD)
pastebin get zZ8U119B e
Thanks for reading! :D/>
~Incin
Edited on 08 October 2016 - 02:09 AM