|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#9
|
||||
|
||||
|
Re: numerical solution of differential equations
Not sure. Must have been really tired
. I did that over, and also added an error column to show the difference between Xa and the predicted X (Xm or Xe).I set dt = 0.01 s and compared the errors at t = 1, 2, 4 s For 1s: Midpt error: 0.598 Euler error: 0.585 For 2s: Midpt error: 2.834 Euler error: 2.748 For 4s: Midpt error: 50.070 Euler error: 48.113 Seems that, at least for this function, the Euler method holds up better. Tomorrow, I'll try it with a function where the second derivative isn't always positive on the interval I'm testing. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|