The solution of the differential equation $\frac{\mathrm{d} y}{\mathrm{~d} x}+\frac{y}{x}=\sin x$ is

The solution of the differential equation $\frac{\mathrm{d} y}{\mathrm{~d} x}+\frac{y}{x}=\sin x$ is
  1. $x y+\cos x=\sin x+\mathrm{c}$, where $\mathrm{c}$ is a constant of integration.
  2. $x(y+\cos x)=\sin x+\mathrm{c}$, where $\mathrm{c}$ is a constant of integration.
  3. $y(x+\cos x)=\sin x+\mathrm{c}$, where $\mathrm{c}$ is a constant of integration.
  4. $x y+\sin x=\cos x+c$, where $\mathrm{c}$ is a constant of integration.

Solution

For given linear differential equation, $\text { I.F. }=\mathrm{e}^{\int \frac{1}{x} d x}=\mathrm{e}^{\log x}=x$ $\therefore \quad$ The required solution is $y x=\int x \sin x \frac{\mathrm{d} y}{\mathrm{~d} x}$ $\begin{aligned} & \therefore \quad y x=-x \cos x+\int \cos x \mathrm{~d} x \\ & \therefore \quad y x=-x \cos x+\sin x+\mathrm{c} \\ & \therefore \quad x(y+\cos x)=\sin x+\mathrm{c}\end{aligned}$

Asked in: MHT CET 2023 (11 May Shift 2)

Practice more Differential Equations questions on Aicharya