solve initial value problem ivp

$\begingroup$

I have equations\begin{align} 7z'(x) &= x^2 + y(x)^2 + z(x)^2 \\ y''(x) &= -(y'(x) + 7y(x))\sin(z(x)) \end{align}where $$(y(0),y'(0),z(0))=(1.5,-2.6,0.5)$$

The task is to solve this problem using a computer. Can someone help with explaining what goes in $u'(x)$? Thanks.

I am guessing $u(x) = (y'',z')$.

$\endgroup$

2 Answers

$\begingroup$

Set $y'(x) = u(x)$. Therefore $y''(x) = u'(x).$

Accordingly, the equation:

$$y''(x) = -(y'(x) + 7y(x))\sin(z(x)),$$

is transformed to:

$$u'(x) = -(u(x) + 7y(x))\sin(z(x)).$$

Finally, you get a set of first-order ODE:

$$\begin{cases} y'(x) & = u(x) \\ u'(x) & = -(u(x) + 7y(x))\sin(z(x))\\ z'(x) & = \displaystyle\frac{1}{7}\left(x^2 + y(x)^2 + z(x)^2\right) \end{cases}.$$

Initial condition is just $(y(0),u(0),z(0))=(1.5,-2.6,0.5).$

$\endgroup$ $\begingroup$

For the example of the book:$$y''=y'\cos x +2y$$

Substitute $u_1=y , u_2=y'$$$\implies u'_1=y'=u_2 $$And,$$ u'_2=y''=2u_1 + u_2\cos x$$With matrix notation we have:$$\pmatrix {u_1 \\ u_2 }'=\pmatrix {0 & 1 \\ 2 & \cos x}\pmatrix {u_1 \\ u_2 }$$$$\pmatrix {u_1 \\ u_2 }'=\pmatrix {u_2 \\ 2u_1 + u_2\cos x}$$Or if you prefer with $u=\pmatrix {u_1 \\ u_2 }$$$u'=\pmatrix {0 & 1 \\ 2 & \cos x}u$$

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like