Question:

If \(\dfrac{dy}{dx} + y = x\), and \(y(0) = 0\), then the value of \(y(1)\) is:

Show Hint

Always use integrating factor for linear first-order ODEs: \(dy/dx + P(x)y = Q(x)\). Multiply by \(e^{\int P dx}\) and solve directly.
Updated On: Aug 24, 2025
  • \(e\)
  • \(\dfrac{1}{e}\)
  • \(1\)
  • \(-1\)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Identify the differential equation.
We are given: \[ \frac{dy}{dx} + y = x, \quad y(0) = 0 \] This is a linear first-order ODE. Step 2: Find integrating factor (I.F.).
Standard form: \(\dfrac{dy}{dx} + P(x)y = Q(x)\). Here, \(P(x) = 1\). So, integrating factor: \[ I.F. = e^{\int P(x)dx} = e^{\int 1 dx} = e^x. \] Step 3: Multiply equation by I.F.
\[ e^x \frac{dy}{dx} + e^x y = x e^x \] Left-hand side is: \[ \frac{d}{dx}(y e^x) = x e^x \] Step 4: Integrate both sides.
\[ \int \frac{d}{dx}(y e^x) dx = \int x e^x dx \] \[ y e^x = \int x e^x dx \] Step 5: Solve integral.
Use integration by parts: \[ \int x e^x dx = (x-1)e^x + C \] \[ y e^x = (x-1)e^x + C \] \[ y = (x-1) + C e^{-x} \] Step 6: Apply initial condition.
At \(x=0, y=0\): \[ 0 = (0-1) + C e^0 \] \[ 0 = -1 + C \] \[ C = 1 \] Step 7: Final solution.
\[ y = (x-1) + e^{-x} \] At \(x=1\): \[ y(1) = (1-1) + e^{-1} = \frac{1}{e} \] Correct Final Answer: \[ \boxed{\frac{1}{e}} \]
Was this answer helpful?
0
0

Questions Asked in GATE PE exam

View More Questions