0% found this document useful (0 votes)
23 views7 pages

Variation of Parameters in ODEs

This document contains lecture notes for Math 219 covering the method of variation of parameters for solving non-homogeneous linear ordinary differential equations (ODEs) with constant coefficients. It begins by introducing the method and discussing its application to both 2x2 and nxn systems of ODEs. It then provides an example problem demonstrating how to use variation of parameters to solve a 4th order ODE.

Uploaded by

Hesap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views7 pages

Variation of Parameters in ODEs

This document contains lecture notes for Math 219 covering the method of variation of parameters for solving non-homogeneous linear ordinary differential equations (ODEs) with constant coefficients. It begins by introducing the method and discussing its application to both 2x2 and nxn systems of ODEs. It then provides an example problem demonstrating how to use variation of parameters to solve a 4th order ODE.

Uploaded by

Hesap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MATH 219

Spring 2021-22
Lecture 16
Lecture notes by Özgür Kişisel

Content: The method of variation of parameters.


Suggested Problems: (Boyce, Di Prima, 9th edition)
§4.4: 3, 4, 5, 8, 11, 16
Suppose that we have a non-homogenous linear ODE with constant coefficients:
y (n) + a1 y (n−1) + . . . + an y = b(t).
In the previous lecture, we saw that if b(t) has a polynomial annihilator, then we
can use the method of undetermined coefficients to solve the problem. However, √
this condition is rather demanding. For instance, familiar functions such as 1/t, t
or tan t do not have polynomial annihilators. We still have a method that we can
use for such cases: variation of parameters. We can convert the ODE into a first
order n × n system and use variation of parameters for this system. However, since
we will only need to find the first component of the resulting solution vector, some
shortcuts can be taken. We will discuss these issues now.

1 The 2 × 2 case
Suppose that y1 and y2 are two linearly independent solutions of the homogenous
equation
y 00 + a1 y 0 + a2 y = 0.
Recall that we can convert this ODE into a first order linear system by setting
x1 = y, x2 = y 0 . Then  
y1 y2
Ψ(t) = 0
y1 y20
is a fundamental matrix for the system x0 = Ax + b associated to the ODE. The
system itself, by the way, can be written explicitly as
 0     
x1 0 1 x1 0
= + .
x2 −a2 −a1 x2 b(t)

1
In order to find x, use the variation of parameters formula:
Z
x = Ψ Ψ−1 bdt
Z  0  
1 y2 −y2 0
=Ψ dt
W (y1 , y2 ) −y10 y1 b(t)
 Z  
y1 y2 1 −y2 b(t)
= 0 dt.
y1 y20 W (y1 , y2 ) y1 b(t)

Recall that y = x1 . Therefore,

−y2 b(t)
Z Z
y1 b(t)
y = x1 = y 1 dt + y2 dt.
W (y1 , y2 ) W (y1 , y2 )

We obtained a nice formula for the 2 × 2 case which is applicable for any (continuous
or piecewise continuous) function b(t).

Example 1.1 Solve the ODE

4y 00 + y = 2 sec(t/2)

where −π < t < π.


Solution: The characteristic equation is 4λ2 + 1 = 0 whose roots are ±i/2. There-
fore yh = c1 y1 + c2 y2 = c1 cos(t/2) + c2 sin(t/2).

cos(t/2) sin(t/2) 1
W (y1 , y2 ) = 1
= .
− 2 sin(t/2) 21 cos(t/2) 2

Let us now use the formula. But note that b(t) = sec(t/2)/2 (the initial coefficient
of the ODE needs to be 1 if we wish to use the formula).

− sin(t/2) sec(t/2)/2
Z Z
cos(t/2) sec(t/2)/2
y = cos(t/2) dt + sin(t/2) dt
1/2 1/2
= cos(t/2)(2 ln | cos(t/2)| + c1 ) + sin(t/2)(t + c2 )
= c1 cos(t/2) + c2 sin(t/2) + 2 cos(t/2) ln | cos(t/2)| + t sin(t/2).

2
2 The n × n case
More generally, let us consider an nth order linear ODE
y (n) + a1 y (n−1) + . . . + an y = b(t).
Suppose that y1 , y2 , . . . , yn are n linearly independent solutions of the associated
homogenous equation. Then the fundamental matrix takes the form
 
y1 y2 ... yn
 y10 y20 ... yn0 
Ψ(t) =   ...
.
... ... ... 
(n−1) (n−1) (n−1)
y1 y2 . . . yn
We again have x = Ψ Ψ−1 bdt. It would be a lengthy computation to find all
R

entries of the vector x. On the other hand, all we need is its first entry x1 . We need
to quote one result from linear algebra in order to find x1 without finding all of x:

Theorem 2.1  (Cramer’s


 rule) Suppose that Bz = l where B is an n × n invertible
z1
 
l1
matrix, z =  ...  is a vector of unknowns and l = . . . is a given vector. Let Bi
 
zn ln
be the matrix obtained by replacing the ith column of B by the vector l. Then
det(Bi )
zi = .
det(B)

