Q. The solution of the differential equation $x\ \frac{dy}{dx} + y = x\cos x + \sin x$, given that $y = 1$ when $x = \frac{\pi}{2}$, is

A) $y = \sin x - \cos x$
B) $y = \cos x$
C) $y = \sin x$
D) $y = \sin x + \cos x$
Explanation

(c)
Given, $\frac{dy}{dx} + \frac{y}{x} = \cos x + \frac{\sin x}{x}$
$\therefore$ $IF = e^{\int_{}^{}{\frac{1}{x}\ dx}} = e^{\log x} = x$
$\therefore$ Complete solution is
$xy = \int_{}^{}{(x\cos x} + \sin x)dx$
$\Rightarrow$ $xy = x\sin x + c$
At $y = 1,\ x = \frac{\pi}{2},c = 0$
$\therefore$ $y = \sin x$

Dr. Abubacker
Reviewed by Dr. Abubacker

Physics Educator & NEET/JEE Specialist

Ph.D. in Physics with 19+ years of teaching experience.