Question:medium

The solution of the differential equation $(1+x)\frac{dy}{dx}-xy=1-x$ is}

Show Hint

In Linear DE, the I.F. usually simplifies the RHS significantly.
Updated On: Jun 19, 2026
  • $y(1+x)=x+ce^{x}$
  • $y(1+x)=ce^{x}$
  • $y(1-x)=x-ce^{x}$
  • $y(1+x)=x$
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Understanding the Question:
Solve the given first-order linear differential equation.

Step 2: Key Formula or Approach:

Standard form: $\frac{dy}{dx} + P(x)y = Q(x)$.
$IF = e^{\int P(x) dx}$. Solution: $y \cdot IF = \int Q(x) \cdot IF dx + c$.

Step 3: Detailed Explanation:

Rewrite the equation as: \[ \frac{dy}{dx} - \frac{x}{1+x}y = \frac{1-x}{1+x} \] Here, $P = -\frac{x}{1+x} = -\frac{(1+x)-1}{1+x} = -1 + \frac{1}{1+x}$.
$IF = e^{\int (-1 + \frac{1}{1+x}) dx} = e^{-x + \ln(1+x)} = e^{-x} \cdot (1+x)$.
Multiply the equation by $IF$: \[ \int d(y \cdot (1+x)e^{-x}) = \int \frac{1-x}{1+x} \cdot (1+x)e^{-x} dx \] \[ y(1+x)e^{-x} = \int (1-x)e^{-x} dx \] Solve $\int (1-x)e^{-x} dx$: Let $u = 1-x, dv = e^{-x} dx \Rightarrow du = -dx, v = -e^{-x}$.
\[ \int (1-x)e^{-x} dx = -(1-x)e^{-x} - \int (-1)(-e^{-x}) dx \] \[ = (x-1)e^{-x} - \int e^{-x} dx = (x-1)e^{-x} + e^{-x} = x e^{-x} \] So, $y(1+x)e^{-x} = x e^{-x} + c$.
Multiply by $e^x$: \[ y(1+x) = x + c e^x \]

Step 4: Final Answer:

The solution is $y(1+x) = x + ce^x$.
Was this answer helpful?
0