Question #27830

Solve the system of differentil equations dy/dx=xz+1,dz/dx=_xy for x=0.3 using 4th order R-K method with y(0)=0,z(0)=1

Expert's answer

{dydx=xz+1dzdx=xy,\left\{ \begin{array}{l} \frac {d y}{d x} = x z + 1 \\ \frac {d z}{d x} = - x y \end{array} \right.,y(0)=0,z(0)=1,x=0.3y (0) = 0, z (0) = 1, x = 0. 3

Solution

Solve this system with a step h=0.3h = 0.3, φ(x,y,z)=xz+1,ψ(x,y,z)=xy\varphi(x, y, z) = xz + 1, \psi(x, y, z) = -xy, x0=0x_0 = 0, y0=0y_0 = 0, z0=1z_0 = 1

y0.3=y0+0.3=y0+h6(k1+2k2+2k3+k4),y _ {0. 3} = y _ {0 + 0. 3} = y _ {0} + \frac {h}{6} \left(k _ {1} + 2 k _ {2} + 2 k _ {3} + k _ {4}\right),z0.3=z0+0.3=z0+h6(l1+2l2+2l3+l4)z _ {0. 3} = z _ {0 + 0. 3} = z _ {0} + \frac {h}{6} \left(l _ {1} + 2 l _ {2} + 2 l _ {3} + l _ {4}\right)k1=φ(x0,y0,z0)=01+1=1k _ {1} = \varphi \left(x _ {0}, y _ {0}, z _ {0}\right) = 0 \cdot 1 + 1 = 1l1=ψ(x0,y0,z0)=0l _ {1} = \psi \left(x _ {0}, y _ {0}, z _ {0}\right) = 0k2=φ(x0+h/2,y0+hk1/2,z0+hl1/2)=1.15k _ {2} = \varphi \left(x _ {0} + h / _ {2}, y _ {0} + h k _ {1} / _ {2}, z _ {0} + h l _ {1} / _ {2}\right) = 1. 1 5l2=ψ(x0+h/2,y0+hk1/2,z0+hl1/2)=0.0225l _ {2} = \psi \left(x _ {0} + h / _ {2}, y _ {0} + h k _ {1} / _ {2}, z _ {0} + h l _ {1} / _ {2}\right) = - 0. 0 2 2 5k3=φ(x0+h/2,y0+hk2/2,z0+hl2/2)=1.14949375k _ {3} = \varphi \left(x _ {0} + h / _ {2}, y _ {0} + h k _ {2} / _ {2}, z _ {0} + h l _ {2} / _ {2}\right) = 1. 1 4 9 4 9 3 7 5l3=ψ(x0+h/2,y0+hk2/2,z0+hl2/2)=0.025875l _ {3} = \psi \left(x _ {0} + h / _ {2}, y _ {0} + h k _ {2} / _ {2}, z _ {0} + h l _ {2} / _ {2}\right) = - 0. 0 2 5 8 7 5k4=φ(x0+h,y0+hk3,z0+hl3)=1.29767125k _ {4} = \varphi \left(x _ {0} + h, y _ {0} + h k _ {3}, z _ {0} + h l _ {3}\right) = 1. 2 9 7 6 7 1 2 5l4=ψ(x0+h,y0+hk3,z0+hl3)=0.1034544375l _ {4} = \psi \left(x _ {0} + h, y _ {0} + h k _ {3}, z _ {0} + h l _ {3}\right) = - 0. 1 0 3 4 5 4 4 3 7 5y0.3=0+0.36(1+21.15+21.14949375+1.29767125)=0.3448329375y _ {0. 3} = 0 + \frac {0 . 3}{6} (1 + 2 \cdot 1. 1 5 + 2 \cdot 1. 1 4 9 4 9 3 7 5 + 1. 2 9 7 6 7 1 2 5) = 0. 3 4 4 8 3 2 9 3 7 5z0.3=1+0.36(0+2(0.0225)+2(0.025875)0.1034544375)=0.989989778125z _ {0. 3} = 1 + \frac {0 . 3}{6} (0 + 2 \cdot (- 0. 0 2 2 5) + 2 \cdot (- 0. 0 2 5 8 7 5) - 0. 1 0 3 4 5 4 4 3 7 5) = 0. 9 8 9 9 8 9 7 7 8 1 2 5

General solution:

From the second equation: y=1xdzdxy = -\frac{1}{x}\frac{dz}{dx}, let differentiate it changing dydx=xz+1\frac{dy}{dx} = xz + 1:


xz+1=1x2dzdx1xd2zdx2,x z + 1 = \frac {1}{x ^ {2}} \frac {d z}{d x} - \frac {1}{x} \frac {d ^ {2} z}{d x ^ {2}},1xd2zdx21x2dzdx+xz+1=0\frac {1}{x} \frac {d ^ {2} z}{d x ^ {2}} - \frac {1}{x ^ {2}} \frac {d z}{d x} + x z + 1 = 0


Let t=x22t = \frac{x^2}{2}, so x=2tx = \sqrt{2t}:


d2zdx22t+2tzdzdx2t+1=0,\frac {\frac {d ^ {2} z}{d x ^ {2}}}{\sqrt {2 t}} + \sqrt {2 t} z - \frac {\frac {d z}{d x}}{2 t} + 1 = 0,


By the chain rule dzdx=dtdxdzdt\frac{dz}{dx} = \frac{dt}{dx}\frac{dz}{dt} and d2zdx2=(dtdx)2d2zdt2+d2tdx2dzdt\frac{d^2z}{dx^2} = (\frac{dt}{dx})^2\frac{d^2z}{dt^2} +\frac{d^2t}{dx^2}\frac{dz}{dt}.

Therefore dzdx=2tdzdt\frac{dz}{dx} = \sqrt{2t}\frac{dz}{dt} and d2zdx2=2td2zdt2+dzdt\frac{d^2z}{dx^2} = 2t\frac{d^2z}{dt^2} +\frac{dz}{dt}.

Substitute these values into the differential equation:


2td2zdt2+dzdt2t+2tzdzdt2t+1=0.\frac {2 t \frac {d ^ {2} z}{d t ^ {2}} + \frac {d z}{d t}}{\sqrt {2 t}} + \sqrt {2 t} z - \frac {\frac {d z}{d t}}{\sqrt {2 t}} + 1 = 0.


Simplify and divide both sides by 2t\sqrt{2t} :


d2zdt2+z+12t=0.\frac {d ^ {2} z}{d t ^ {2}} + z + \frac {1}{\sqrt {2 t}} = 0.


The general solution is a sum of the complementary and particular solutions.

Find complementary solution from: d2zdt2+z=0\frac{d^2z}{dt^2} + z = 0 . Assume a solution will be proportional to eλte^{\lambda t} for some constant λ\lambda :


d2dt2(eλt)+eλt=0.\frac {d ^ {2}}{d t ^ {2}} \left(e ^ {\lambda t}\right) + e ^ {\lambda t} = 0.


Substitute d2dt2(eλt)=λ2eλt,\frac{d^2}{dt^2}\left(e^{\lambda t}\right) = \lambda^2 e^{\lambda t}, so λ2eλt+eλt=0,\lambda^2 e^{\lambda t} + e^{\lambda t} = 0,

eλt(λ2+1)=0e^{\lambda t}(\lambda^2 + 1) = 0 , such as eλt0e^{\lambda t} \neq 0 then λ2+1=0\lambda^2 + 1 = 0 . Solve it: λ=±i\lambda = \pm i .

So zc=c1cos(t)+c2sin(t)z_{c} = c_{1}\cos (t) + c_{2}\sin (t) .

Determine the particular solution to d2zdt2+z=12t\frac{d^2z}{dt^2} + z = -\frac{1}{\sqrt{2t}} by variation of parameters.

List the basis solutions in zcz_{c} : zb1=cos(t)z_{b1} = \cos (t) and zb2=sin(t)z_{b2} = \sin (t) .

Compute the Wronskian of zb1z_{b1} and zb2z_{b2} :


W(t)=cos(t)sin(t)dcos(t)dtdsin(t)dt=cos(t)sin(t)sin(t)cos(t)=1.W (t) = \left| \begin{array}{c c} \cos (t) & \sin (t) \\ \frac {d \cos (t)}{d t} & \frac {d \sin (t)}{d t} \end{array} \right| = \left| \begin{array}{c c} \cos (t) & \sin (t) \\ - \sin (t) & \cos (t) \end{array} \right| = 1.


Let f(t)=12tf(t) = -\frac{1}{\sqrt{2t}}

let ν1(t)=f(t)zb2W(t)dt\nu_{1}(t) = -\int \frac{f(t)z_{b2}}{W(t)} dt and ν2(t)=f(t)zb1W(t)dt.\nu_{2}(t) = -\int \frac{f(t)z_{b1}}{W(t)} dt.

The particular solution will be given by:


zp=ν1(t)zb1+ν2(t)zb2.z _ {p} = \nu_ {1} (t) z _ {b 1} + \nu_ {2} (t) z _ {b 2}.ν1(t)=sin(t)2tdt=πS(2tπ),ν2(t)=cos(t)2tdt=πC(2tπ).\nu_ {1} (t) = - \int \frac {- \sin (t)}{\sqrt {2 t}} d t = \sqrt {\pi} S (\sqrt {\frac {2 t}{\pi}}), \nu_ {2} (t) = \int \frac {- \cos (t)}{\sqrt {2 t}} d t = - \sqrt {\pi} C (\sqrt {\frac {2 t}{\pi}}).


So zp=πS(2tπ)cos(t)πC(2tπ)sin(t)=π(S(2tπ)cos(t)C(2tπ)sin(t)).z_{p} = \sqrt{\pi} S\left(\sqrt{\frac{2t}{\pi}}\right)\cos (t) - \sqrt{\pi} C\left(\sqrt{\frac{2t}{\pi}}\right)\sin (t) = \sqrt{\pi}\left(S\left(\sqrt{\frac{2t}{\pi}}\right)\cos (t) - C\left(\sqrt{\frac{2t}{\pi}}\right)\sin (t)\right).

The general solution:


z=zc+zp=c1cos(t)+c2sin(t)+π(S(2tπ)cos(t)C(2tπ)sin(t)).z = z _ {c} + z _ {p} = c _ {1} \cos (t) + c _ {2} \sin (t) + \sqrt {\pi} \big (S \left(\sqrt {\frac {2 t}{\pi}}\right) \cos (t) - C \left(\sqrt {\frac {2 t}{\pi}}\right) \sin (t) \big).


Substitute back for t=x22t = \frac{x^2}{2} :


z=c1cos(x22)+c2sin(x22)+π(S(xπ)cos(x22)C(xπ)sin(x22)).z = c _ {1} \cos \left(\frac {x ^ {2}}{2}\right) + c _ {2} \sin \left(\frac {x ^ {2}}{2}\right) + \sqrt {\pi} \left(S \left(\frac {x}{\sqrt {\pi}}\right) \cos \left(\frac {x ^ {2}}{2}\right) - C \left(\frac {x}{\sqrt {\pi}}\right) \sin \left(\frac {x ^ {2}}{2}\right)\right).dzdx=\frac {d z}{d x} =c1×sin(x22)+c2×cos(x22)sin(x22)C(xπ)π×cos(x22)C(xπ)++cos(x22)S(xπ)π×sin(x22)S(xπ).- c _ {1} \times \sin \left(\frac {x ^ {2}}{2}\right) + c _ {2} \times \cos \left(\frac {x ^ {2}}{2}\right) - \sin \left(\frac {x ^ {2}}{2}\right) C ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) - \sqrt {\pi} \times \cos \left(\frac {x ^ {2}}{2}\right) C \left(\frac {x}{\sqrt {\pi}}\right) + + \cos \left(\frac {x ^ {2}}{2}\right) S ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) - \sqrt {\pi} \times \sin \left(\frac {x ^ {2}}{2}\right) S \left(\frac {x}{\sqrt {\pi}}\right).So y=1xdzdx=c1sin(x22)c2cos(x22)+1xsin(x22)C(xπ)+πcos(x22)C(xπ)1xcos(x22)S(xπ)+πsin(x22)S(xπ).\text{So } y = - \frac {1}{x} \frac {d z}{d x} = c _ {1} \sin \left(\frac {x ^ {2}}{2}\right) - c _ {2} \cos \left(\frac {x ^ {2}}{2}\right) + \frac {1}{x} \sin \left(\frac {x ^ {2}}{2}\right) C ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) + \sqrt {\pi} \cos \left(\frac {x ^ {2}}{2}\right) C \left(\frac {x}{\sqrt {\pi}}\right) - \frac {1}{x} \cos \left(\frac {x ^ {2}}{2}\right) S ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) + \sqrt {\pi} \sin \left(\frac {x ^ {2}}{2}\right) S \left(\frac {x}{\sqrt {\pi}}\right).


