3.3.4.9 Example 9
\begin{align*} \cos \left ( y\right ) y^{\prime } & =1\\ y\left ( 0\right ) & =2 \end{align*}

Since this is of form \(y^{\prime }=f\left ( y\right ) =\frac {1}{\cos y}\) and IC is given then we check if \(y=2\) satisfies the ode itself or not. \(0=\frac {1}{\cos \left ( 2\right ) }\) does not. Hence we need solve the ode. Integrating gives

\begin{align} \int \cos ydy & =\int dx\nonumber \\ \sin y & =x+c \tag {1}\end{align}

Here we can solve for \(y\) or keep it implicit until finding \(c\). Let see what happens if we try to first solve for \(y\).

\[ y=\arcsin \left ( x+c\right ) \]

Applying IC gives

\[ 2=\arcsin \left ( c\right ) \]

No solution for \(c\). Lets now go back to (1) and solve for \(c\) first from (1) before solving for \(y\). We obtain

\[ \sin \left ( 2\right ) =c \]

This was much easier. Substituting this into (1) gives

\begin{equation} \sin y=x+\sin \left ( 2\right ) \tag {2}\end{equation}

Now we can solve for \(y\) using \(\sin \left ( y\right ) =A\Longrightarrow \) \(y=-\arcsin \left ( A\right ) +2\pi n+\pi \). Using this gives

\[ y=-\arcsin \left ( x+\sin \left ( 2\right ) \right ) +2n\pi +\pi \]

For \(n\) integer. Trying \(n=0\) gives

\[ y=-\arcsin \left ( x+\sin \left ( 2\right ) \right ) +\pi \]

Which satisfies the ode and the IC. It is also possible to keep the solution implicit as in (2) in this case also as (2) satisfies both the ode and IC as is and there is no need to explicitly solve for \(y\).