Docsity

Solving Inhomogeneous ODEs: A Forced Harmonic Oscillator Example, Study notes of Calculus

Toggle sidebar
bg1
Inhomogeneous ODEs
Adrian Down
April 13, 2006
1 Linear homogeneous first order systems with
constant coefficients
1.1 Setup
Recall the situation considered last time of a system of first order differential
equations with constant coefficients. We wrote the system in matrix notation,
˙
x=Ax
where the vector xcontains the dependent variables, x1(t)x2(t)T, and A
is the matrix of coefficients of the differential equations.
In the example we considered last time, the coefficient matrix was
A=−−1
1−
1.2 Diagonalization
We assumed elementary solutions of the form
x=veλt
This led to the equation,
Av =λv
Hence the elementary solutions are found by diagonalizing A.
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Solving Inhomogeneous ODEs: A Forced Harmonic Oscillator Example and more Study notes Calculus in PDF only on Docsity!

Inhomogeneous ODEs

Adrian Down

April 13, 2006

1 Linear homogeneous first order systems with

constant coefficients

1.1 Setup

Recall the situation considered last time of a system of first order differential equations with constant coefficients. We wrote the system in matrix notation,

x˙ = Ax

where the vector x contains the dependent variables,

x 1 (t) x 2 (t)

)T

, and A is the matrix of coefficients of the differential equations. In the example we considered last time, the coefficient matrix was

A =

1.2 Diagonalization

We assumed elementary solutions of the form

x = veλt

This led to the equation,

Av = λv

Hence the elementary solutions are found by diagonalizing A.

We also saw by taking the complex conjugate of the eigenvalue equation, that if v is an eigenvector with corresponding eigenvalue λ, then the complex conjugate v∗^ is also an eigenvector with corresponding eigenvalue λ∗ In the case that we considered previously, we found the solutions to be,

x 1 =

−ı

e(−+ı)t^ x 2 =

ı

e(−−ı)t

1.3 Real solutions

It is often more useful to express the complex solutions as purely real func- tions, especially in the case of physical problems. Notice that the real an imaginary parts of the solution are themselves solutions,

x˙ = Ax ⇒ (<˙x) = A(<x)

A similar argument holds for the imaginary part of the solution. The final solution will be a linear combination of these two solutions. In this particular example, the real and imaginary components of the solution are,

<x 1 =

e−t^ cos t e−t^ sin t

=x 1 =

e−t^ sin t −e−t^ cos t

In this case, we took the real an imaginary components of only the first solution. However, the components of the second solution give no new infor- mation. Considering the second solution,

x 2 =

ı

e(−−ı)t^ =

e−t(cos t − ı sin t) e−t(cos t + ı sin t)

Taking the real and imaginary components,

<x 2 =

e−t^ cos t e−t^ sin t

=x 2 =

−e−t^ sin t e−t^ cos t

The real component is the same as that obtained from x 1. The imaginary component is the negative of that obtained from x 1. This negative could be absorbed into the coefficient in a linear combination of solutions. Hence these two solutions give no new information relative to those obtained from x 1.

v = ˙y. With this definition, we can rewrite the differential equation and solve for ˙y,

v˙ + y = f (t) ⇒ v˙ = −y + f (t)

We can now formulate the system in matrix notation, ( y˙ v ˙

y v

f

Note. In the general case of the method demonstrated in this example, we would be solving the matrix equation

y˙ = Ay + f

where A is an n × n matrix, and y is an n × 1 matrix.

2.3 Solution

2.3.1 Homogeneous case

We could now solve the system by diagonalizing A and using the methods developed previously. However, it will be more instructive (and simpler) to use some mathematical intuition. In the homogeneous case, the differential equation becomes,

f = 0 ⇒ y = Ay

In the case of our particular example,

y˙ = v v˙ = −y

The trig functions satisfy these relations, so assume solutions of the form,

y 1 =

cos t − sin t

y 2 =

sin t cos t

These are two linearly independent solutions. We can form the matrix of homogeneous solutions,

S =

y 1 y 2

Note. This portion of the example is a particular case of the general situation x˙ = A(t)x in which A is a time-depend n × n matrix. The initial value problem

x(0) = ei =

← ith position

has a solution Si(t). We can then form the solution matrix,

S =

S 1 (t)... Sn(t)

By construction, the solution matrix satisfies the homogeneous differential equation,

S˙ =

S˙ 1... S˙n

AS 1... ASn

= A

S 1... Sn

= AS

2.3.2 Inhomogeneous case

We now want to solve the inhomogeneous differential equation,

y˙ = A(t)y + f (t)

We seek a solution of the form

y = S(t)c(t)

The matrix c is the set of coefficients of the homogeneous solutions contained in the matrix S. In the homogeneous case, c is a matrix of constants. In the inhomogeneous case, we allow c to be a function of time. To determine the solution y(t), we must determine the behavior of c. It is possible to show that matrices obey the product rule,

y˙ = S c˙ + Sc˙

y(t) = S(t)y 0 +

∫ (^) t

0

S(t)S−^1 (t′)f (t′)dt′

Note. The solution to the vector case has the same general form as that which we obtained in the scalar case,

y(t) = e−P^ (t)y 0 +

∫ (^) t

0

e−P^ (t)+P^ (t ′) f (t′)dt′

2.4 Particular example

We return now to the particular example that we were considering earlier. Forming the matrix of solutions,

S =

cos t sin t − sin t cos t

Recognize the solution matrix S as the matrix representation of a rotation through an angle −t. This realization allows us to easily form the inverse S−^1 and its product with S,

S(t) ︸︷︷︸ rot. by −t

S−^1 (t′) ︸ ︷︷ ︸ rot. by t′

= S(t − t′) =

cos(t − t′) sin(t − t′) − sin(t − t′) cos(t − t′)

Forming the product with f (t′),

S(t)S(t′)f (t′) = S(t − t′)

=

cos(t − t′) sin(t − t′) − sin(t − t′) cos(t − t′)

f (t′)

f (t′) sin(t − t′) f (t′) cos(t − t′)

Suppose we are given the initial conditions

y(0) = 0 y˙(0) = v(0) = 0

⇒ y(0) ≡ 0

This corresponds to the case that the particle is initially at rest.

The final form of the solution is,

y(t) =

∫ (^) t

0

f (t′) sin(t − t′)dt′

Imagine the case that the particle is initially at rest and then it receives a sharp impulse at t = t′, from a hammer blow, for example. The solution takes the form,

y(t) =

0 t ≤ t′ ∝ sin(t − t′) t > t′

An arbitrary forcing function can be considered as a superposition of many short impulses.