Mathwords logoMathwords

Linear Differential Equation — Definition, Formula & Example

A linear differential equation is a differential equation in which the unknown function yy and its derivatives appear only to the first power. They are never multiplied by each other and never placed inside functions such as sin⁡y\sin y or eye^{y}. The coefficients may still depend freely on the independent variable xx.

An nnth-order ordinary differential equation is linear if it can be written as L[y]=g(x)L[y] = g(x), where L[y]=an(x)y(n)+⋯+a1(x)y′+a0(x)yL[y] = a_n(x)y^{(n)} + \cdots + a_1(x)y' + a_0(x)y and an(x)≢0a_n(x) \not\equiv 0. The operator LL satisfies L[c1y1+c2y2]=c1L[y1]+c2L[y2]L[c_1y_1 + c_2y_2] = c_1L[y_1] + c_2L[y_2] for all constants c1,c2c_1, c_2. The equation is homogeneous when g(x)≡0g(x) \equiv 0 and nonhomogeneous otherwise.

Key Formula

an(x) y(n)+an−1(x) y(n−1)+⋯+a1(x) y′+a0(x) y=g(x)a_n(x)\,y^{(n)} + a_{n-1}(x)\,y^{(n-1)} + \cdots + a_1(x)\,y' + a_0(x)\,y = g(x)
Where:
  • yy = The unknown function of x that you are solving for
  • a0(x),…,an(x)a_0(x), \dots, a_n(x) = Coefficient functions that depend only on x. The leading coefficient is not identically zero.
  • g(x)g(x) = The forcing term, a function of x only. When it is zero for every x, the equation is homogeneous.
  • nn = The order of the equation, which is the highest derivative that appears

Worked Example

Problem: For x>0x > 0, you are told that y1=x2y_1 = x^2 and y2=1xy_2 = \frac{1}{x} both solve x2y′′−2y=0x^2y'' - 2y = 0. Use linearity to solve the initial value problem x2y′′−2y=6x^2y'' - 2y = 6, y(1)=0y(1) = 0, y′(1)=3y'(1) = 3.
Step 1: Classify the equation and combine the homogeneous solutions. The coefficients x2x^2 and −2-2 depend only on xx, and y′′y'' and yy each appear to the first power, so the equation is linear. Check y1y_1: x2(2)−2x2=0x^2(2) - 2x^2 = 0. Check y2y_2: x2⋅2x3−2x=0x^2\cdot\frac{2}{x^3} - \frac{2}{x} = 0. By superposition, every combination of the two is also a homogeneous solution.
yh=C1x2+C2xy_h = C_1x^2 + \frac{C_2}{x}
Step 2: Find one particular solution. Try the constant yp=−3y_p = -3. Then yp′′=0y_p'' = 0, so the left side is x2(0)−2(−3)=6x^2(0) - 2(-3) = 6, which matches. Linearity says the general solution is yh+ypy_h + y_p.
y=C1x2+C2x−3y = C_1x^2 + \frac{C_2}{x} - 3
Step 3: Apply the initial conditions, using y′=2C1x−C2x2y' = 2C_1x - \frac{C_2}{x^2}. Adding the two equations gives 3C1=63C_1 = 6, so C1=2C_1 = 2 and C2=3−2=1C_2 = 3 - 2 = 1.
C1+C2−3=0,2C1−C2=3C_1 + C_2 - 3 = 0, \qquad 2C_1 - C_2 = 3
Answer: y=2x2+1x−3y = 2x^2 + \frac{1}{x} - 3 for x>0x > 0. Check: y(1)=2+1−3=0y(1) = 2 + 1 - 3 = 0 and y′(1)=4−1=3y'(1) = 4 - 1 = 3.

Why It Matters

Differential equations in general have no single solution strategy. Linear ones are special, because every solution has the structure y=yh+ypy = y_h + y_p. That structure is why linear equations dominate a first ODE course. It is also why engineers model spring-mass systems and RLC circuits with them: the response to two inputs is the sum of the responses to each input alone.

Common Mistakes

Mistake: Calling an equation nonlinear because its coefficients contain xx, as in x2y′′−2y=6x^2y'' - 2y = 6. The opposite error is calling yy′=xyy' = x or y′=sin⁡yy' = \sin y linear.
Correction: Linearity is about yy and its derivatives, not about xx. Terms like x2y′′x^2y'' or exye^{x}y are fine. Terms like yy′yy', (y′)2(y')^2, y3y^3, or sin⁡y\sin y make the equation nonlinear.

Related Terms