Let y = f(x) be the solution to the differential equation (dy/dx) = x + y with the initial condition f(1) = 2. What is the approximation for f(2) if Euler's method is used, starting at x = 1 with a step size of 0.5?
l'm not too keen on Euler's method, if anyone cares to enlighten me, or better yet... twist a red hot knife into my innards. Be my guest.
I dont think finding f(2) is possible....
edit: OH SHOOT I FORGOT SOMETHING
f'(x)=c2+c1*ex=x+c3+c2*x+c1*ex | subtract c1*ex ----->
c2=x+c3+c2*x. therefore, c2=-1(the only option. that means c3=c2=-1 and that means
f(1)=c1*e-2=2 therefore c1=4/e
that means f(2)=4*e-2-1=4e-3.
So f(2) = y(2) = 6
You are right not to be keen on Euler's method, especially with a step size this large - see the comparison below: