Skip to content
NCERT Exemplar · Q5

Q.Solve the differential equation dydx+2xy=y\frac{dy}{dx}+2xy=y.

Odisha ChseShort· 3mImportance★★★★★
56% · 125/222 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

This is a first-order linear ODE solved by separation of variables. The general solution is y=Cex−x2y = Ce^{x - x^2}, where CC is an arbitrary constant.

The equation dydx+2xy=y\frac{dy}{dx} + 2xy = y looks like it might need an integrating factor — but before jumping into that, notice something: the yy on the right-hand side can be brought over to the left. That gives us a chance to factor yy out entirely. When you can write the derivative in terms of yy times something, separation of variables is often the cleanest path.

Let’s rewrite it:

dydx+2xy−y=0⇒dydx+y(2x−1)=0.\frac{dy}{dx} + 2xy - y = 0 \quad \Rightarrow \quad \frac{dy}{dx} + y(2x - 1) = 0.

Now it’s clear: the derivative of yy plus yy times a function of xx equals zero. That’s a separable equation.

  1. Separate the variables. Move the yy term to the other side:

dydx=−y(2x−1).\frac{dy}{dx} = -y(2x - 1).

Divide both sides by yy (assuming y≠0y \neq 0 for now; we’ll check the zero case later) and multiply by dxdx:

1y dy=−(2x−1) dx.\frac{1}{y}\, dy = -(2x - 1)\, dx.

  1. Integrate both sides. The left integrates to log⁡∣y∣\log|y|, the right is a simple polynomial:

∫1y dy=∫−(2x−1) dx.\int \frac{1}{y}\, dy = \int -(2x - 1)\, dx.

log⁡∣y∣=−x2+x+C1,\log|y| = -x^2 + x + C_1,

where C1C_1 is the constant of integration.

  1. Solve for yy. Exponentiate both sides to remove the logarithm:

∣y∣=e−x2+x+C1=eC1ex−x2.|y| = e^{-x^2 + x + C_1} = e^{C_1} e^{x - x^2}.

Let C=±eC1C = \pm e^{C_1} (or simply an arbitrary constant, since eC1>0e^{C_1} > 0 and the ±\pm absorbs the absolute value). Then:

y=Cex−x2.y = C e^{x - x^2}.

  1. Check the special case y=0y = 0. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.