Question:

The solution of \[ \frac{dy}{dx} + \left[2(x-1)\sin x+x(x-2)\cos x\right]y = \frac{e^{2x\sin x}}{e^{x^2\sin x}}, \] at \(x=2\) if \(y(\pi)=0\) is

Show Hint

For a linear differential equation, \[ \boxed{ \frac{dy}{dx}+P(x)y=Q(x) } \] the integrating factor is \[ \boxed{ e^{\int P(x)\,dx}. } \] Always check whether \(P(x)\) is the derivative of a known expression.
Updated On: Jul 14, 2026
  • \(2-\pi\)
  • \(\dfrac{\pi}{2}\)
  • \(\pi+2\)
  • \(\pi^2\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Write the differential equation in linear form. The equation is \[ \frac{dy}{dx}+P(x)y=Q(x), \] where \[ P(x)=2(x-1)\sin x+x(x-2)\cos x. \] Observe that \[ P(x) = \frac{d}{dx} \left(x(x-2)\sin x\right). \] Hence, \[ \text{I.F.} = e^{\int P(x)\,dx} = e^{x(x-2)\sin x}. \]

Step 2:
Multiply by the integrating factor. Multiplying the equation throughout by the integrating factor, \[ \frac{d}{dx} \left[ y\,e^{x(x-2)\sin x} \right] = e^{x(x-2)\sin x} \cdot \frac{e^{2x\sin x}}{e^{x^2\sin x}}. \] Since \[ x(x-2)+2x=x^2, \] the right-hand side becomes \[ 1. \] Thus, \[ \frac{d}{dx} \left[ y\,e^{x(x-2)\sin x} \right] = 1. \]

Step 3:
Integrate and use the initial condition. Integrating, \[ y\,e^{x(x-2)\sin x} = x+C. \] Given, \[ y(\pi)=0, \] therefore, \[ 0=\pi+C. \] Hence, \[ C=-\pi. \] Thus, \[ y\,e^{x(x-2)\sin x} = x-\pi. \] At \[ x=2, \] \[ e^{2(2-2)\sin2}=e^0=1. \] Hence, \[ y(2)=2-\pi. \] Therefore, \[ \boxed{2-\pi} \] is the correct answer. Thus, \[ \boxed{(A)} \] is the correct answer.
Was this answer helpful?
0
0