**Answer**


y0.3=0.3448329375,z0.3=0.989989778125.y _ {0. 3} = 0. 3 4 4 8 3 2 9 3 7 5, z _ {0. 3} = 0. 9 8 9 9 8 9 7 7 8 1 2 5.z=c1cos(x22)+c2sin(x22)+π(S(xπ)cos(x22)C(xπ)sin(x22)).z = c _ {1} \cos \left(\frac {x ^ {2}}{2}\right) + c _ {2} \sin \left(\frac {x ^ {2}}{2}\right) + \sqrt {\pi} \left(S \left(\frac {x}{\sqrt {\pi}}\right) \cos \left(\frac {x ^ {2}}{2}\right) - C \left(\frac {x}{\sqrt {\pi}}\right) \sin \left(\frac {x ^ {2}}{2}\right)\right).y=y =c1sin(x22)c2cos(x22)+1xsin(x22)C(xπ)+πcos(x22)C(xπ)1xcos(x22)S(xπ)+πsin(x22)S(xπ).c _ {1} \sin \left(\frac {x ^ {2}}{2}\right) - c _ {2} \cos \left(\frac {x ^ {2}}{2}\right) + \frac {1}{x} \sin \left(\frac {x ^ {2}}{2}\right) C ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) + \sqrt {\pi} \cos \left(\frac {x ^ {2}}{2}\right) C \left(\frac {x}{\sqrt {\pi}}\right) - \frac {1}{x} \cos \left(\frac {x ^ {2}}{2}\right) S ^ {\prime} \left(\frac {x}{\sqrt {\pi}}\right) + \sqrt {\pi} \sin \left(\frac {x ^ {2}}{2}\right) S \left(\frac {x}{\sqrt {\pi}}\right).

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS