Example Solve the following initial value problem.

$\displaystyle (\sin{x})y^{\prime} + (\cos{x})y = 0, y(\frac{\pi}{2}) = 1$

Answer Put the function of $y$ to the left and the function of $x$ to the right hand side.

$\displaystyle \frac{y^{\prime}}{y} = - \frac{\cos{x}}{\sin{x}} $

Integrate both sides to have

$\displaystyle \int \frac{dy}{y} = - \int \frac{\cos{x}}{\sin{x}}dx $

and

$\displaystyle \log{\vert y\vert} = - \log{\vert\sin{x}\vert} + c $

Now take the exponential function.

$\displaystyle \vert y\vert = e^{- \log{\vert\sin{x}\vert} + c} = e^{- \log{\vert\sin{x}\vert}} \cdot e^{c} $

$c$ is a constant. Then $e^{c}$ is also a constant. Thus we use $C$ to represent $e^{c}$.

$\displaystyle \vert y\vert = C \frac{1}{\vert\sin{x}\vert} $

Now if we take the absolute value symbol out, $y = \pm C \frac{1}{\vert\sin{x}\vert}$. But $\pm C$ is also a constant. So, we use $C$ again.

$\displaystyle y = C \frac{1}{\vert\sin{x}\vert} $

Finally, we take the absolute value symbol out of the equation above. Then $y = \pm C \sin{x}$. But again $\pm C$ is a constant. So, we use $C$. Then

$\displaystyle y = \frac{C}{\sin{x}} $

We used the constant $C$ many ocation. It is called abuse of $C$. Finally, we apply initial condition $y(\frac{\pi}{2}) = 1$ to obtain

$\displaystyle 1 = \frac{C}{1} \Longrightarrow C = 1 \Longrightarrow y = \frac{1}{\sin{x}}$