Differential Equations

The order of a differential equation

The order of a differential equation is simply the order of the highest derivative appearing in it. No need to solve anything first.

What is the order of 2x2d2ydx2−3dydx+y=02x^2\dfrac{d^2y}{dx^2} - 3\dfrac{dy}{dx} + y = 0?

Solution: The highest derivative present is d2ydx2\dfrac{d^2y}{dx^2}, a second derivative, so the order is 2.

Order and degree

The degree is the power of the highest-order derivative, once the equation is written as a polynomial in its derivatives. If a derivative sits inside a function like sin⁡\sin or exe^x, the degree is not defined.

Order is the highest derivative; degree is that derivative's power
EquationOrderDegree
dydx+y=x\dfrac{dy}{dx} + y = x11
(d2ydx2)3+(dydx)4+y=0\left(\dfrac{d^2y}{dx^2}\right)^3 + \left(\dfrac{dy}{dx}\right)^4 + y = 023
(dydx)2=1+x\left(\dfrac{dy}{dx}\right)^2 = 1 + x12
d2ydx2+sin⁡(dydx)=0\dfrac{d^2y}{dx^2} + \sin\left(\dfrac{dy}{dx}\right) = 02not defined

In the second row, the degree is 3 even though a 4th power appears. Degree belongs to the highest-order derivative, d2ydx2\dfrac{d^2y}{dx^2}, not to the biggest exponent.

Three types of first-order equation

How to recognise and solve each type
TypeFormMethod
Variable separabledydx=g(x) h(y)\dfrac{dy}{dx} = g(x)\,h(y)Separate: dyh(y)=g(x) dx\dfrac{dy}{h(y)} = g(x)\,dx, then integrate both sides
Homogeneousdydx=F(yx)\dfrac{dy}{dx} = F\left(\dfrac{y}{x}\right)Substitute y=vxy = vx, so dydx=v+xdvdx\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}, then separate
Lineardydx+P(x) y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x)Multiply by the integrating factor e∫P dxe^{\int P\,dx}: y⋅IF=∫Q⋅IF dxy\cdot\text{IF} = \int Q\cdot\text{IF}\,dx

The worked example below on separating variables covers the first type. The other two follow it.

Worked example: forming an equation from a family of curves

Form the differential equation representing the family of curves y=mxy = mx, where mm is an arbitrary constant.

Solution: Differentiate y=mxy = mx with respect to xx:

dydx=m\dfrac{dy}{dx} = m

Since m=yxm = \dfrac{y}{x} from the original equation, substituting eliminates the arbitrary constant, giving the differential equation:

dydx=yx\dfrac{dy}{dx} = \dfrac{y}{x}

Worked example: solving by separating variables

Find the equation of the curve passing through (−2,3)(-2, 3), given that the slope of the tangent at any point (x,y)(x, y) is 2xy2\dfrac{2x}{y^2}.

Solution: The slope is dydx=2xy2\dfrac{dy}{dx} = \dfrac{2x}{y^2}. Separating variables and integrating both sides:

y2 dy=2x dx  ⇒  ∫y2 dy=∫2x dx  ⇒  y33=x2+Cy^2\,dy = 2x\,dx \;\Rightarrow\; \int y^2\,dy = \int 2x\,dx \;\Rightarrow\; \dfrac{y^3}{3} = x^2 + C

Using the point (−2,3)(-2, 3) to find CC:

273=4+C  ⇒  9=4+C  ⇒  C=5\dfrac{27}{3} = 4 + C \;\Rightarrow\; 9 = 4 + C \;\Rightarrow\; C = 5

So y33=x2+5\dfrac{y^3}{3} = x^2 + 5, or equivalently:

y3=3x2+15y^3 = 3x^2 + 15

Worked example: a homogeneous equation

Solve dydx=x+yx\dfrac{dy}{dx} = \dfrac{x + y}{x} for x>0x > 0.

Solution: The right side is 1+yx1 + \dfrac{y}{x}, a function of yx\dfrac{y}{x}, so the equation is homogeneous. Substitute y=vxy = vx:

v+xdvdx=1+v  ⇒  xdvdx=1  ⇒  ∫dv=∫dxx  ⇒  v=ln⁡x+Cv + x\dfrac{dv}{dx} = 1 + v \;\Rightarrow\; x\dfrac{dv}{dx} = 1 \;\Rightarrow\; \int dv = \int \dfrac{dx}{x} \;\Rightarrow\; v = \ln x + C

Replacing vv with yx\dfrac{y}{x}:

y=xln⁡x+Cxy = x\ln x + Cx

Worked example: a linear equation

Solve dydx+yx=x2\dfrac{dy}{dx} + \dfrac{y}{x} = x^2 for x>0x > 0.

Solution: This is linear with P(x)=1xP(x) = \dfrac{1}{x} and Q(x)=x2Q(x) = x^2. The integrating factor is e∫1xdx=eln⁡x=xe^{\int \frac{1}{x}dx} = e^{\ln x} = x. Multiplying through by it turns the left side into the derivative of xyxy:

ddx(xy)=x3  ⇒  xy=x44+C  ⇒  y=x34+Cx\dfrac{d}{dx}(xy) = x^3 \;\Rightarrow\; xy = \dfrac{x^4}{4} + C \;\Rightarrow\; y = \dfrac{x^3}{4} + \dfrac{C}{x}

Common mistakes

  • Confusing order and degree. Order is which derivative is highest; degree is the power it is raised to.
  • Giving a degree when it isn't defined. If a derivative appears inside sin⁡\sin, log⁡\log or an exponential, there is no degree.
  • Dropping CC before dividing. In xy=x44+Cxy = \dfrac{x^4}{4} + C, dividing by xx gives Cx\dfrac{C}{x}, not CC. Add the constant as soon as you integrate.
  • Writing the integrating factor wrongly. It is e∫P dxe^{\int P\,dx}, using PP from the standard form with the coefficient of dydx\dfrac{dy}{dx} equal to 1. Divide through first if it isn't.

Continue learning

Solving a differential equation almost always ends in integration, and separating variables here works the same way integration by parts handles a trickier product.

From past GATE papers