Question
Solve the following initial value problems:
$\text{x}\frac{\text{dy}}{\text{dx}}+\text{y}=\text{x}\cos\text{x}+\sin\text{x},\text{ y}\Big(\frac{\pi}{2}\Big)=1$

Answer

We have,
$\text{x}\frac{\text{dy}}{\text{dx}}+\text{y}=\text{x}\cos\text{x}+\sin\text{x}$
$\Rightarrow\frac{\text{dy}}{\text{dx}}+\frac{1}{\text{x}}\text{y}=\cos\text{x}+\frac{\sin\text{x}}{\text{x}}\ ...(1)$
Clearly, it is a linear differential equation of the form
$\frac{\text{dy}}{\text{dx}}+\text{Px}=\text{Q}$
Where $\text{P}=\tan\text{x}$ and $\text{Q}=\text{x}^2\cot\text{x}+2\text{x}$
$\therefore\text{ I.F.}=\text{e}^{\int\text{Pdx}}$
$=\text{e}^{\int\frac{1}{\text{x}}\text{dx}}$
$=\text{e}^{\log\text{x}}$
$=\text{x}$
Multiplying both sides of (1) by $\text{I.F.}=\text{x},$ we get
$\text{x}\Big(\frac{\text{dy}}{\text{dx}}+\frac{1}{\text{x}}\text{y}\Big)=\text{x}\Big(\cos\text{x}+\frac{\sin\text{x}}{\text{x}}\Big)$
$\Rightarrow\text{x}\Big(\frac{\text{dy}}{\text{dx}}+\frac{1}{\text{x}}\text{y}\Big)=\text{x}\cos\text{x}+\sin\text{x}$
Integrating both sides with respect to x, we get
$\text{xy}=\int\text{x}\cos\text{x dx}+\int\sin\text{x dx}+\text{C}$
$\Rightarrow\text{xy}=\Big[\text{x}\sin\text{x}-\int1(\sin\text{x})\text{dx}\Big]-\cos\text{x}+\text{C}$
$\Rightarrow\text{xy}=\text{x}\sin\text{x}+\cos\text{x}-\cos\text{x}+\text{C}$
$\Rightarrow\text{xy}=\text{x}\sin\text{x}+\text{C}\ ...(2)$
Now,
$\text{y}\Big(\frac{\pi}{2}\Big)=1$
$\therefore\ 1\times\frac{\pi}{2}=\frac{\pi}{2}\sin\frac{\pi}{2}+\text{C}$
$\Rightarrow\text{C}=0$
Putting the value of C in (2), we get
$\text{xy}=\text{x}\sin\text{x}$
$\Rightarrow\text{y}=\sin\text{x}$
Hence, $\text{y}=\sin\text{x}$ is the required solution.

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free