Question:

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

Show Hint

This is a linear first-order equation; multiply by the integrating factor x.
Updated On: Nov 17, 2026
  • \(xy+\mathrm{cos}x=\mathrm{sin}x+\mathrm{c}\), where c is a constant of integration.
  • \(x(y+\mathrm{cos}x)=\mathrm{sin}x+\mathrm{c}\), where c is a constant of integration.
  • \(y(x+\mathrm{cos}x)=\mathrm{sin}x+c\), where c is a constant of integration.
  • \(xy+\mathrm{sin}x=\mathrm{cos}x+\mathrm{c}\), where c is a constant of integration.
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding the Concept
The equation is linear: \(\dfrac{dy}{dx}+Py=Q\) with \(P=\dfrac1x\), \(Q=\sin x\).
Integrating factor \(=e^{\int dx/x}=x\).

Step 2: Solve
\(xy=\int x\sin x\,dx\)
By parts: \(\int x\sin x\,dx=-x\cos x+\sin x\).

Step 3: Rearrange
\(xy=-x\cos x+\sin x+c\Rightarrow xy+x\cos x=\sin x+c\)
\(x(y+\cos x)=\sin x+c\), option (B).

Final Answer:
The solution is x(y + cos x) = sin x + c. \[ \boxed{\text{(B) }x(y+\cos x)=\sin x+\mathrm{c}} \]
Was this answer helpful?
0
0