Question:medium

The general solution of the differential equation $\frac{dy}{dx} + y \cot x = 2 \cos x$ is:

Show Hint

Always remember that $\int \cot x \, dx = \ln|\sin x|$, making the integrating factor simply $\sin x$ for such standard equations.
Updated On: Jun 3, 2026
  • $y \sin x = -\frac{1}{2} \cos 2x + C$
  • $y \sin x = \frac{1}{2} \cos 2x + C$
  • $y \sin x = -\cos 2x + C$
  • $y \sin x = \sin 2x + C$
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Recognise the type.
The equation $\frac{dy}{dx} + y\cot x = 2\cos x$ is a first order linear equation. It has the form $\frac{dy}{dx} + Py = Q$, with $P = \cot x$ and $Q = 2\cos x$. Such equations are solved with an integrating factor.

Step 2: Find the integrating factor.
The integrating factor is $e^{\int P\,dx}$. Here $\int \cot x\,dx = \ln|\sin x|$.
\[ \text{I.F.} = e^{\ln|\sin x|} = \sin x \]

Step 3: Write the solution form.
The general solution is the integrating factor times $y$ equals the integral of $Q$ times the integrating factor.
\[ y\sin x = \int (2\cos x)(\sin x)\,dx + C \]

Step 4: Simplify the integrand.
Use the identity $2\sin x\cos x = \sin 2x$.
\[ y\sin x = \int \sin 2x\,dx + C \]

Step 5: Do the integral.
The integral of $\sin 2x$ is $-\frac{1}{2}\cos 2x$.
\[ y\sin x = -\frac{1}{2}\cos 2x + C \]

Step 6: State the answer.
This is the general solution.
\[ \boxed{y\sin x = -\tfrac{1}{2}\cos 2x + C} \]
Was this answer helpful?
0