Math Lab
Home/Class XII/Ch 9/Variable-separable equations

Variable-separable equations

The simplest first-order differential equations have the form dydx=f(x)g(y).\frac{dy}{dx} = f(x)\,g(y). The right side is a product of a function of xx alone and a function of yy alone. Whenever you can write a DE in this form, the solution method is mechanical.

The method

If g(y)0g(y) \neq 0, divide: 1g(y)dy=f(x)dx.\frac{1}{g(y)}\,dy = f(x)\,dx. Now each side depends on only one variable. Integrate both sides: dyg(y)=f(x)dx+C.\int \frac{dy}{g(y)} = \int f(x)\,dx + C. This is an implicit relation between xx and yy. Often you can solve for yy explicitly; sometimes you leave the answer implicit.

If g(y0)=0g(y_0) = 0 for some constant y0y_0, then y=y0y = y_0 is also a solution , a constant solution. Check these separately; they may or may not be part of the general family captured by the integration above.

Why does this work?

The chain rule. If y=y(x)y = y(x) satisfies the equation, then ddxdyg(y)=1g(y)dydx=f(x)=ddxf(x)dx,\frac{d}{dx}\int \frac{dy}{g(y)} = \frac{1}{g(y)} \frac{dy}{dx} = f(x) = \frac{d}{dx}\int f(x)\,dx, so the two sides differ by at most a constant. Hence dyg(y)f(x)dx=C.\int \frac{dy}{g(y)} - \int f(x)\,dx = C. The single constant CC absorbs both constants of integration.

Recognition

The form dydx=f(x)g(y)\dfrac{dy}{dx} = f(x)g(y) may be disguised. Sometimes you must rearrange, e.g.

  • dydx=(x+3)(y2+1)\dfrac{dy}{dx} = (x + 3)(y^2 + 1): directly separable.
  • dydx=ex+y\dfrac{dy}{dx} = e^{x+y}: rewrite as exeye^x \cdot e^y; separable.
  • dydx+yx=0\dfrac{dy}{dx} + \dfrac{y}{x} = 0: rewrite as dydx=yx\dfrac{dy}{dx} = -\dfrac{y}{x}; separable.
  • (1+y2)dy=(1+x2)dx(1 + y^2)\,dy = (1 + x^2)\,dx: already separated.

If you see a sum that can't be factored into f(x)g(y)f(x) g(y), the equation is not separable. Move on to other techniques.

Initial-value problems

When a condition like y(x0)=y0y(x_0) = y_0 is given, you solve the general implicit relation, then substitute to find CC. The result is a particular solution.

Worked examples

Example 1. Solve dydx=yx\dfrac{dy}{dx} = \dfrac{y}{x}.

Separate: dyy=dxx\dfrac{dy}{y} = \dfrac{dx}{x}. Integrate: lny=lnx+C1\ln|y| = \ln|x| + C_1. So y=eC1x|y| = e^{C_1} \cdot |x|, hence y=Cxy = Cx (with CRC \in \mathbb{R} absorbing the sign and the exponential). Family of lines through the origin.

Example 2. Solve dydx=xy\dfrac{dy}{dx} = -\dfrac{x}{y}.

Separate: ydy=xdxy\,dy = -x\,dx. Integrate: y22=x22+C1\dfrac{y^2}{2} = -\dfrac{x^2}{2} + C_1, so x2+y2=Cx^2 + y^2 = C (a family of circles centred at the origin).

Example 3. Solve dydx=(1+x2)(1+y2)\dfrac{dy}{dx} = (1 + x^2)(1 + y^2).

Separate: dy1+y2=(1+x2)dx\dfrac{dy}{1 + y^2} = (1 + x^2)\,dx. Integrate: tan1y=x+x33+C\tan^{-1}y = x + \dfrac{x^3}{3} + C.

Example 4. Solve dydx=ex+y\dfrac{dy}{dx} = e^{x + y}, y(0)=0y(0) = 0.

