Use (a) Euler’s method and (b) Improved Euler\'s Method to find approximate valu
ID: 2887939 • Letter: U
Question
Use (a) Euler’s method and (b) Improved Euler's Method to find approximate values of the solution of the given initial value problem at the points xi = x0 + ih, where x0 is the point where the initial condition is imposed and i = 1, 2, 3.
The answers I'm getting using Euler and then Improved Euler are not even remotely close so I must be doing something wrong with the pi and sin or something?
but for Euler use y1=y0+h[f(x0,y0)]
and for Improved Euler use: y1=y0 + h/2[ f(x0,y0)+ f(x1, y1)] where you would use the original euler formula to solve for y1 to find f(x1,y1) to plug in and find the actual y1 value.
Please show steps and explain! Thanks!
Explanation / Answer
C) Given, y’+x^2y=sin(xy)
So, we can write, y’=sin(xy)-x^2y
Now, let f(x, y)=sin(xy)-x^2y
By Euler’s method we have,
y_i+1=y_n+h*f(x_i, y_i)
and, x_i=x_0 + i*h
Given y(1)=, and h=0.2, so we get, x_0 =1
First iteration,
x_1=x_0 +1*h=1+1*0.2=1.2
y_1=y_0 +h*f(x_0, y_0)
= +0.2*f(1, )
=2.51327
Second Iteration: i=2,
x_2=x_0 +2*h=1+2*0.2=1.4
y_2=y_1+h*f(x_1, y_1)
= 2.51327 +0.2*f(1.2, 2.51327)
=1.81452
Third iteration: i=3
x_3=x_0 +3*h=1+3*0.2=1.6
y_3=y_2+h*f(x_2, y_2)
= 1.81452 +0.2*f(1.4, 1.81452)
=1.21637
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.