<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\ud}{\underline}
\newcommand{\lin}{\int_0^\infty}
\parindent=0pt
\begin{document}


{\bf Question}

Solve the initial value problems:

\begin{description}
\item[(a)]$y'+(\tan x)y=\sin 2x, \qquad y(0)=1$
\item[(b)]$x^2y'+2xy-x+1=0, \qquad y(1)=0$
\end{description}


\vspace{.5in}

{\bf Answer}

\begin{description}
\item[(a)] $\ds y' + \tan x \, y  = \sin 2x \hspace{.2in}(1)$

Integrating factor $\ds e^{\int \tan x \, dx} = e^{\ln (-\cos x)}
= \frac{1}{\cos x}$

so (1) becomes \begin{eqnarray*} \frac{y'}{\cos x} + \frac{\sin
x}{\cos^2x}y &amp; =  &amp; \frac{\sin 2x}{\cos x} \\ \Rightarrow
\frac{d}{dx} \left( \frac{y}{\cos x} \right) = 2 \sin x \\
\Rightarrow \frac{y}{\cos x} &amp; = &amp; \int 2 \sin  x \, dx \\ &amp; = &amp;
-2 \cos x + c \\ \Rightarrow y &amp; =  &amp; -2 \cos^3 x + c \cos x
\end{eqnarray*}

Now $y(0)= 1 \Rightarrow 1 = -2 + c$ so $c = 3$ and $$y = -2
\cos^2 x + 3 \cos x = \cos (3 - 2 \cos x)$$



\item[(b)] $\ds x^2y' + 2xy - x + 1  = 0 \hspace{.2in}(1) \Rightarrow y +
\frac{2}{x}y = \frac{x-1}{x^2} \hspace{.2in} (2)$

Integrating factor $\ds e^{\int \frac{2}{x} \, dx} = e^{2\ln x} =
x^2$

so (2) becomes \begin{eqnarray*} y'x^2 + 2xy &amp; =  &amp; x-1 \\
\Rightarrow \frac{d}{dx} \left( x^2y \right) &amp;=&amp; x-1 \\
\Rightarrow x^2y &amp; = &amp; \int(x-1) \, dx \\ &amp; = &amp;\frac{1}{2}x^2 - x
+ c
\\ \Rightarrow y &amp; =  &amp; \frac{1}{2} - \frac{1}{x} + \frac{c}{x^2}
\end{eqnarray*}

Now $y(0)= 1 \Rightarrow 0 = \frac{1}{2} -1 + c$ so $c =
\frac{1}{2}$ and $$y = \frac{1}{2} - \frac{1}{x} +
\frac{1}{2x^2}$$


\end{description}



\end{document}
</pre></body></html>