Rewrite: dydx=exey\dfrac{dy}{dx} = e^x e^y. Separate: eydy=exdxe^{-y}\,dy = e^x\,dx. Integrate: ey=ex+C-e^{-y} = e^x + C. Apply y(0)=0y(0) = 0: 1=1+C-1 = 1 + C, so C=2C = -2. Particular solution: ey=ex2-e^{-y} = e^x - 2, or ey=2exe^{-y} = 2 - e^x.

Example 5. Solve xdyydx=0x\,dy - y\,dx = 0.

Rewrite: dyy=dxx\dfrac{dy}{y} = \dfrac{dx}{x}. Integrate: lny=lnx+C1\ln|y| = \ln|x| + C_1, so y=Cxy = Cx.

Example 6. Newton's law of cooling: dTdt=k(TT0)\dfrac{dT}{dt} = -k(T - T_0) with T(0)=T1T(0) = T_1, T0T_0 ambient.

Separate: dTTT0=kdt\dfrac{dT}{T - T_0} = -k\,dt. Integrate: lnTT0=kt+C1\ln|T - T_0| = -kt + C_1, so TT0=AektT - T_0 = A e^{-kt}. Apply T(0)=T1T(0) = T_1: A=T1T0A = T_1 - T_0. Final: T(t)=T0+(T1T0)ektT(t) = T_0 + (T_1 - T_0)e^{-kt}.

Try it yourself

  1. dydx=xy2\dfrac{dy}{dx} = x y^2.
  2. dydx=yx2\dfrac{dy}{dx} = \dfrac{y}{x^2}.
  3. (1+x)dydxy=0(1 + x)\dfrac{dy}{dx} - y = 0.
  4. dydx=1+y21+x2\dfrac{dy}{dx} = \dfrac{1 + y^2}{1 + x^2}.
  5. dydx=exy\dfrac{dy}{dx} = e^{x - y}.
  6. dydx=sec2xtany\dfrac{dy}{dx} = \sec^2 x \cdot \tan y.
  7. (x2+1)dydx+1=0(x^2 + 1)\dfrac{dy}{dx} + 1 = 0.
  8. dydx=x(1+y2)y(1+x2)\dfrac{dy}{dx} = \dfrac{x(1 + y^2)}{y(1 + x^2)}.
  9. sinxcosydx+cosxsinydy=0\sin x \cos y\,dx + \cos x \sin y\,dy = 0.
  10. dydx=ex1y\dfrac{dy}{dx} = e^x \cdot \dfrac{1}{y}, y(0)=2y(0) = 2.
  11. Radioactive decay: dNdt=λN\dfrac{dN}{dt} = -\lambda N, N(0)=N0N(0) = N_0.
  12. dydx=ycotx\dfrac{dy}{dx} = y \cot x.
  13. (1+y2)dx+(1+x2)dy=0(1 + y^2)\,dx + (1 + x^2)\,dy = 0.
  14. dydx=xexlogx+exxcosy\dfrac{dy}{dx} = \dfrac{x e^x \log x + e^x}{x \cos y}, y(1)=0y(1) = 0.

Pitfalls and tricks

  • Factor first. Many DEs look non-separable until you factor.
  • Don't forget constant solutions. If g(y0)=0g(y_0) = 0, then yy0y \equiv y_0 may be missed by dividing.
  • Logarithm absorbs constants. lny=lnx+C\ln|y| = \ln|x| + C becomes y=Cxy = Cx , the new CC has absorbed both sign and eC1e^{C_1}.
  • Apply initial conditions to the implicit form before solving explicitly. Sometimes it's cleaner.
  • Watch domains. Where is g(y)0g(y) \neq 0? The solution exists only there.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Variable separable
6 questions · pick the best answer
Q1

Solution of dydx=ex+y\frac{dy}{dx} = e^{x+y} is

Q2

Solution of yy=xy'y = x is

Q3

Solution of dydx=x(1+y2)\frac{dy}{dx} = x(1 + y^2) is

Q4

dydx=ycotx\frac{dy}{dx} = y\cot x has general solution

Q5

dydx=1+y21+x2\frac{dy}{dx} = \frac{1+y^2}{1+x^2}, y(0)=0y(0) = 0, gives

Q6

A constant solution y=y0y = y_0 exists for y=f(x)g(y)y' = f(x)g(y) iff