4.4.2.2 Example 2
This is same example as above but now with initial conditions to show how to handle
them.
\begin{align*} \left ( -y\sin y+\cos y\right ) y^{\prime \prime }-\left ( y^{\prime }\right ) ^{2}\left ( 2\sin y+y\cos y\right ) & =\sin x\\ y\left ( 1\right ) & =2\\ y^{\prime }\left ( 1\right ) & =0 \end{align*}
Where
\begin{align*} a_{2} & =-y\sin y+\cos y\\ a_{1} & =-\left ( 2\sin y+y\cos y\right ) y^{\prime }\\ a_{0} & =-\sin x \end{align*}
Since IC are given then we will use EQ (3). In the above \(x_{0}=1,y_{0}=2,y_{0}^{\prime }=0\). Hence
\begin{align} \int _{x_{0}}^{x}a_{0}\left ( \alpha ,y,y^{\prime }\right ) d\alpha +\int _{y_{0}}^{y}a_{1}\left ( x_{0},\beta ,y^{\prime }\right ) d\beta +\int _{y_{0}^{\prime }}^{y^{\prime }}a_{2}\left ( x_{0},y_{0},\gamma \right ) d\gamma & =0\tag {3}\\ \int _{1}^{x}-\sin \left ( \alpha \right ) d\alpha +\int _{2}^{y}a_{1}\left ( 1,\beta ,y^{\prime }\right ) d\beta +\int _{0}^{y^{\prime }}a_{2}\left ( 1,2,\gamma \right ) d\gamma & =0\nonumber \\ \int _{1}^{x}-\sin \left ( \alpha \right ) d\alpha -y^{\prime }\int _{2}^{y}\left ( 2\sin \beta +\beta \cos \beta \right ) d\beta +\int _{0}^{y^{\prime }}-\left ( 2\right ) \sin \left ( 2\right ) +\cos \left ( 2\right ) d\gamma & =0\nonumber \end{align}
Carrying the integration gives
\begin{align*} \left ( -\cos \left ( 1\right ) +\cos \left ( x\right ) \right ) -y^{\prime }\left ( -2\sin \left ( 2\right ) +\cos \left ( 2\right ) +y\sin \left ( y\right ) -\cos \left ( y\right ) \right ) +y^{\prime }\left ( -2\sin \left ( 2\right ) +\cos \left ( 2\right ) \right ) & =0\\ y^{\prime }\left ( -2\sin \left ( 2\right ) +\cos \left ( 2\right ) +2\sin \left ( 2\right ) -\cos \left ( 2\right ) -y\sin y+\cos y\right ) & =\cos \left ( 1\right ) -\cos x\\ y^{\prime }\left ( -y\sin y+\cos y\right ) & =\cos \left ( 1\right ) -\cos x \end{align*}
Solving the above and making sure to use \(y\left ( 1\right ) =2\) now as initial conditions for the above ode,
gives
\[ -x\cos \left ( 1\right ) +y\cos \left ( y\right ) -2\cos \left ( 2\right ) +\cos \left ( 1\right ) -\sin \left ( 1\right ) +\sin \left ( x\right ) =0 \]