Question:medium

Consider differential equation \(\dfrac{dy}{dx}+xy=x\) with the condition as \(y=0\) at \(x=0\). The value of \(y\) at \(x=1.0\) is ______ (rounded off to two decimal places).

Show Hint

Use an integrating factor \(e^{x^2/2}\) on \(\dfrac{dy}{dx}+xy=x\), or substitute \(v=1-y\) to get a separable equation; either way \(y=1-e^{-x^2/2}\).
Updated On: Jul 22, 2026
Show Solution

Correct Answer: 0.39

Solution and Explanation

Step 1: Spot a shortcut using a substitution.
Instead of the integrating factor, notice that the equation $\frac{dy}{dx}+xy=x$ can be written as $\frac{dy}{dx} = x(1-y)$.
This suggests the substitution $v = 1 - y$, so that $y = 1 - v$ and $\frac{dy}{dx} = -\frac{dv}{dx}$.

Step 2: Rewrite the equation in terms of v.
Substituting into $\frac{dy}{dx} = x(1-y)$ gives $-\frac{dv}{dx} = xv$, or $\frac{dv}{dx} = -xv$.
This is now a simple separable equation in $v$ and $x$.

Step 3: Separate variables and integrate.
$\frac{dv}{v} = -x\,dx$
Integrating both sides: $\ln|v| = -\frac{x^2}{2} + C_1$
So $v = C_2 e^{-x^2/2}$, where $C_2 = e^{C_1}$ is a new constant.

Step 4: Use the initial condition.
At $x=0$, $y=0$, so $v = 1 - y = 1$.
Substituting into $v = C_2 e^{-x^2/2}$ at $x=0$: $1 = C_2 e^{0} = C_2$, so $C_2 = 1$.
So $v = e^{-x^2/2}$, and going back to y:
$y = 1 - v = 1 - e^{-x^2/2}$
This is the same solution reached the other way, which is a good cross-check.

Step 5: Plug in x = 1.0.
$y(1) = 1 - e^{-1/2} = 1 - e^{-0.5}$
Since $e^{-0.5} \approx 0.6065$,
$y(1) \approx 1 - 0.6065 = 0.3935 \approx 0.39$ (to two decimal places).
\[ \boxed{y(1) \approx 0.39} \]
Was this answer helpful?
0


Questions Asked in GATE CE exam