The proof will be omitted. It can be found in texts on linear algebra. (Actually,
the reader can reconstruct the proof without much difficulty: Since B is invertible,
the system must have a unique solution. Plug the proposed solution into the system
and see if it works. You will need to make one observation about determinants).
Let us apply Cramer’s rule to our case. Recall that x = Ψv. Then
Ψv0 = b.
Therefore if Ψi is the matrix obtained by replacing the ith column of Ψ by b then
det(Ψi )
vi0 = . This gives us
det(Ψ)
n Z
X det(Ψi )
y = x1 = yi dt.
i=1
det(Ψ)

3
There is one more small simplification that we can make. Notice that

y1 y 2 . . . 0 . . . y n y1 y2 ... 0 ... yn
0 0 0
0
y20 yn0

y y2 ... 0 ... yn y1 ... 0 ...
det(Ψi ) = 1 = b(t) .
...
(n−1) . . . . . . . . . . . . . . . ... ...
(n−1) (n−1) ... ... . . . . . .
y (n−1) (n−1) (n−1)
1 y2 . . . b(t) . . . yn y1 y2 ... 1 . . . yn
Let us denote the last determinant above by Wi , namely Wi is the determinant of the
 T
matrix obtained by replacing the ith column of Ψ(t) by the vector 0 0 . . . 0 1 .
Also, let us write W = det(Ψ). Then the variation of parameters formula takes the
form: n Z
X Wi
y = x1 = yi b(t) dt.
i=1
W
Note that for n = 2 this agrees with the formula found before.

Example 2.1 Solve the ODE


y (4) + 2y 00 + y = sin t.
by using variation of parameters.
Solution: First, let us find the roots of the characteristic equation:
λ4 + 2λ2 + 1 = 0
(λ2 + 1)2 = 0
λ1 = λ2 = i, λ3 = λ4 = −i.
Therefore a basis for the set of solutions of the associated homogenous equation is
y1 = cos t, y2 = sin t, y3 = t cos t, y4 = t sin t.

cos t sin t t cos t t sin t

− sin t cos t −t sin t + cos t t cos t + sin t
W = det(Ψ) =
− cos t − sin t −t cos t − 2 sin t −t sin t + 2 cos t

sin t − cos t t sin t − 3 cos t −t cos t − 3 sin t

cos t sin t t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
0 0 −2 cos t −2 sin t
= 4.

4

0 sin t t cos t t sin t

0 cos t −t sin t + cos t t cos t + sin t
W1 =
0 − sin t −t cos t − 2 sin t −t sin t + 2 cos t
1 − cos t t sin t − 3 cos t −t cos t − 3 sin t

0 sin t t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
0 cos t −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
1 0 −2 cos t −2 sin t

sin t t cos t t sin t

= − cos t −t sin t + cos t t cos t + sin t

0 −2 sin t 2 cos t

−t sin t + cos t t cos t + sin t t cos t t sin t
= − sin t + cos t

−2 sin t 2 cos t −2 sin t 2 cos t
= −2 sin t + 2t cos t.


cos t 0 t cos t t sin t

− sin t 0 −t sin t + cos t t cos t + sin t
W2 =
− cos t 0 −t cos t − 2 sin t −t sin t + 2 cos t

sin t 1 t sin t − 3 cos t −t cos t − 3 sin t

cos t 0 t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t 0 −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
0 1 −2 cos t −2 sin t

cos t t cos t t sin t

= − sin t −t sin t + cos t t cos t + sin t

0 −2 sin t 2 cos t

−t sin t + cos t t cos t + sin t t cos t t sin t
= cos t
+ sin t
−2 sin t 2 cos t −2 sin t 2 cos t
= 2 cos t + 2t sin t.

5

cos t sin t 0 t sin t

− sin t cos t 0 t cos t + sin t
W3 =
− cos t − sin t 0 −t sin t + 2 cos t
sin t − cos t 1 −t cos t − 3 sin t

cos t sin t 0 t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t 0 t cos t + sin t
=
0 0 0 2 cos t
0 0 1 −2 sin t
= −2 cos t.

cos t sin t t cos t 0

− sin t cos t −t sin t + cos t 0
W4 =
− cos t − sin t −t cos t − 2 sin t 0
sin t − cos t t sin t − 3 cos t 1

cos t sin t t cos t 0

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t −t sin t + cos t 0
=
0 0 −2 sin t 0
0 0 −2 cos t 1
= −2 sin t.

n Z
X Wi
y= yi b(t) dt
i=1
W
Z Z
cos t 2 sin t
= sin t + t sin t cos tdt + sin t cos t + t sin2 tdt
2 2
Z Z
t cos t t sin t
+ − sin t cos tdt + − sin2 tdt
2 2
sin t t2 t sin 2t 3 cos 2t
   
cos t t t cos 2t sin 2t
= − − + c1 + − − + c2
2 2 4 8 2 4 4 8
   
t cos t cos 2t t sin t sin 2t t
+ + c3 + − + c4
2 4 2 4 2

