Question:

Solve the differential equation:
\[ \frac{dy}{dx} + y = e^x \]

Show Hint

For first-order linear ODEs, use the integrating factor $e^{\int P(x) \, dx}$ to simplify and solve.
Updated On: Jun 18, 2025
  • $y = \frac{e^x}{2} + C e^{-x}$
  • $y = e^x + C e^{-x}$
  • $y = \frac{e^x}{2} + C e^x$
  • $y = e^x + C e^x$
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

This is a first-order linear differential equation of the form $\frac{dy}{dx} + P(x)y = Q(x)$, where $P(x) = 1$, $Q(x) = e^x$.
The integrating factor is:
\[ e^{\int P(x) \, dx} = e^{\int 1 \, dx} = e^x \]
Multiply through by the integrating factor:
\[ e^x \frac{dy}{dx} + e^x y = e^x \cdot e^x \]
\[ \frac{d}{dx} (y e^x) = e^{2x} \]
Integrate both sides:
\[ y e^x = \int e^{2x} \, dx = \frac{e^{2x}}{2} + C \]
\[ y = \frac{e^{2x}}{2 e^x} + C e^{-x} = \frac{e^x}{2} + C e^{-x} \]
Verify: $\frac{dy}{dx} = \frac{e^x}{2} - C e^{-x}$, then:
\[ \frac{dy}{dx} + y = \left( \frac{e^x}{2} - C e^{-x} \right) + \left( \frac{e^x}{2} + C e^{-x} \right) = e^x \]
This satisfies the equation.
Was this answer helpful?
0
0