Concourse 18.03 - Lecture #5: Dy DX Dy DX
Concourse 18.03 - Lecture #5: Dy DX Dy DX
}
= . The basic idea is to treat the scalar A as variable.
If we write ( ) ( ) ( )
h
y x v x y x = where ( )
h
y x as the basic homogeneous solution, we can then calculate that
( ) ( ) ( )
h
h
dy dy
dx dx
v x v x y x ' = + and substitute into the ODE to get:
( )
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
h h
h h h h
dy dy
dx dx
v x v x y x p x v x y x v x p x y x v x y x q x ' ' + + = + + =
Note that since ( )
h
y x is a solution to the homogeneous equation, the expression in parentheses vanishes. So the
resulting equation becomes ( ) ( ) ( )
h
v x y x q x ' = . This is, in principle, easily solved by writing
( )
( )
( )
h
q x
y x
v x ' = and
integrating to get
( )
( )
( )
h
q x
y x
v x dx =
}
. We then have the particular solution ( ) ( ) ( )
p h
y x v x y x = .
Example #1: Find the general solution of the 1st order linear ODE
5
7
dy
x
dx
y x + = .
Solution: The homogeneous equation
5
0
dy
x
dx
y + = gives:
5
5 5 5
ln 5ln ( )
h
dy dy dy
x y x y x
dx
y dx dx y x C y x Ax
= = = = + =
} }
So we take
5
5
1
( )
h
x
y x x
= = for the purpose of doing variation of parameters to find a particular solution. With
( ) 7 q x x = , the method as described above gives
5
6 7
7
( ) 7
x
x
v x dx x dx x
= = =
} }
. [Note that we dont add an
arbitrary constant because were only trying to find one particular solution.]
So
7 5 2
( ) ( ) ( )
p h
y x v x y x x x x
= + where A is an arbitrary
constant.
2
Example #2 (sinusoidal input): Find the general solution to the ODE 2 cos3
dx
dt
x t + = . [This is the same
problem we solved in the previous lecture.]
Solution: Last time we solved the homogeneous ODE to get
2
( )
t
h
x t ce
= . If we use
2
( )
t
h
x t e
= and
( ) cos3 q t t = for the variation of parameters, we get
2
2 ( )
cos3
( )
( ) cos3
t
h
t q t
t
e x t
v t dt dt e t dt
= = =
} } }
.
The integral is found using integration by parts (twice) and some algebra. As a reminder of integration methods,
the calculation would go something like this:
( ) ( ) ( )
2 2 2 2 2 2
2 2 2 2
1 2 1 2 1 2
3 3 3 3 3 3
13 3 1 2 4 1 2 2
3 9 9 9 3 9 13 13
cos3 sin3 sin3 sin3 cos3 cos3
sin3 cos3 sin3 cos3 cos3 cos3 sin3
t t t t t t
t t t t
I e t dt e t e t dt e t e t e t dt
e t t I I e t t I e t dt e t t
(
= = = +
= + = + = = +
} } }
}
So the particular solution is
( ) ( )
2 2
3 3 2 2
13 13 13 13
( ) cos3 sin3 cos3 sin3
t t
p
x t e t t e t t
= + where
0
56.31 | ~ as we showed last time.
Complex variable methods for working with sinusoidal and exponential inputs
The calculation above might lead you to believe that any time were dealing with a linear ODE of the form
( ) T f g = where the input is sinusoidal we should expect involved integral calculations. Indeed, we might
consider inputs of the form ( )
at
g t ke = or ( ) cos
at
g t ke bt = or ( ) sin
at
g t ke bt = for various choices of the
constants , , k a b .
Somewhere in your mathematical history you most likely learned a few things about complex numbers. We
initially express complex numbers in the rectangular form z a ib = + where
2
1 i = . Complex numbers can be
viewed in vector-like terms in the complex plane as shown in the diagram. We define:
modulus (z) =mod (z) =|z| =
2 2
a b +
argument (z) =arg (z) =
( )
1
tan
b
a
u
= .
We add complex numbers by adding their respective real and
imaginary parts, in much the same way as vector addition is
defined. We multiply complex numbers via the distributive law
and the fact that
2
1 i = . For example:
2
(3 2)( 1 4) 3 2 12 8 3 14 8 5 14 i i i i i i i + = = + = .
If we note that cos a z u = and sin b z u = , then we can write
(cos sin ) z a bi z i u u = + = + . Theres a simpler way to express
this using Eulers formula. The Maclaurin series for
t
e , cost , and sint are:
2 3 4
2 4
3 5
2! 3! 4!
2! 4!
3! 5!
1
cos 1
sin
t
t t t
t t
t t
e t
t
t t
= + + + + +
= + +
`
= +
)
.
If we formally replace t by it and use the usual algebra rules, we get that:
( ) ( )
2 3 4
2 4 3
2! 3! 4! 2! 4! 3!
( ) ( ) ( )
1 1 cos sin
it it it it
t t t
e it i t t i t = + + + + + = + + + = +
z = a + ib
u
a = Re(z)
b = Im(z)
|z|
Re
Im
3
That is, cos sin
it
e t i t = + [Eulers Formula]
A curious corollary of this is Eulers Identity: 1
i
e
t
= .
Using Eulers Formula, we can express any complex number as (cos sin )
i
z a bi z i z e
u
u u = + = + = where z
is the modulus and u is the argument of the complex number. This polar form allows us to understand the
multiplication of complex numbers in very geometric terms. That is, if
1
1 1
i
z z e
u
= and
2
2 2
i
z z e
u
= are two
complex numbers, their product is
1 2 1 2
( )
1 2 1 2 1 2
i i i
z z z z e e z z e
u u u u +
= = . That is, the modulus of the product is
given by
1 2 1 2
z z z z = and the argument of the product is given by
1 2 1 2 1 2
( ) ( ) ( ) Arg z z Arg z Arg z u u = + = + .
When we multiply complex numbers, we multiply the moduli and we add the arguments.
As a special case, note that the complex number i has modulus 1 and argument 2 90 t = . So
2
i should have
modulus 1 and argument 180 t = , and this does indeed correspond to 1 .
Perhaps more interesting is what this tells us about the roots of unity. If we seek solutions to the equation
1
n
z = or, equivalently, 1 0
n
z = , we know that 1 z = is a solution, but what are the other solutions? One way
to approach this might be via factoring, i.e.
1 2
1 ( 1)( 1) 0
n n n
z z z z z
= + + + + = and wed be seeking a
factorization of
1 2
1 0
n n
z z z
+ + + + = . If, instead, we think of this geometrically, it should be pretty clear
that any such root would have to have modulus 1 (so it would lie on the unit circle in the complex plane) and
its argument u would have to be such that 2 n k u t = for some integer k. Any such number must be of the form
( ) 2 i k n
z e
t
= , and these consist of n points evenly distributed on the unit circle including 1 z = . For example , the
solutions to
3
1 z = would be
( ) ( )
{ }
2 3 4 3
1, ,
i i
e e
t t
, i.e.
{ }
3 3 1 1
2 2 2 2
1, , i i + .
Definition: The complex conjugate of z a ib = + is defined to be z a ib = . In the complex plane, z and z are
reflections of each other across the real axis. Its not hard to show that z z z z
1 2 1 2
= .
When factoring polynomials with real coefficients, the Fundamental Theorem of Algebra and the Quadratic
Formula guarantee that any complex roots must come in complex conjugate pairs.
A little more trigonometry
We can use Eulers formula to produce a quick derivation of the sum of angle formulas for both the sine and
cosine functions. We have:
( )( ) ( ) ( )
( )
cos sin cos sin cos cos sin sin sin cos cos sin
i i i
e e e i i i
u | u |
u u | | u | u | u | u |
+
= = + + = + + .
So, since
( )
cos( ) sin( )
i
e i
u |
u | u |
+
= + + + , comparing the real parts and the imaginary parts give that:
cos( ) cos cos sin sin u | u | u | + = and sin( ) sin cos cos sin u | u | u | + = + .
Application to integration
We can actually find the integrals cos
at
e bt dt
}
and sin
at
e bt dt
}
simultaneously using complex numbers.
If we write cos sin
ibt
e bt i bt = + , then
( )
cos sin
a ib t at ibt at at
e e e e bt ie bt
+
= = + .
Integration acts linearly, and if we extend this to complex-valued functions, we have that:
( )
cos sin
a ib t at at
e dt e bt dt i e bt dt
+
= +
} } }
.
Exponential functions are easy to integrate (even when we extend to complex-valued exponential functions),
and we calculate that
( ) ( )
1
a ib t a ib t
a ib
e dt e
+ +
+
=
}
. We can proceed several ways here, but for the purpose of
4
calculating these integrals, lets get rid of the complex denominator by multiplying both numerator and
denominator by its complex conjugate (and use the fact that
2
2 2
( )( ) zz a ib a ib a b z = + = + = ). We get:
| |
2 2 2 2
2 2
( ) ( )
1 1
1
( )(cos sin )
( cos sin ) ( cos sin )
a ib t a ib t at ibt at
at
a ib
a ib a b a b
a b
e dt e e e e a ib bt i bt
e a bt b bt i b bt a bt
+ +
+ + +
+
= = = +
= + + +
}
If we compare this with
( )
cos sin
a ib t at at
e dt e bt dt i e bt dt
+
= +
} } }
, we see that:
2 2
1
cos ( cos sin )
at at
a b
e bt dt e a bt b bt
+
= +
}
and
2 2
1
sin ( cos sin )
at at
a b
e bt dt e b bt a bt
+
= +
}
.
If we were to apply this to the integral calculated earlier using integration by parts, wed get that:
( )
2 2
1
13
cos3 2cos3 3sin3
t t
e t dt e t t C = + +
}
This agrees with our previous result.
Next time well apply these methods involving complex-valued functions to discover a remarkably simple way
of finding particular solutions to any linear ODE of the form ( ) T f g = where the input ( ) g t is any function of
the form ( )
at
g t ke = or ( ) cos
at
g t ke bt = or ( ) sin
at
g t ke bt = for various choices of the constants , , k a b .
Well also take a step back and look at autonomous systems in general, i.e. ODEs of the form ( )
dP
dt
F P = , by
considering the phase line, the corresponding slope field, and by understanding the idea of stability in the
vicinity of any equilibrium.
Notes by Robert Winters