WOLFRAM|DEMONSTRATIONS PROJECT

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

​
choose equation
′′
y
(x)+y(x)csc(x)
homogeneous equation (h.e.)
characteristic equation
solution of characteristic equation
particular solutions
general solution of h.e.
particular solution of
nonhomogeneous equation (n.h.e.)
system of equations
Wronskian
solutions of equations
integral of solutions
particular solution
general solution of n.h.e.
corresponding homogeheous equation:
′′
y
(x)+y(x)0
2
r
+10
{
y
1
,
y
2
} = {cos(x),-sin(x)}
ccos(x)-dsin(x)
particular solution of equation:
′′
y
(x)+y(x)csc(x)
′
A
cos(x)-
′
B
sin(x)0
′
A
(-sin(x))-
′
B
cos(x)csc(x)
{
A'
,
B'
} = {-1,-cot(x)}
{
A
,
B
} = {-x,-log(sin(x))}
sin(x)log(sin(x))-xcos(x)
ccos(x)-dsin(x)-xcos(x)+sin(x)log(sin(x))
This Demonstration shows how to solve a nonhomogeneous linear second-order differential equation of the form
y''+py'+qy=f(x)
, where
p
and
q
are constants.
The corresponding homogeneous equation is
y''+py'+qy=0
with the characteristic equation
2
r
+pr+q=0
. If
r
1
and
r
2
are two real roots of the characteristic equation, then the general solution of the homogeneous differential equation is
c
r
1
x
e
+d
r
2
x
e
, where
c
and
d
are arbitrary constants. If
r
1
=
r
2
, the general solution is
r
1
x
e
(c+dx)
. If
r=α±βi
, the general solution is
αx
e
(ccos(βx)+dsin(βx))
.
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
y=A
y
1
+B
y
2
, where
y
1
and
y
2
are independent partial solutions of the corresponding homogeneous equation, and
A
and
B
are functions of
x
satisfying the system of equations
A'
y
1
+B'
y
2
=0
,
A'
y
1
'+B'
y
2
'=f(x).
Define the Wronskian by
w=
y
1
y
2
'-
y
2
y
1
'
. Then
A'=-
y
2
f(x)/w
,
B'=
y
1
f(x)/w
.
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.