Euler Integration
Hi
Im a bit stuck on the method for Euler Integration. I have the following first order differential equation: dx/dt = (xat) / (x / a+t) where constant a = 1.0V/s, and initial condition x = 1.0V at t=0s I have a time step of 0.02 and I need to calculate the output voltage at a time t = 0.2s So I have the Euler Integration formula: x(t + ^t) = x(t) + ^t.f(x,t) and I've started putting the values into an Excel spreadsheet, with columns as follows: t  x(t)  f(x,t)  ^x = ^t.f(x,t) I have values for all the first row for these columns but an example in a textbook has an additional column called x(exact) which appears to calculate an error value? I am not sure how to calculate this value, and am also unsure about how to move on with the iteration? What values should I move down for further rows? I have searched the web but can't find any sites I can make sense of  can anybody help me? I hope my question makes sense... Thanks Jimbo :) 
Re: Euler Integration
Hi Jimbo, and welcome to PF.
Quote:
x[ sup ]2[ /sup ] with no spaces in the brackets. The result will be: x^{2} Thanks, 
Thanks
Hi
Thanks for your reply Sorry about the unclear formula  the ^ were meant to be deltas to signify the small change in t x(t + delta(t)) = x(t) + delta(t).f(x,t) Hope that makes more sense now Jimbo :) 
Re: Thanks
Quote:
& Delta ; without the spaces gives you: Δ Oooohhhh! Pretty! [:D] Quote:
edit: typo 
Here is what I have on Euler's Method,
Given y' = f(x,y) y(a)= y_{0} For a solution over the interval [a,b] Choose a step h=(ba)/N. Set x_{n}= a + nh for n= 0,1,2...N y_{n+1} = y_{n}+ hf(x_{n},y_{n}) Error = h^{2}y''(ξ)/2 Where x_{n} < ξ < x_{n}+ h I am haveing trouble intrepeting your notation, perhaps you can apply my notation to your problem. Edit: Typo+ some content 
I just reread your initial post, you did say EXACT and not error term. The ONLY way to generate the exact solution is to solve the DE. This solution is what Eulers, or any other numerical method, is approximating.

My textbook has an "exact" column too. That's not part of the Euler's method computation. It's there just for purposes of the example, to show you the amount of the error in the Euler approximation.
As Integral said, that value was obtained by solving the DE (i.e. by integration), then evaluating the solution for various values of t so that the error could be determined for each iteration. 
Thanks
Hi
Thanks very much everyone for your help I have it sorted now. gnome was correct about the exact column not being part of the calculation. To move onto the next iteration I needed to add the value Δ(t).f(x,t) to x(t) to get a new value for x(t) Thanks again Jimbo :) 
All times are GMT 5. The time now is 03:11 PM. 
Powered by vBulletin Copyright ©2000  2014, Jelsoft Enterprises Ltd.
© 2014 Physics Forums