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.

HighSchoolCalculus Apr 17, 2017

#2**+1 **

I dont think finding f(2) is possible....

f'(x)=x+f(x)--------->

f'''(x)=(x)''+f''(x)=f''(x)----->

f''(x)=c_{1}*e^{x}------->

f(x)=c_{1}*e^{x}+c_{2}*x+c_{3}

f(1)=c_{1}*e+c_{2}+c_{3}=2-------------->

c_{3}=2-c_{2}-c_{1}*e

f(2)=c_{1}*e^{2}+c_{2}*2+c_{3}=

c_{1}*e^{2}+c_{2}+2-c_{1}*e

edit: OH SHOOT I FORGOT SOMETHING

f'(x)=c_{2}+c_{1}*e^{x}=x+c_{3}+c_{2}*x+c_{1}*e^{x} | subtract c_{1}*e^{x} ----->

c_{2}=x+c_{3}+c_{2}*x. therefore, c_{2}=-1(the only option. that means c_{3}=c_{2}=-1 and that means

f(1)=c_{1}*e-2=2 therefore c_{1}=4/e

that means f(2)=4*e-2-1=4e-3.

Ehrlich Apr 17, 2017

#9**+1 **

You are right not to be keen on Euler's method, especially with a step size this large - see the comparison below:

.

Alan Apr 18, 2017

#12**0 **

Hm l think l've developed a method of doing a shortened Eulers method, I got the same answer afterwards. It may help!

y_{n} - (dy/dx) * (step size) = y_{n+1}

HighSchoolCalculus Apr 18, 2017