Home > Numerical methods calculators > Numerical differential equation using Euler, Runge-kutta (Rk2, Rk3, Rk4) methods calculator

 Solve any problem (step by step solutions) Input table (Matrix, Statistics)
Mode :
SolutionHelp
Solution will be displayed step by step (In 2 parts)
Solution
 Problem: Runge-Kutta method y'=-2x-y, y(0)=1, xn=0.5, h=0.1 [ Calculator, Method and examples ]Solution:Your problem -> Runge-Kutta method y'=-2x-y, y(0)=1, xn=0.5, h=0.1Given y'=-2x-y, y(0)=1, h=0.1, y(0.5)=?Second order R-K methodk_1=hf(x_0,y_0)=(0.1)f(0,1)=(0.1)*(-1)=-0.1k_2=hf(x_0+h/2,y_0+k_1/2)=(0.1)f(0.05,0.95)=(0.1)*(-1.05)=-0.105y_1=y_0+k_2=1-0.105=0.895:.y(0.1)=0.895Again taking (x_1,y_1) in place of (x_0,y_0) repeat the processk_1=hf(x_1,y_1)=(0.1)f(0.1,0.895)=(0.1)*(-1.095)=-0.1095k_2=hf(x_1+h/2,y_1+k_1/2)=(0.1)f(0.15,0.8402)=(0.1)*(-1.1402)=-0.114y_2=y_1+k_2=0.895-0.114=0.781:.y(0.2)=0.781Again taking (x_2,y_2) in place of (x_0,y_0) repeat the processk_1=hf(x_2,y_2)=(0.1)f(0.2,0.781)=(0.1)*(-1.181)=-0.1181k_2=hf(x_2+h/2,y_2+k_1/2)=(0.1)f(0.25,0.7219)=(0.1)*(-1.2219)=-0.1222y_3=y_2+k_2=0.781-0.1222=0.6588:.y(0.3)=0.6588Again taking (x_3,y_3) in place of (x_0,y_0) repeat the processk_1=hf(x_3,y_3)=(0.1)f(0.3,0.6588)=(0.1)*(-1.2588)=-0.1259k_2=hf(x_3+h/2,y_3+k_1/2)=(0.1)f(0.35,0.5958)=(0.1)*(-1.2958)=-0.1296y_4=y_3+k_2=0.6588-0.1296=0.5292:.y(0.4)=0.5292Again taking (x_4,y_4) in place of (x_0,y_0) repeat the processk_1=hf(x_4,y_4)=(0.1)f(0.4,0.5292)=(0.1)*(-1.3292)=-0.1329k_2=hf(x_4+h/2,y_4+k_1/2)=(0.1)f(0.45,0.4627)=(0.1)*(-1.3627)=-0.1363y_5=y_4+k_2=0.5292-0.1363=0.3929:.y(0.5)=0.3929:.y(0.5)=0.3929 (Answer)Third order R-K methodk_1=hf(x_0,y_0)=(0.1)f(0,1)=(0.1)*(-1)=-0.1k_2=hf(x_0+h/2,y_0+k_1/2)=(0.1)f(0.05,0.95)=(0.1)*(-1.05)=-0.105k_3=hf(x_0+h,y_0+2k_2-k_1)=(0.1)f(0.1,0.89)=(0.1)*(-1.09)=-0.109y_1=y_0+1/6(k_1+4k_2+k_3)y_1=1+1/6[-0.1+4(-0.105)+(-0.109)]y_1=0.8952:.y(0.1)=0.8952Again taking (x_1,y_1) in place of (x_0,y_0) repeat the processk_1=hf(x_1,y_1)=(0.1)f(0.1,0.8952)=(0.1)*(-1.0952)=-0.1095k_2=hf(x_1+h/2,y_1+k_1/2)=(0.1)f(0.15,0.8404)=(0.1)*(-1.1404)=-0.114k_3=hf(x_1+h,y_1+2k_2-k_1)=(0.1)f(0.2,0.7766)=(0.1)*(-1.1766)=-0.1177y_2=y_1+1/6(k_1+4k_2+k_3)y_2=0.8952+1/6[-0.1095+4(-0.114)+(-0.1177)]y_2=0.7813:.y(0.2)=0.7813Again taking (x_2,y_2) in place of (x_0,y_0) repeat the processk_1=hf(x_2,y_2)=(0.1)f(0.2,0.7813)=(0.1)*(-1.1813)=-0.1181k_2=hf(x_2+h/2,y_2+k_1/2)=(0.1)f(0.25,0.7222)=(0.1)*(-1.2222)=-0.1222k_3=hf(x_2+h,y_2+2k_2-k_1)=(0.1)f(0.3,0.655)=(0.1)*(-1.255)=-0.1255y_3=y_2+1/6(k_1+4k_2+k_3)y_3=0.7813+1/6[-0.1181+4(-0.1222)+(-0.1255)]y_3=0.6592:.y(0.3)=0.6592Again taking (x_3,y_3) in place of (x_0,y_0) repeat the processk_1=hf(x_3,y_3)=(0.1)f(0.3,0.6592)=(0.1)*(-1.2592)=-0.1259k_2=hf(x_3+h/2,y_3+k_1/2)=(0.1)f(0.35,0.5962)=(0.1)*(-1.2962)=-0.1296k_3=hf(x_3+h,y_3+2k_2-k_1)=(0.1)f(0.4,0.5259)=(0.1)*(-1.3259)=-0.1326y_4=y_3+1/6(k_1+4k_2+k_3)y_4=0.6592+1/6[-0.1259+4(-0.1296)+(-0.1326)]

Solution provided by AtoZmath.com
Any wrong solution, solution improvement, feedback then Submit Here
Want to know about AtoZmath.com and me