# Method of Variation of Parameters for Second-Order Linear Differential Equations with Constant Coefficients

Method of Variation of Parameters for Second-Order Linear Differential Equations with Constant Coefficients

This Demonstration shows how to solve a nonhomogeneous linear second-order differential equation of the form , where and are constants.

y''+py'+qy=f(x)

p

q

The corresponding homogeneous equation is with the characteristic equation +pr+q=0. If and are two real roots of the characteristic equation, then the general solution of the homogeneous differential equation is , where and are arbitrary constants. If =, the general solution is x(c+dx). If , the general solution is (ccos(βx)+dsin(βx)).

y''+py'+qy=0

2

r

r

1

r

2

cx+dx

r

1

e

r

2

e

c

d

r

1

r

2

r

1

e

r=α±βi

αx

e

To find a particular solution of the nonhomogeneous equation, the method of variation of parameters (Lagrange's method) is used. The solution has the form , where and are independent partial solutions of the corresponding homogeneous equation, and and are functions of satisfying the system of equations

y=A+B

y

1

y

2

y

1

y

2

A

B

x

A'+B'=0

y

1

y

2

A''+B''=f(x).

y

1

y

2

Define the Wronskian by . Then , .

w='-'

y

1

y

2

y

2

y

1

A'=-f(x)/w

y

2

B'=f(x)/w

y

1

The general solution of the nonhomogeneous equation is the sum of the general solution of the homogeneous equation and a particular solution of the nonhomogeneous equation.