where c1 , c2 , c3 , c4 ∈ R.
We note that this particular example can also be solved by the method of undeter-
mined coefficients, which is a much faster way of finding the solution. The power of

6
variation of parameters is that it can be applied for an arbitrary right hand side. In
real life applications, the integrals can often be numerically evaluated and this gives
an effective procedure to find y once b(t) is given.

Common questions

Powered by AI

Linear algebra theory, particularly properties of determinants and matrix inverses, simplifies solving variable coefficient systems with variation of parameters by allowing us to compute solution components using Cramer's rule. Determinant properties enable us to replace matrix columns systematically to form the modified matrices required for determinant computations without directly solving complex systems. These substitutions directly yield the necessary integrals to construct the particular solution from the fundamental solutions defined in Ψ, thereby streamlining calculation efforts without extensive matrix manipulations .

To solve the ODE y(4) + 2y'' + y = sin t using variation of parameters, we first find the characteristic roots, which give us the basis for the homogeneous solution: y1 = cos t, y2 = sin t, y3 = t cos t, y4 = t sin t. We construct the fundamental matrix Ψ from these solutions and calculate its determinant W. For each Wi (determinants obtained by replacing a column in Ψ with [0 0 ... 0 1]ᵀ), we evaluate specific matrix integrals. These integrals are crucial for formulating the particular solution using the variation of parameters formula, which for this ODE results in the complex expression of y given in the example .

The roots of the characteristic equation directly influence the form of the fundamental matrix Ψ because they determine the base solutions for the associated homogeneous equation. These base solutions form the columns of Ψ. For instance, if the roots are real and distinct, the solutions are exponential functions; if they are complex, solutions incorporate sine and cosine terms. Each solution is critical in ensuring the linear independence necessary for Ψ to be invertible, which is a requisite for applying the variation of parameters effectively .

The Wronskian determinant, denoted as W(y1, y2), is crucial in the method of variation of parameters, especially to ensure the linear independence of solutions. In solving the ODE, the method uses the reciprocal of the Wronskian to express the particular integral part of the solution. It ensures that the solutions used in constructing Ψ(t) are linearly independent, which is necessary for the construction of the inverse of Ψ(t). As such, the Wronskian plays a fundamental role in defining the integral expressions that yield the particular solution .

In the 2x2 case, the fundamental matrix Ψ(t) is used to transform the second-order linear differential equation into a first-order system. Ψ(t) is constructed from two linearly independent solutions of the associated homogeneous equation and their derivatives. The variation of parameters formula, which involves Ψ(t), demonstrates that the solution can be expressed in terms of integrals involving b(t), the non-homogeneous part. Here, Ψ(t) and its inverse Ψ^{-1}(t) are crucial for computing the integrals that provide the particular solution .

Variation of parameters is advantageous in real-life applications due to its flexibility in handling arbitrary right-hand side functions, which are common in practical scenarios. Unlike other methods, it does not require the non-homogeneous term to have a specific form, making it widely applicable in engineering and physics problems where exact forms are unpredictable. Furthermore, computational challenges are addressed by numerically evaluating the resulting integrals, allowing for efficient and accurate approximations of solutions even when analytical integration is difficult or impossible .

The method of variation of parameters is more flexible than the method of undetermined coefficients because it can be applied to non-homogenous linear ODEs with arbitrary right-hand side functions, even when such functions do not have polynomial annihilators. The method of undetermined coefficients requires the non-homogeneous term to have a polynomial annihilator, limiting its applicability to functions like exponentials, polynomials, sine, and cosine; it fails with functions like 1/t, √t, or tan(t).

The ability of variation of parameters to handle piecewise continuous functions is significant because many real-world problems involve discontinuities due to sudden changes in conditions or forces, such as switching electrical circuits or piecewise-stiff springs. These functions cannot be addressed by methods that require complete continuity, limiting their applicability in practical scenarios. Consequently, variation of parameters extends the scope of solvable problems by accounting for situations where continuity is not preserved over the entire domain of the problem .

Cramer's rule simplifies solving an nth order linear ODE by allowing us to determine the particular solution's components without solving for all components of the solution vector. Specifically, in the method of variation of parameters, Cramer's rule is used to express each component vi of the solution vector in terms of determinants, which avoids inverting the entire fundamental matrix Ψ. This makes the computation of the first entry, x1, simpler as it involves directly using determinants of modified matrices by replacing one column of Ψ with the vector b(t).

In the case of the second-order ODE y'' + a1y' + a2y = b(t), we can transform it into a first-order system by setting x1 = y and x2 = y'. This converts the ODE into x' = Ax + b, where A is a 2x2 matrix formed by coefficients, and b is a vector containing the non-homogeneous component. The fundamental matrix Ψ is constructed using two linearly independent solutions and their derivatives. The variation of parameters formula, x = Ψ∫Ψ^{-1}b dt, allows computation of specific integrals, with x1 providing the solution y. As an example, with y'' + y = 2sec(t/2), we find characteristic roots ±i/2, form Ψ using corresponding sin and cos solutions, calculate the Wronskian, and derive y using integral expressions .

You might also like