Question:

Solve: \[ \frac{dy}{dx} + y = e^x, \qquad y(0)=2 \]

Show Hint

For linear differential equations: \[ \frac{dy}{dx}+Py=Q \] use: \[ I.F.=e^{\int Pdx} \] Then: \[ y(I.F.) = \int Q(I.F.)\,dx + C \] Always apply the initial condition at the end to determine the constant.
Updated On: May 30, 2026
  • \(y = e^x + e^{-x}\)
  • \(y = \frac{1}{2}e^x + \frac{3}{2}e^{-x}\)
  • \(y = e^x + 1\)
  • \(y = 2e^x\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept: The given equation is a first-order linear differential equation of the form: \[ \frac{dy}{dx} + Py = Q \] where: \[ P = 1, \qquad Q = e^x \] Such equations are solved using the integrating factor (I.F.) method. The integrating factor is: \[ I.F. = e^{\int P\,dx} \]

Step 1:
Finding the integrating factor. Given equation: \[ \frac{dy}{dx} + y = e^x \] Comparing with: \[ \frac{dy}{dx} + Py = Q \] we get: \[ P = 1 \] Therefore integrating factor: \[ I.F. = e^{\int 1\,dx} = e^x \]

Step 2:
Multiplying entire equation by integrating factor. Multiply both sides by \(e^x\): \[ e^x\frac{dy}{dx} + ye^x = e^{2x} \] Observe that: \[ e^x\frac{dy}{dx} + ye^x = \frac{d}{dx}(ye^x) \] Thus equation becomes: \[ \frac{d}{dx}(ye^x) = e^{2x} \]

Step 3:
Integrating both sides. Integrating: \[ \int \frac{d}{dx}(ye^x)\,dx = \int e^{2x}\,dx \] we get: \[ ye^x = \frac{1}{2}e^{2x} + C \] Divide throughout by \(e^x\): \[ y = \frac{1}{2}e^x + Ce^{-x} \]

Step 4:
Applying initial condition. Given: \[ y(0)=2 \] Substitute \(x=0\): \[ 2 = \frac{1}{2} + C \] Therefore: \[ C = \frac{3}{2} \] Substitute back: \[ y = \frac{1}{2}e^x + \frac{3}{2}e^{-x} \]

Step 5:
Matching with options. The obtained solution matches option (B). Final Answer: \[ \boxed{(B)\ y = \frac{1}{2}e^x + \frac{3}{2}e^{-x}} \]
Was this answer helpful?
0
0