Prelims Introductory Calculus 2012MT
Prelims Introductory Calculus 2012MT
Prelims Introductory Calculus 2012MT
(x)dx = f(x) + C
where C is an arbitrary constant.
The chain rule for derivatives implies that the dierential of a function is invariant under
substitutions. More precisely, suppose y = f(x) is a function of x, making substitution x = g(t) so
that y = f(g(t)) is a function of t . Then dx = g
(t)dt so that
dy = f
(x)dx = f
(g(t))g
(t)dt
=
d
dt
f(g(t))dt. [Chain rule]
That is df(x) = df(g(t)) if x = g(t), in other words, when we work out the dierential df(x) it
doesnt matter if we consider x as a variable or as a function of another variable. This principle
also applies to dierential forms of rst order. The substitution method then can be summarized
as the following equality
_
f(x)dx = [Substitute x = (t)]
_
f((t))d(t)
=
_
f((t))
(t)dt.
There is a similar version for denite integrals.
Example 1.1 Evaluate I =
_
1
0
dx
42xx
2
.
1
The integral is close to the integral
_
dx
1x
2
which equals sin
1
x up to a constant, so we attempt
to use this known integral. By completing square we may write
4 2x x
2
= 5 (x + 1)
2
= 5
_
1
_
x + 1
5
_
2
_
,
making substitution t =
x+1
5
, dx =
5dt, where t :
1
5
2
5
, we have
I =
1
5
_ 2
5
1
5dt
1 t
2
=
_ 2
5
1
5
dt
1 t
2
= sin
1
2
5
sin
1
1
5
.
Now let us recall the technique of integration by parts, which is in many aspects the soul of
the analysis. Integration by parts is the integral form of the product rule for derivatives, since
(fg)
= f
g + fg
so that
f(x)g(x) =
_
g(x)f
(x)dx +
_
f(x)g
(x)dx
rearranging the terms to obtain
_
f(x)g
(x)dx = f(x)g(x)
_
g(x)f
(x)dx.
Similarly we have
_
b
a
f(x)g
(x)dx = f(x)g(x)|
b
a
_
b
a
g(x)f
(x)dx,
or in terms of dierentials we can rewrite the preceding formula as
_
b
a
f(x)dg(x) = f(x)g(x)|
b
a
_
b
a
g(x)df(x).
However there is no general rule to tell us how to split an integrand into g
(x)f(x).
Example 1.2 Consider I =
_
xe
x
dx. Then
I =
_
xde
x
= xe
x
_
e
x
dx
= (x 1)e
x
+ C.
Example 1.3 Now let us consider I
n
=
_
x
n
e
x
dx where n = 1, 2, 3, . Using integration by parts
I
n
=
_
x
n
de
x
= x
n
e
x
_
e
x
dx
n
= x
n
e
x
n
_
x
n1
e
x
dx
= x
n
e
x
nI
n1
2
which gives a reduction formula. By repeating the use of integration by parts, one can eventually
work out the result. For example
I
2
= x
2
e
x
2I
1
=
_
x
2
2(x 1)
_
e
x
+ C
and
I
3
= x
3
e
x
3I
2
=
_
x
3
3
_
x
2
2(x 1)
_
e
x
+ C
etc.
Example 1.4 Consider I
n
=
_
cos
n
xdx where n is a non-negative integer. Split the integrand
cos
n
x into cos
n1
xcos x = cos
n1
x(sin
x)dx =
_
cos
n1
xd sin x
= cos
n1
xsin x
_
sin xd cos
n1
x
= cos
n1
xsin x (n 1)
_
sin xcos
n2
x(sin x)dx
= cos
n1
xsin x + (n 1)
_
sin
2
xcos
n2
xdx.
Applying the identity sin
2
x = 1 cos
2
x in the last integral, we obtain
I
n
= cos
n1
xsin x + (n 1)
_
(1 cos
2
x) cos
n2
xdx
= cos
n1
xsin x + (n 1)I
n2
(n 1)I
n
.
Collecting I
n
together to obtain
nI
n
= (n 1)I
n2
+ cos
n1
xsin x
so that
I
n
=
n 1
n
I
n2
+
1
n
cos
n1
xsin x
which reduces the calculation of I
n
to I
0
or I
1
, both are easy to evaluate. For example
_
/2
0
cos
n
xdx =
n 1
n
_
/2
0
cos
n2
xdx +
1
n
cos
n1
xsin x
/2
0
=
n 1
n
_
/2
0
cos
n2
xdx =
=
_
n1
n
n3
n2
_
/2
0
cos xdx if n = old,
n1
n
n3
n2
_
/2
0
dx if n = even.
3
Example 1.5 Consider I =
_
e
x
sin xdx. We have
I =
_
e
x
d cos x = e
x
cos x +
_
e
x
cos xdx
= e
x
cos x +
_
e
x
d sin x
= e
x
cos x + e
x
sin x
_
e
x
sin xdx
= e
x
cos x + e
x
sin x I
so that
2I = e
x
cos x + e
x
sin x + C.
2 First order dierential equations
A (ordinary) dierential equation is an equation involving an independent variable x, a function
y(x) and its derivatives:
F(x, y, y
, , y
(n)
) = 0.
By solving the highest order derivative y
(n)
in terms of lower order derivatives y
(k)
for k < n and
x, the above equation may be written as
y
(n)
= f(x, y, y
, , y
(n1)
). (2.1)
Such an equation is called an n-th order dierential equation. If n = 1, then it is called a rst order
dierential equation. Thus a rst order dierential equation has the general form y
= f(x, y), or
implicitly F(x, y, y
) = 0.
A function y = (x) dened on some interval J is called a solution of (2.1) if
(n)
(x) = f(x, (x),
(x), ,
(n1)
(x)) x J.
A function y = (x) which contains n independent arbitrary constants C
1
, , C
n
is called the
general solution of (2.1) if 1) it is a solution for any arbitrary choice of C
1
, , C
n
, 2) any solution
of (2.1) has this form.
The concept of general solutions is not very useful. We are often interested in the so-called initial
problems or boundary problems. Observe that in order to determine the constants C
1
, , C
n
in
general we need n conditions which appear as initial conditions. More precisely, an initial condition
for n-th order dierential equation (2.1) may be formulated as
y(x
0
) = y
0
, , y
(n1)
(x
0
) = y
n1
where x
0
J and y
0
, , y
n1
are given data.
A dierential equation is called an (inhomogenous) linear dierential equation, if it is linear in
y, y
, , y
(n)
, so that a linear dierential equation can be written as the following general form
a
n
(x)y
(n)
+ a
n1
(x)y
(n1)
+ + a
0
(x)y = h(x)
where a
n
, , a
0
and h are functions of x. If h 0, then the linear equation is homogenous.
A rst order linear dierential equation can be thus put in the following general form
y
+ p(x)y = q(x).
4
2.1 Separable rst order DE
Consider a rst order dierential equation
dy
dx
= f(x, y). It is separable if f(x, y) = a(x)b(y), so that
dy
dx
= a(x)b(y). Dividing the equation by b(y) and multiplying it by dx to separate the variables x
and y and write the equation to be
dy
b(y)
= a(x)dx.
Integrating both sides of the equation to obtain the solution given by
_
dy
b(y)
=
_
a(x)dx
which gives in general solutions of a separable equation implicitly. If y
0
is a root to b(y) = 0, then
clearly the constant function y = y
0
is also a solution.
Example 2.1 Find the general solution to
x(y
2
1) + y(x
2
1)
dy
dx
= 0.
The equation is separable and can be rearranged as
xdx
x
2
1
+
ydy
y
2
1
= 0.
After integration we obtain
ln |x
2
1| + ln |y
2
1| = C
(C is a constant), which can be put in the form
(x
2
1)(y
2
1) = C.
The constant functions y = 1 or y = 1 are solutions but are already included in the above general
form with C = 0.
Example 2.2 Find the solution to (1 + e
x
)yy
= e
x
satisfying the initial condition that y(0) = 1.
The equation is separable:
ydy =
e
x
1 + e
x
dx.
After integration we obtain the general solution
1
2
y
2
= ln(1 + e
x
) + C.
To match the initial condition, we set x = 0 and y = 1 in the general solution to determine the
constant C =
1
2
ln 2, so that
1
2
y
2
= ln(1 + e
x
) +
1
2
ln 2. After simplication we have
y
2
= ln
_
e
4
(1 + e
x
)
2
_
.
Some dierential equations of rst order can be transformed by proper substitutions to separable
equations.
5
Example 2.3 Find the general solution to y
= sin(x + y + 1).
Let u(x) = x+y(x) +1 so that u
= 1 +y
= 1 +sin u which is separable. Dividing the equation by 1 +sin u and write the equation
as
du
1 + sin u
= dx.
Integrating the equation we obtain
_
du
1 + sin u
=
_
dx.
Let us evaluate the integral on the left hand side.
_
du
1 + sin u
=
_
(1 sin u)du
(1 + sin u)(1 sin u)
=
_
(1 sin u)du
1 sin
2
u
=
_
(1 sin u)du
cos
2
u
=
_
du
cos
2
u
_
sin udu
cos
2
u
=
_
du
cos
2
u
+
_
d cos u
cos
2
u
= tan u
1
cos u
+ C.
Therefore
tan u
1
cos u
= x + C
or in terms of y and x, the solution is given by
tan(x + y + 1)
1
cos(x + y + 1)
= x + C
or
sin(x + y + 1) 1 = (x + C) cos(x + y + 1).
We also have solutions x + y + 1 = 2n
2
where n =integers.
2.2 Homogenous equations
Consider a rst order dierential equation
dy
dx
= f(x, y). If the function f(x, y) (of two variables)
is homogenous, i.e. f(x, y) = h(
y
x
) where h is a function of one variable, then we can make a
substitution u(x) =
y(x)
x
so that y = xu. The product rule gives that
dy
dx
= u + x
du
dx
, and the
equation may be written as
u + x
du
dx
= f(u)
which is separable.
Example 2.4 Find general solutions to xy
=
_
x
2
y
2
+ y. The equation, by dividing x both
sides, is homogenous
y
=
_
1
_
y
x
_
2
+
y
x
6
so we make substitution u =
y
x
and change equation to be
u + x
du
dx
=
_
1 u
2
+ u.
Rearrange the equation:
du
1u
2
=
dx
x
. Integrating both sides to obtain
sin
1
u = ln |x| + C
or in terms of y, general solutions are given by sin
1
(
y
x
) = ln |x| +C, together with solutions
y
x
= 1
and
y
x
= 1.
Some dierential equations of rst order can be transformed into homogenous ones by simple
substitutions.
For example, consider the following type of rst order dierential equations
dy
dx
= f
_
a
1
x + b
1
y + c
1
a
2
x + b
2
y + c
2
_
.
If c
1
= c
2
= 0 then the equation is homogenous, so we consider the case that c
1
or c
2
does not
vanish. If
a
1
b
1
a
2
b
2
= 0
and b
1
= 0, then we make substitution u(x) = a
1
x+b
1
y(x) to transform the equation to a separable
one. For the the case where
a
1
b
1
a
2
b
2
= 0
we make translation x = t + k and y = z + l such that
_
a
1
k + b
1
l + c
1
= 0,
a
2
k + b
2
l + c
2
= 0.
Consider t as a new independent variable, and z as a function of t, then
z(t) = y(x) l = y(t + k) l
therefore, by chain rule,
dz
dt
=
dy
dx
.
The dierential equation we are interested becomes
dz
dt
= f
_
a
1
t + b
1
z
a
2
t + b
2
z
_
which is homogenous.
Example 2.5 Find the general solution to
y
= 2
_
y + 2
x + y 1
_
2
.
7
Solve the linear system
_
l + 2 = 0,
k + l 1 = 0
to obtain l = 2 and k = 3. Let x = t + 3 and y = z 2. Then the dierential equation can be
written as
z
= 2
_
z
t + z
_
2
which is homogenous. Now making standard substitution u(t) =
z(t)
t
, so that z
= u + tu
and
u + t
du
dt
=
2u
2
(1 + u)
2
which is separable. Rearrange the equation
t
du
dt
=
2u
2
u(1 + u)
2
(1 + u)
2
=
u(1 + u
2
)
(1 + u)
2
and separate the variables to obtain
(1 + u)
2
u(1 + u
2
)
du =
dt
t
. (2.2)
Since
_
(1 + u)
2
u(1 + u
2
)
du =
_ _
1
u
+
2
1 + u
2
_
du
= ln |u| + 2 tan
1
u
therefore, by integrating the equation (2.2) we obtain
ln |u| + 2 tan
1
u = ln |t| + C.
In terms of x and y the general solution is given by
ln |y + 2| + 2 tan
1
y + 2
x 3
= C.
2.3 Linear dierential equations of rst order
Consider a linear dierential equation of rst order
dy
dx
+ p(x)y = q(x) (2.3)
where p and q are two continuous functions. The corresponding homogenous equation
dz
dx
+p(x)z = 0
is separable, and has the general solution
z(x) = Ce
p(x)dx
8
where
_
p(x)dx is a primitive of p(x), and C is an arbitrary constant. It follows that z(x)e
p(x)dx
is a constant, so that
d
dx
_
z(x)e
p(x)dx
_
= 0
which is in turn equivalent to the homogenous equation z
+ p(x)z = 0.
Next we consider the inhomogenous equation (2.3). The previous discussion suggests to consider
the dierential of y(x)e
p(x)dx
, and by employing the product rule for derivatives, we obtain
d
dx
_
y(x)e
p(x)dx
_
= e
p(x)dx
_
dy
dx
+ p(x)y
_
= q(x)e
p(x)dx
(2.4)
so by integrating the equation both sides we obtain
ye
p(x)dx
=
_
q(x)e
p(x)dx
dx + C
dividing by e
p(x)dx
the equality to obtain the general solution of (2.3)
y = e
p(x)dx
__
q(x)e
p(x)dx
dx + C
_
. (2.5)
The function e
p(x)dx
which is multiplied to y to form ye
p(x)dx
is called an integrating factor
to the inhomogenous equation (2.3).
We may describe the above procedure to obtain general solutions for rst order linear dierential
equations as following, which includes an idea that can be applied to other dierent situations, thus
are worthy of learning.
Observe that z(x) = e
p(x)dx
is a non-trivial solution to the corresponding homogenous equa-
tion z
+p(x)z = 0, in order to obtain the general solution to the inhomogenous one (2.3), we make
use of the solution z(x): making substitution
u(x) =
y(x)
z(x)
(2.6)
(which is a standard substitution as long as z is a known function which has some thing to do with
the dierential equation we are interested. We will use this idea in several occasions later on), and
turn (2.3) into a dierential equation in u. Of course, according to the explicit form of z(x) we
have u(x) = y(x)e
p(x)dx
and (2.4) just says that
u
= q(x)e
p(x)dx
which can be integrated to obtain the solution u.
Example 2.6 Solve dierential equation y
+ 2xy = 2xe
x
2
.
First work out an integrating factor r(x) = e
2xdx
= e
x
2
. Multiplying r(x) both sides the
equation we obtain
e
x
2
y
+ 2xe
x
2
y = 2x
9
that is
d
dx
e
x
2
y = 2x.
After integration we have
e
x
2
y = x
2
+ C
so that y =
_
x
2
+ C
_
e
x
2
is the general solution.
Example 2.7 Bernoullis equation is a non-linear rst order equation
dy
dx
+ p(x)y = q(x)y
n
where n = 0 or 1 (but not necessary an integer).
Dividing by y
n
, the equation becomes
1
y
n
dy
dx
+ p(x)y
1n
= q(x)
By using transformation z = y
1n
the equation is transformed to a linear equation
dz
dx
+ (1 n)p(x)z = (1 n)q(x)
so that
y
1n
= e
(1n)
p(x)dx
_
(1 n)
_
q(x)e
(1n)
p(x)dx
dx + C
_
.
3 Linear dierential equations
Dierential equations of second order play a special role in science. Many physical equations are
second order ordinary or partial dierential equations, such as the dynamics described by Newtons
law of gravity, uid dynamics which are determined by the uid equations: Navier-Stokes equations.
3.1 Structure of general solutions to linear dierential equations
Let us rst describe the structures of solutions to linear dierential equations. Recall the general
linear dierential equation of order n is an equation that can be written
a
n
(x)y
(n)
+ + a
1
(x)y
+ a
0
(x)y = f(x) (3.1)
where a
i
are continuous functions (on some interval) and a
n
= 0.
Suppose y
p
is a particular solution of (3.1), then clearly, y is a solution to (3.1) if and only if
y y
p
is a solution to the corresponding homogenous linear DE of n-th order
a
n
(x)y
(n)
+ + a
1
(x)y
+ a
0
(x)y = 0. (3.2)
If y
1
and y
2
are two solutions to (3.2), then so is y
1
+ y
2
, and moreover, there are n solutions
y
1
, , y
n
of (3.2) such that the general solution
y = C
1
y
1
+ + C
n
y
n
10
where C
1
, , C
n
are arbitrary constants. That is, the collection of all solutions to a homogenous
linear equation of n-th order is a vector space of dimension n. It follows that the general solution
to (3.1) is given by
y = C
1
y
1
+ + C
n
y
n
+ y
0
where y
p
is a particular solution of (3.1), C
1
y
1
+ + C
n
y
n
is the general solution to the corre-
sponding homogenous equation (3.2).
Let us investigate again the general observation we have used to solve general linear dierential
equation of rst order. That is, if there is a non-trivial function z(x) which has some connection
to the dierential equation we are interested (for example, for a linear equation, the function may
be a solution to the corresponding homogenous equation), we can make use of the known function
in a canonical way by making substitution that u(x) =
y(x)
z(x)
.
Obviously the constant zero function is a trivial solution to any homogenous linear equation
which of course give us no additional information about the solutions. Suppose however we know,
say by inspection, a non-trivial solution z(x) to the homogenous equation (3.2), then we may reduce
the equation to a lower order dierential equation. Let us demonstrate this idea for homogeneous
second order dierential equations, for simplicity.
Suppose z(x) = 0 is a non-trivial solution to a homogenous linear dierential equation of second
order
p(x)
d
2
y
dx
2
+ q(x)
dy
dx
+ r(x)y = 0. (3.3)
Making the standard substitution u(x) =
y(x)
z(x)
, so that, y = uz. Then y
= u
z + uz
and
y
= u
z + 2u
+ uz
z + 2u
+ uz
_
+ q(x)
_
u
z + uz
_
+ r(x)uz = 0.
Rearrange the above equation and use the fact that z is a solution to (3.3)
p(x)z(x)
d
2
u
dx
2
+
_
2p(x)z
(x) + q(x)z(x)
_
du
dx
= 0 (3.4)
which is a homogenous dierential equation of rst order for unknown function
du
dx
.
Example 3.1 Verify that z(x) =
1
x
is a solution to
xy
+ 2(1 x)y
2y = 0
hence nd its general solution.
Since z
= x
2
and z
= 2x
3
we can easily see that z is a solution. Making substitution
y(x) =
1
x
u(x) in the equation we obtain a dierential equation for u:
x
1
x
d
2
u
dx
2
+
_
2x
2
x + 2(1 x)
1
x
_
du
dx
= 0.
Let w =
du
dx
and simplify the above equation:
dw
dx
2w = 0
11
which is separable, and has a general solution w(x) = C
1
e
2x
. Integrating w to obtain
u(x) =
_
w(x)dx = C
1
e
2x
+ C
2
so that
y(x) =
1
x
_
C
1
e
2x
+ C
2
_
(3.5)
is the general solution, where C
1
and C
2
are arbitrary constants.
Example 3.2 Find the general solution to the inhomogenous linear equation
xy
+ 2(1 x)y
2y = 12x.
We have found the general solution to the corresponding homogenous equation which is given
by (3.5), thus, according to the structure of solutions to linear equations, we only need to nd a
particular solution. Since the coecients of the equation are all polynomials in x so we may look
for a solution with a form y(x) = ax+b where a, b are constants. Plugging into the equation y
= 0,
y
+ a
0
y = 0 (3.6)
where a
n1
, , a
0
are constants, we can construct its general solution if we can nd the roots to
the auxiliary equation
m
n
+ a
n1
m
n1
+ + a
1
m + a
0
= 0. (3.7)
The auxiliary equation comes from the following observation. Since the derivative of e
mx
is me
mx
it is thus reasonable to search for a solution y = e
mx
. Substitute y
(k)
= m
k
e
mx
into (3.6) we have
_
m
n
+ a
n1
m
n1
+ + a
1
m + a
0
_
e
mx
= 0
thus e
mx
is a solution if and only if m is a root to (3.7) and as long as m is real. If m = +i is a
complex root of the auxiliary equation, then since the coecients a
n1
, , a
0
are real numbers, so
that m = i is also a root. Now the complex functions e
mx
and e
mx
both satisfy the dierential
equation (3.6) so that the real part and imaginary parts of
e
mx
= e
x
cos(x) + ie
x
sin(x)
12
(Eulers equation) are solutions of (3.6), i.e. if m = + i is a complex root of the auxiliary
equation, then
y
1
(x) = e
x
cos(x)
and
y
2
(x) = e
x
sin(x)
are a pair of solutions of (3.6).
If m is a repeated root to the auxiliary equation with multiplicity k 2, then e
mx
, xe
mx
, , x
k1
e
mx
are solutions. The similar conclusion is valid for complex roots. We therefore are able to construct
n linearly independent solutions to (3.6) via the roots to the auxiliary equation.
Example 3.3 Consider the harmonic motion described by
d
2
y
dx
2
+
2
y = 0
where = 0 is real. The auxiliary equation is m
2
+
2
= 0 which has two complex roots m = i
and m. So we have two independent solutions cos x and sin x and the general solution
y(x) = Acos x + B sin x
where A, B are arbitrary constants.
Example 3.4 Solve the equation
d
3
y
dx
3
4
d
2
y
dx
2
+
dy
dx
+ 6y = 0.
The auxiliary equation
m
3
4m + m + 6 = 0
has roots 1, 2, 3 so the general solution
y(x) = C
1
e
x
+ C
2
e
2x
+ C
3
e
3x
.
The situation for second ED with constant coecients is particularly simple. Consider the
homogenous linear equation
d
2
y
dx
2
+ a
dy
dx
+ by = 0 (3.8)
where a, b are two real numbers.
Theorem 3.5 Suppose the auxiliary equation
m
2
+ am + b = 0
has two roots m
1
and m
2
.
1) If m
1
= m
2
are real, then the general solution is given by
y(x) = C
1
e
m
1
x
+ C
2
e
m
2
x
.
13
2) If m = m
1
= m
2
is a repeated real root, then the general solution
y(x) = (C
1
+ C
2
x) e
mx
.
3) If m
1
= + i is a complex root ( = 0) so that m
2
= i, then the general solution
y(x) = e
x
(C
1
cos x + C
2
sin x) .
Proof. Note that a = (m
1
+ m
2
) and b = m
1
m
2
. We consider 1) and 2) rst. In this case
e
m
1
x
is a solution, so we make substitution y(x) = u(x)e
m
1
x
in the dierential equation. Since
y
=
_
u
+ m
1
u
_
e
m
1
x
and
y
=
_
u
+ 2m
1
u
+ m
2
1
u
_
e
m
1
x
we obtain
_
u
+ 2m
1
u
+ m
2
1
u
_
+ a
__
u
+ m
1
u
__
+ bu = 0.
Using the fact that
1
is a root and that a = (m
1
+ m
2
), we have
u
(m
2
m
1
) u
= 0.
Thus, if m
2
m
1
= 0,
u
(x) = C
1
e
(m
2
m
1
)x
and integrating the equation to obtain
u(x) = C
1
e
(m
2
m
1
)x
+ C
2
which proves 1). If m
2
m
1
= 0 then u
12
169
cos 3x
5
169
sin 3x.
Example 3.9 Let us now consider
d
2
y
dx
2
+ 4y = sin 2x.
We have seen that cos 2x is a solution to the corresponding homogenous equation, so we look
for a particular solution
y
p
(x) = Axcos 2x + Bxsin 2x.
Then B = 0 and A =
1
4
, so the general solution
y(x) = C
1
cos 2x + C
2
sin 2x
1
4
xcos 2x.
15
Example 3.10 Find a particular solution to
d
2
y
dx
2
+ 4y = sin x + sin 2x .
By a simple inspection, y
1
=
1
3
sin x is a particular solution to
d
2
y
dx
2
+ 4y = sin x
and we know from the previous example y
2
=
1
4
xcos 2x is a particular solution to
d
2
y
dx
2
+ 4y = sin 2x.
Thus
y
p
=
1
3
sin x
1
4
xcos 2x
is a particular solution.
Example 3.11 Let us consider inhomogenous linear equation
d
2
y
dx
2
3
dy
dx
+ 2y = f(x)
where f(x) is a given function. The auxiliary equation m
2
3m + 2 = 0 has two real roots 1 and
2, so the general solution to the corresponding homogenous equation is C
1
e
x
+ C
2
e
2x
.
1) Suppose f(x) = sin x which is the imaginary part of e
ix
, since i is not a root of the auxiliary
equation, so we may search for a particular solution y
p
= Asin x + B cos x, but not just Asin x
which is not good.
2) f(x) = e
3x
. Since 3 is not a root of the auxiliary equation, so search for a particular solution
y
p
= Ae
3x
. If however f(x) = e
2x
, then we may attempt a particular solution y
p
= Axe
2x
as e
2x
is
a solution to the corresponding homogenous equation.
3) f(x) = xe
2x
. Since 2 is a root of the auxiliary equation, so we may search for a particular
solution in a form y
p
= (Ax
2
+ Bx)e
2x
(we have included Bxe
2x
as well, since e
2x
is a solution to
the homogenous equation, but not xe
2x
).
4) f(x) = e
x
sin x which is the imaginary part of e
(1+i)x
and 1 + i is not a root of the auxiliary
equation, so we may search for a particular solution y
p
= (Acos x + B sin x)e
x
.
5) f(x) = sin
2
x. Since sin
2
x =
1
2
cos 2x, so we may attempt a particular solution with a form
y
p
= A + B cos 2x + C sin 2x.
4 Some facts about matrices
An mn matrix A is an array of numbers arranged into m rows and n columns
A =
_
_
_
_
_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
a
m1
a
m2
a
mn
_
_
_
_
_
16
and simply written as A = (a
ij
), where a
ij
is the entry in the ith row and jth column. If m = n,
then A is called a square matrix.
Let us concentrate on 22 matrices. You will learn the general theory about matrices in linear
algebra (topics in your paper Mathematics I).
First of all, we have elementary operations among 2 2 matrices: if
A =
_
a
11
a
12
a
21
a
22
_
, B =
_
b
11
b
12
b
21
b
22
_
then we can form a matrix A + B by simply adding their corresponding entries
A + B =
_
a
11
+ b
11
a
12
+ b
12
a
21
+ b
21
a
22
+ b
22
_
.
If is a number we may form a matrix
A =
_
a
11
a
12
a
21
a
22
_
.
That is AB = (a
ij
b
ij
) and A = (a
ij
). The more interesting operation is the multiplication
of two matrices, dened as the following
AB =
_
a
11
a
12
a
21
a
22
__
b
11
b
12
b
21
b
22
_
=
_
a
11
b
11
+ a
12
b
21
a
11
b
12
+ a
12
b
22
a
21
b
11
+ a
22
b
21
a
21
b
12
+ a
22
b
22
_
.
That is, if AB = (c
ij
) then the entry
c
ij
= (a
i1
, a
i2
)
_
b
1j
b
2j
_
= dot product of (a
i1
, a
i2
) and (b
1j
, b
2j
).
Example 4.1 Let
A =
_
2 1
1 3
_
and B =
_
0 3
2 5
_
Find A + B, AB, A, AB and BA.
In general we have A + B = B + A, C(A + B) = AC + CB, (AB)C = A(BC), but the
multiplication of matrices is in general not commutative.
The determinate of a 2 2 matrix A is denoted by det(A) or |A| dened by
det(A) =
a
11
a
12
a
21
a
22
= a
11
a
22
a
12
a
21
.
The mapping A |A| is not additive, but it is multiplicative i.e.
det(AB) = det(A) det(B) = det(BA).
17
We will use I to denote the identity matrix
_
1 0
0 1
_
.
It is trivial that IA = AI for any 2 2 matrix. Clearly |I| = 1.
Given a 2 2 matrix A, we say a 2 2 matrix B (if ever exists) is an inverse matrix of A if
AB = BA = I. Since det(AB) = det(A) det(B), so that a necessary condition for the existence of
an inverse matrix to A is that det(A) = 0. It turns out this condition is also sucient.
Theorem 4.2 Let A = (a
ij
) be a 2 2 matrix. Then A has an inverse matrix if and only if
det(A) = 0. In this case, the inverse matrix is unique and thus is denoted by A
1
, given by
A
1
=
1
det(A)
_
a
22
a
12
a
21
a
11
_
.
Proof. By a direct computation we can see that A
1
dened as above is an inverse matrix. If
B is an inverse of A, then
B = B(AA
1
) = (BA)A
1
= IA
1
= A
1
so the inverse matrix is unique.
We observe that det(A) = 0, i.e. a
11
a
22
= a
21
a
12
means two row vectors
_
a
11
a
21
_
and
_
a
21
a
22
_
are proportional, that is, they are linearly dependent.
Let us consider R
2
as the vector space of row vectors v =
_
v
1
v
2
_
(also consider as 21 matrix).
Let A = (a
ij
) be a 2 2 matrix. Then we associate A a linear mapping from R
2
R
2
denoted by
A and dened by
Av =
_
a
11
a
12
a
21
a
22
__
v
1
v
2
_
=
_
a
11
v
1
+ a
12
v
2
a
21
v
1
+ a
22
v
2
_
.
Proposition 4.3 Let A = (a
ij
) be a 2 2 matrix.
1) The linear system Av = 0 has no zero solutions if and only if det(A) = 0.
2) The linear system Av = v has no trivial solution v = 0 if and only if is an eigenvalue
of A, that is, det(A I) = 0 (which is called the characteristic equation of A). In this case, v is
called an eigenvector (corresponding to the eigenvalue ).
A square matrix A = (a
ij
) is diagonal if a
ij
= 0 for any i = j.
Theorem 4.4 Suppose a 2 2 matrix A = (a
ij
) has distinct real eigenvalues
1
and
2
, and let
v
i
=
_
v
1i
v
2i
_
be corresponding vectors with eigenvalues
i
(i = 1, 2). Let
P =
_
v
1
v
2
_
=
_
v
11
v
12
v
21
v
22
_
.
Then
P
1
AP =
_
1
0
0
2
_
.
18
Proof. First show that P is invertible, which is equivalent to that v
1
and v
2
are linearly
independent. Suppose v
1
+ v
2
= 0, so that Av
1
+ Av
2
= 0. Hence
1
v
1
+
2
v
2
= 0. It
follows that (
2
1
)v
2
= 0, so that = 0 and similarly = 0. Therefore v
1
and v
2
are linearly
independent, and P
1
exists.
By denition
AP = A
_
v
1
v
2
_
=
_
Av
1
Av
2
_
=
_
1
v
1
2
v
2
_
= P
_
1
0
0
2
_
.
Since P
1
exists so that
P
1
AP =
_
1
0
0
2
_
.
Example 4.5 Find all the eigenvalues and eigenvectors for the following matrices
A =
_
2 1
6 3
_
, B =
_
2 1
0 2
_
and C =
_
0 1
1 0
_
.
5 Systems of linear dierential equations
Consider a linear dierential equation of order n:
y
(n)
+ a
n1
y
(n1)
+ + a
0
y = f(t).
By introducing functions y
k
= y
(k)
where k = 0, , n 1, the previous linear equation of order
n is equivalent to the following system of linear equations of rst order:
_
_
y
n1
= a
n1
y
n1
a
0
y
0
+ f(t),
y
n2
= y
n1
,
y
0
= y
1
.
For example, a second order linear dierential equation
d
2
y
dt
2
+ a
dy
dt
+ by = f(t)
is equivalent to the system
_
dx
dt
= ax by + f(t)
dy
dt
= x.
In terms of matrix notations, it can be written as
__
dx
dt
dy
dt
_
=
_
a b
1 0
__
x
y
_
+
_
f(t)
0
_
.
19
Example 5.1 Solve the following initial value problem
_
dx
dt
= 3x + y,
dy
dt
= 6x + 4y,
x(0) = 1;
y(0) = 1.
Method 1. From the rst equation, substitute y =
dx
dt
3x to the second equation, to obtain
d
2
x
dt
2
3
dx
dt
= 6x + 4
dx
dt
12x
so x solves the homogenous linear equation of second order
d
2
x
dt
2
7
dx
dt
+ 6x = 0
whose auxiliary equation has roots 1 and 6, so x(t) = C
1
e
t
+ C
2
e
6t
. Since x(0) = 1 and x
(0) =
y(0) + 3x(0) = 4 we have
C
1
+ C
2
= 1, C
1
+ 6C
2
= 4.
Method 2. By chain rule (or the invariance of rst order dierentials) we have
dy
dx
=
dy
dt
dx
dt
=
6x + 4y
3x + y
which is homogenous. By substitution u =
y
x
, then y = xu, y
= u + xu
, so that
u + x
du
dx
=
6 + 4u
3 + u
which is separable.
We next describe another method which is contained in the following
Theorem 5.2 Consider the system of linear equations with constant coecients
__
dx
dt
dy
dt
_
=
_
a
11
a
12
a
21
a
22
__
x
y
_
.
Suppose A = (a
ij
) has two distinct eigenvalues
k
with corresponding eigenvectors v
k
=
_
v
1k
v
2k
_
(k = 1, 2). Then the general solution of the system is given by
_
x(t)
y(t)
_
= C
1
e
1
t
v
1
+ C
2
e
2
t
v
1
where C
1
and C
2
are arbitrary constants.
Proof. Let P = ( v
1
v
2
). Then we have shown that
P
1
AP =
_
1
0
0
2
_
.
20
Let
z(t) =
_
z
1
(t)
z
2
(t)
_
= P
1
_
x(t)
y(t)
_
.
Then
d
dt
z(t) = P
1
_
d
dt
x(t)
d
dt
y(t)
_
= P
1
A
_
x(t)
y(t)
_
= P
1
APz(t) =
_
1
0
0
2
__
z
1
(t)
z
2
(t)
_
.
That is
z
1
(t) =
1
z
1
(t) and z
2
(t) =
2
z
2
(t)
so that z
k
(t) = C
k
e
k
t
(k = 1, 2). Hence
_
x(t)
y(t)
_
= P
_
z
1
(t)
z
2
(t)
_
= ( v
1
v
2
)
_
z
1
(t)
z
2
(t)
_
= C
1
e
1
t
v
1
+ C
2
e
2
t
v
2
.
Remark 5.3 If
1
= +i is complex (where = 0) and v = v
1
+v
2
i is a (complex) eigenvector,
then the general solution is given by
_
x(t)
y(t)
_
= e
t
C
1
(v
1
cos t v
2
sin t)
+e
t
C
2
(v
2
cos t + v
1
sin t)
where C
1
, C
2
are arbitrary constants.
Example 5.4 Solve the system of linear dierential equations
__
dx
dt
dy
dt
_
=
_
0 1
2 3
__
x
y
_
.
Solve the characteristic equation det(A I) = 0, i.e.
2
3 + 2 = 0 to obtain eigenvalues
1
= 1 and
2
= 2. For
1
= 1, solve the linear system
_
0 1 1
2 3 1
__
c
1
c
2
_
= 0
to obtain c
1
= c
2
, so
_
1
1
_
is an eigenvector with eigenvalue 1. Similarly, solve the linear system
_
0 2 1
2 3 2
__
c
1
c
2
_
= 0
to obtain an eigenvector
_
1
2
_
, so the general solution
_
x(t)
y(t)
_
= C
1
e
t
_
1
1
_
+ C
2
e
2t
_
1
2
_
.
21
Example 5.5 Solve the system
__
dx
dt
dy
dt
_
=
_
2 5
2 4
__
x
y
_
.
The characteristic equation of the matrix in system
2 5
2 4
=
2
+ 2 + 2 = 0
has a pair conjugate complex roots
1
= 1+i and
2
= 1i. For
1
= 1+i the linear system
_
2
1
5
2 4
1
__
c
1
c
2
_
= 0
has a solution vector
_
5
3
_
=
_
5
3
_
+
_
0
1
_
i
thus
_
x(t)
y(t)
_
= e
t
C
1
__
5
3
_
cos t
_
0
1
_
sin t
_
+C
2
__
0
1
_
cos t +
_
5
3
_
sin t
_
.
Example 5.6 Solve the initial value problem to the linear system
__
dx
dt
dy
dt
_
=
_
2 1
4 6
__
x
y
_
,
x(0) = 1,
y(0) = 1.
The characteristic equation of the matrix in the system
2 1
4 6
= ( 4)
2
= 0
has repeated root 4, so e
4t
is a solution to the system. Taking into account the initial condition,
we may set x(t) = (At + 1)e
4t
and y(t) = (Bt + 1)e
4t
, and feed them into the system to obtain
A = 1 and B = 2. Thus the solution to the initial problem is given by
_
x(t) = (1 t)e
4t
,
y(t) = (1 2t)e
4t
.
22