Question #74129 - Math - Quantitative Methods
using the classical R-K method of O(h4) calculate approximate solution of the IVP y′=1−x+4y , y(0)=1 at x=0.6 , taking h=0.1 and 0.2. use extrapolation technique to improve the accuracy.
Solution: initial value problem
y′=f(x,y)=1−x+4y,y(x0)=y0=1,x0=0.6
In general a Runge-Kutta method of order 4 can be written as:
yn+1=yn+6h(k1+2k2+2k3+k4)
where
k1=f(xn,yn)=1−xn+4ynk2=f(xn+2h,yn+2hk1)=1−xn−2h+4(yn+2h(1−xn+4yn))=1+23h−xn(1+2h)+4yn(1+2h)=1+23h+(1+2h)(4yn−xn)k3=f(xn+2h,yn+2hk2)=1−xn−2h+4(yn+2h(1+23h+(1+2h)(4yn−xn)))=1+23h+3h2+(4yn−xn)(1+2h+4h2)k4=f(xn+h,yn+hk3)=1−xn−h+4(yn+h(1+23h+3h2+(4yn−xn)(1+2h+4h2)))=1+3h+6h2+12h3+(4yn−xn)(1+4h+8h2+16h3)k1+2k2+2k3+k4=1+2(1+23h)+2(1+23h+3h2)+1+3h+6h2+12h3+(4yn−xn)(1+2(1+2h)+2(1+2h+4h2)+(1+4h+8h2+16h3))=6+9h+12h2+12h3+(4yn−xn)(6+12h+16h2+16h3)=(4yn−xn+1)(6+9h+12h2+12h3)+(4yn−xn)(3h+4h2+4h3)
Let
g(h,xn,yn)=h(k1+2k2+2k3+k4)
For step h1=0.1
g(0.1,xn,yn)=0.7032−0.7376xn+2.9504ynyn+1(0.1)=yn(0.1)+g(0.1,xn,yn)/6
For step h2=0.2
g(0.2,xn,yn)=1.6752−1.8336xn+7.3344ynyn+1(0.2)=yn(0.2)+g(0.2,xn,yn)/6
To calculate the error of the solution, we use the analytic solution of IVP (y(x)-exact value):
y(x)=164x−3+19∗e4xerrn+1(0.1)=y(xn+1)−yn+1(0.1)errn+1(0.2)=y(xn+1)−yn+1(0.2)errn+1=y(xn+1)−yn+1
Where yn+1 approximate solution of the IVP with use extrapolation technique on the step n+1 . Richardson extrapolation technique (h1=h2/2):
yn+1=yn+1(0.1)+24−1yn+1(0.1)−y(n+1)∗2(0.2)
Answer provided by https://www.AssignmentExpert.com
Comments