Binomial expansion, power series, limits, approximations...
Transcript of Binomial expansion, power series, limits, approximations...
Binomial expansion, power series,limits,
approximations, Fourier series
Notice: this material must not be used as a substitute for attending
the lectures
1
1 Binomial expansion
We know that
(a + b)1 = a + b
(a + b)2 = a2 + 2ab + b2
(a + b)3 = a3 + 3a2b + 3ab2 + b3
The question is (at this stage): what about (a + b)n where n is any positive integer?
1.1 Pascal’s triangle
11 1
1 2 11 3 3 1
1 4 6 4 11 5 10 10 5 1
1 6 15 20 15 6 1
To expand (a + b)n we look for the row starting with 1 and n.
1.2 Example
Let’s expand (a + b)3. The row in Pascal’s triangle starting with 1 and 3 is
1 3 3 1
Therefore the expansion of (a + b)3 is
(a + b)3 = a3 + 3a2b + 3ab2 + b3
1.3 Example
Let’s expand (a + b)6.The row starting with 1 and 6 in Pascal’s triangle is the row
1 6 15 20 15 6 1
This means that the expansion of (a + b)6 is
(a + b)6 = a6 + 6a5b + 15a4b2 + 20a3b3 + 15a2b4 + 6ab5 + b6
2
1.4 Factorial notation
The factorial n! of a positive integer n is defined by
n! = n(n− 1)(n− 2) · · · (3)(2)(1)
so for example5! = 5× 4× 3× 2× 1 = 120
and8! = 8× 7× 6× 5× 4× 3× 2× 1 = 40320
We work with the convention that
1! = 1 and 0! = 1
Expressions involving factorials can often be simplified as shown in the example below:
8!
5! 3!=
8× 7× 6× 5× 4× 3× 2× 1
(5× 4× 3× 2× 1)(3× 2× 1)=
8× 7× 6
6= 56
1.5 Binomial theorem
Pascal’s triangle can be difficult to use if the exponent is very high. In such cases thefollowing binomial theorem is usually better. This states that if n is a positiveinteger then
(a + b)n = an + nan−1b +n(n− 1)
2!an−2b2 +
n(n− 1)(n− 2)
3!an−3b3 + · · ·+ bn
An important particular case is when a = 1 and b = x giving
(1 + x)n = 1 + nx +n(n− 1)
2!x2 +
n(n− 1)(n− 2)
3!x3 + · · ·+ xn (1.1)
which, like the previous result, holds for positive integers n.In the binomial theorem, the general term has the form an−mbm with coefficient
n(n− 1)(n− 2) · · · (n− (m− 1))
m!
which equalsn(n− 1)(n− 2) · · · (n− (m− 1))(n−m)!
m! (n−m)!
orn!
m! (n−m)!often denoted
(nm
)In terms of the notation introduced above, the binomial theorem can be written as
(a+b)n =
(n0
)an+
(n1
)an−1b+
(n2
)an−2b2+ · · ·+
(nn
)bn =
n∑i=0
(ni
)an−i bi
3
1.6 Example
Expand(2 + x
3
)4.
Solution. Using the binomial theorem:(2 +
x
3
)4
= 24 + (4)(23)(x
3) +
(4)(3)
2!(22)(
x
3)2 +
(4)(3)(2)
3!(2)(
x
3)3 +
(4)(3)(2)(1)
4!(x
3)4
= 16 +32
3x +
8
3x2 +
8
27x3 +
1
81x4.
1.7 Example
Expand(1 + x
3
)15up to and including the term in x3.
Solution. By the binomial theorem:(1 +
x
3
)15
= 1 + 15(x
3) +
(15)(14)
2!(x
3)2 +
(15)(14)(13)
3!(x
3)3 + · · ·
= 1 + 5x +35
3x2 +
455
27x3 + · · ·
1.8 Example
Expand (1− x)3(2 + x)6 up to and including the term in x2.Solution.
(1− x)3(2 + x)6 = (1− x)3
(26 + (6)(25)x +
(6)(5)
2!(24)x2 + · · ·
)
=
1 + 3(−x) +(3)(2)
2!(−x)2 + (−x)3︸ ︷︷ ︸
redundant
(64 + 192x + 240x2 + · · ·)
= (1− 3x + 3x2 − x3)(64 + 192x + 240x2 + · · ·)= 64 + (192− (64)(3))x + (3(64)− 3(192) + 240)x2
= 64− 144x2 + · · ·
1.9 Powers that are NOT positive integers
The binomial expansion as discussed up to now is for the case when the exponent isa positive integer only.
For the case when the number n is not a positive integer the binomial theorembecomes, for −1 < x < 1,
(1 + x)n = 1 + nx +n(n− 1)
2!x2 +
n(n− 1)(n− 2)
3!x3 + · · · (1.2)
This might look the same as the binomial expansion given by expression (1.1), butlet us make the following important distinctions between (1.1) and (1.2):
4
• the expansion for positive integer powers (expansion (1.1)) terminates, i.e. ithas only a finite number of terms. However, for powers that are not positiveintegers the series (1.2) is an infinite series that goes on forever.
• it can be mathematically proven that the series (1.2) is valid only for −1 < x <1.
• expression (1.2) cannot be applied to something of the form (a + x)n. Such anexpression must first be rewritten as follows:
(a + x)n =(a(1 +
x
a
))n
= an(1 +
x
a
)n
︸ ︷︷ ︸apply binomial to this
1.10 Example
Expand√
1 + 2x and state what values of x the series is valid.Solution.
√1 + 2x = (1 + 2x)1/2
= 1 +1
2(2x) +
(12)(−1
2)
2!(2x)2 +
(12)(−1
2)(−3
2)
3!(2x)3 +
(12)(−1
2)(−3
2)(−5
2)
4!(2x)4 + · · ·
= 1 + x− 1
2x2 +
1
2x3 − 5
8x4 + · · ·
This series is valid when −1 < 2x < 1. i.e. when −12
< x < 12.
1.11 Example
Expand(1− x
2
)−5. For what values of x is the expansion valid?
Solution.(1− x
2
)−5
= 1 + (−5)(−x
2
)+
(−5)(−6)
2!
(−x
2
)2
+(−5)(−6)(−7)
3!
(−x
2
)3
+ · · ·
= 1 +5
2x +
15
4x2 +
35
8x3 + · · ·
This is valid when −1 < −x2
< 1, i.e. when −2 < x < 2.
1.12 Example
Expand (3 + x)−12 .
Solution. Remember that when the power is not a positive integer your expressionhas to be of the form (1 + something)power. Deal with this as follows:
(3 + x)−12 =
(3(1 +
x
3
))− 12
= 3−12
(1 +
x
3
)− 12
︸ ︷︷ ︸expand this
5
= 3−12
(1 + (−1
2)(
x
3) +
(−12)(−3
2)
2!(x
3)2 + · · ·
)
=1√3
(1− x
6+
x2
24+ · · ·
)
This is valid when −1 < x/3 < 1, i.e. when −3 < x < 3.
1.13 Example
Find expansions for(1 + 1
x
)1/2for the cases (i) |x| > 1 and (ii) 0 < x < 1.
Solution. the following calculation produces an expansion which will be validwhen 1/|x| < 1, i.e. |x| > 1:
(1 +
1
x
)1/2
= 1 +1
2
(1
x
)+
(12)(−1
2)
2!
(1
x
)2
+(1
2)(−1
2)(−3
2)
3!
(1
x
)3
+ · · ·
= 1 +1
2x− 1
8x2+
1
16x3+ · · ·
valid for |x| > 1.The above expansion is no good if |x| < 1. For this case the following trick
produces a valid expansion:
(1 +
1
x
)1/2
=(
x + 1
x
)1/2
=1
x1/2(1 + x)1/2︸ ︷︷ ︸expand this
=1
x1/2
(1 +
1
2x +
(12)(−1
2)
2!x2 +
(12)(−1
2)(−3
2)
3!x3 + · · ·
)
=1
x1/2
(1 +
1
2x− 1
8x2 +
1
16x3 + · · ·
)=
1
x1/2+
1
2x1/2 − 1
8x3/2 +
1
16x5/2 + · · ·
Note that this is actually defined only for 0 < x < 1.
1.14 Example
Expand (1+x)2
(1−x/2)3up to and including the term in x2.
Solution.
(1 + x)2
(1− x/2)3= (1 + x)2
(1− x
2
)−3
= (1 + 2x + x2)
(1 + (−3)
(−x
2
)+
(−3)(−4)
2!
(−x
2
)2
+ · · ·)
= (1 + 2x + x2)
(1 +
3x
2+
3x2
2+ · · ·
)
6
= 1 +(
3
2+ 2
)x +
(1 + 2
(3
2
)+
3
2
)x2 + · · ·
= 1 +7x
2+
11x2
2· · ·
2 Taylor and Maclaurin series
2.1 Taylor series
The idea is to expand a function f(x) about a point a in the form of a sum of powersof (x− a), i.e. to form a series of the form
f(x) = a0 + a1(x− a) + a2(x− a)2 + a3(x− a)3 + · · · =∞∑
n=0
an(x− a)n (2.3)
we want to know the coefficients an, n = 0, 1, 2, . . . in the above expansion.If we differentiate expression (2.3) again and again, we get the following expres-
sions for the first, second, third, etc derivatives of f(x):
f ′(x) = a1 + 2a2(x− a) + 3a3(x− a)2 + 4a4(x− a)3 + · · ·f ′′(x) = 2a2 + (3)(2)a3(x− a) + (4)(3)a4(x− a)2 + · · ·f ′′′(x) = (3)(2)a3 + (4)(3)(2)a4(x− a) + · · ·
......
Putting x = a in these expressions gives
f ′(a) = a1 ⇒ a1 = f ′(a)
f ′′(a) = 2a2 ⇒ a2 =1
2f ′′(a)
f ′′′(a) = (3)(2)a3 ⇒ a3 =1
(2)(3)f ′′′(a)
Spotting the pattern, we see that the general formula for the coefficient an will be
an =1
n!f (n)(a)
where f (n)(a) means the nth derivative of f(x), evaluated at the value x = a.This gives us what we call the Taylor expansion of a function f(x) valid for
values of x near to a:
f(x) = f(a) + (x− a)f ′(a) +(x− a)2
2!f ′′(a) +
(x− a)3
3!f ′′′(a) + · · · (2.4)
The series carries on to infinity, and has general term (x−a)n
n!f (n)(a).
Taylor’s expansion, and the related Maclaurin expansion discussed below, areused in approximations. In practice usually only the first few terms in the series arekept and the rest are discarded. The idea is that the resulting truncated expansionshould provide a good approximation to the function f(x) for values of x close to theparticular value a. The more terms we keep, the better the approximation.
7
2.2 Maclaurin series
There is also the Maclaurin expansion, which is just the Taylor expansion in theparticular case when a = 0, i.e.
f(x) = f(0) + xf ′(0) +x2
2!f ′′(0) +
x3
3!f ′′′(0) + · · · (2.5)
or, in summation notation
f(x) =∞∑
n=0
f (n)(0)xn
n!
Not all functions have Taylor or Maclaurin expansions but most do.
2.3 Example
Let us find the Maclaurin series of ex.Solution. Let f(x) = ex.Then f(0) = 1.Also f ′(x) = ex so f ′(0) = 1.f ′′(x) = ex so f ′′(0) = 1. Clearly in this particular example f (n)(0) = 1 for all
n = 1, 2, 3, . . .. Putting these values for f(0), f ′(0), f ′′(0), etc, into (2.5) gives us theMaclaurin series for the particular function f(x) = ex, namely
ex = 1 + x +x2
2!+
x3
3!+ · · · (2.6)
or, in summation notation, ex =∞∑
n=0
xn
n!
2.4 Example
Deduce the Maclaurin series of e5x from that for ex.Solution. Just replace every x by 5x in expression (2.6) above to get
e5x = 1 + 5x +(5x)2
2!+
(5x)3
3!+ · · ·
= 1 + 5x +25x2
2+
125x3
6+ · · ·
2.5 Example
Find the Maclaurin series of cos x.Solution. Let f(x) = cos x.Then f(0) = 1.Also f ′(x) = − sin x so f ′(0) = 0.f ′′(x) = − cos x so f ′′(0) = −1.f ′′′(x) = sin x so f ′′′(0) = 0.
8
f ′′′′(x) = cos x so f ′′′′(0) = 1.f ′′′′′(x) = − sin x so f ′′′′′(0) = 0.We see the pattern emerging. The values f(0), f ′(0), f ′′(0), f ′′′(0), etc, cy-
cle through the values 1, 0,−1, 0, 1, 0,−1, 0, . . .. Putting these values into the gen-eral Maclaurin expansion (2.5) gives the Maclaurin expansion for the function cos x,namely
cos x = 1− x2
2!+
x4
4!· · ·
or, in summation notation,
cos x =∞∑
n=0
(−1)nx2n
(2n)!
Similarly, it can be shown that the Maclaurin expansion of sin x is
sin x = x− x3
3!+
x5
5!− · · ·
2.6 Example
Find the Taylor series of the function f(x) = 1/x about x = 2.Solution. We are asked for a Taylor series here, not the Maclaurin one. The
relevant formula is therefore (2.4) in the case when a = 2. So we need to work outthe values f(2), f ′(2), f ′′(2), etc. We do this next:
f(2) = 12.
f ′(x) = − 1x2 so f ′(2) = −1
4.
f ′′(x) = 2x3 so f ′′(2) = 1
4.
f ′′′(x) = − 6x4 so f ′′′(2) = −3
8,
and so on. The Taylor series about the value x = 2 is
f(x) = f(2) + (x− 2)f ′(2) +(x− 2)2
2!f ′′(2) +
(x− 2)3
3!f ′′′(2) + · · ·
which becomes, since f(x) = 1/x,
1
x=
1
2− 1
4(x− 2) +
1
8(x− 2)2 − 1
16(x− 2)3 + · · ·
What this means, is that the first few terms of the above series expansion will con-stitute a good approximation to 1/x for values of x close to 2.
Note that the function f(x) = 1/x does not have a Taylor series expansion aboutthe point x = 0. This is because this function goes to infinity as x → 0, so we couldhardly expect the function to have an approximation for small values of x as a seriesof powers of x. Had we attempted to find f(0), f ′(0), f ′′(0), etc, they would all turnout to be infinity.
9
2.7 Example
Find the first three non-zero terms of the Maclaurin series of e−2x sin x.Solution. One way to do this would be to write down the Maclaurin series for
e−2x (which can be inferred from the one for ex by replacing every x by −2x) andthe series for sin x and then multiplying the series together and expanding out. Theapproach below is a direct approach not requiring such advance knowledge of the twoseparate Maclaurin expansions.
Let f(x) = e−2x sin x. Then f(0) = 0.f ′(x) = e−2x cos x− 2e−2x sin x so f ′(0) = 1. Differentiating again
f ′′(x) = e−2x(− sin x)− 2e−2x cos x− 2(e−2x cos x− 2e−2x sin x)
= 3e−2x sin x− 4e−2x cos x
andf ′′′(x) = 3(e−2x cos x− 2e−2x sin x)− 4(−e−2x sin x− 2e−2x cos x)
From these expressions we get f ′′(0) = −4 and f ′′′(0) = 11. Putting these values intothe general Maclaurin series (2.5) gives the following expression for our particularfunction f(x) = e−2x sin x:
e−2x sin x = x− 2x2 +11x3
6+ · · ·
which will constitute a good approximation to e−2x sin x provided x is reasonablysmall.
2.8 Example
Find the binomial expansion of (1−x2)−1/2 and deduce from it a power series expan-sion for sin−1 x.
Solution. First we find the expansion of (1 + x)−1/2.
(1 + x)−1/2 = 1 + (−1
2)x +
(−12)(−3
2)
2!x2 +
(−12)(−3
2)(−5
2)
3!x3 + · · ·
= 1− 1
2x +
3
8x2 − 5
16x3 + · · ·
In the above, we now replace every x by −x2 to deduce that
(1− x2)−1/2 = 1− 1
2(−x2) +
3
8(−x2)2 − 5
16(−x2)3 + · · ·
= 1 +1
2x2 +
3
8x4 +
5
16x6 + · · ·
Now
sin−1 x =∫ x
0
dt√1− t2
10
=∫ x
0(1− t2)−1/2 dt
=∫ x
0
(1 +
1
2t2 +
3
8t4 +
5
16t6 + · · ·
)dt
= x +1
6x3 +
3
40x5 +
5
112x7 + · · ·
3 Applications to working out limits
The notationlimx→a
f(x)
means the value (if any) that f(x) approaches, when x approaches a. The word “lim”means limit.
3.1 Important issues to do with limits
Two trivial examples of working out limits would be
limx→2
(x2 − 3) = 1, limx→0
cos x = 1
In the above examples we can just put the value in. But in many situations we cannotdo this because we end up with the mathematically meaningless expression 0
0which
could be anything.For example, let’s work out
limx→2
x2 − 4
x− 2
In this example we cannot put x = 2 into the expression otherwise we get 00
whichcould be anything. But we can simplify the expression by factorising and cancellingfactors to get
limx→2
x2 − 4
x− 2= lim
x→2
(x− 2)(x + 2)
x− 2= lim
x→2(x + 2) = 4
Similarly, let’s work out
limx→1
x2 + x− 2
x2 − x
Again we cannot just put x = 1 into this expression or we would get 00. But we can
factorise and simplify as follows:
limx→1
x2 + x− 2
x2 − x= lim
x→1
(x− 1)(x + 2)
x(x− 1)= lim
x→1
x + 2
x= 3.
It is not always possible to work out limits simply by looking for factors and sim-plifying as in the above examples. We now want to add binomial expansion andTaylor/Maclaurin series to our list of methods for working out limits.
11
3.2 Example
Let’s work out
limx→0
(1 + x/2)5/7 − 1
xAgain, we cannot put x = 0 into this expression as it stands. But we can use binomialexpansion, as follows;
(1 + x/2)5/7 − 1
x=
[1 + (5
7)(x
2) +
( 57)(− 2
7)
2!(x
2)2 + · · ·
]− 1
x
=514
x− 5196
x2 + · · ·x
=5
14− 5
196x + · · ·
We can let x → 0 in the above expression to deduce that
limx→0
(1 + x/2)5/7 − 1
x=
5
14
3.3 Example
Let’s work out
limx→0
sin x
xand lim
x→0
sin 2x
xSolution. We mentioned earlier that
sin x = x− x3
3!+
x5
5!− x7
7!+ · · ·
Hencesin x
x= 1− x2
3!+
x4
5!− x6
7!+ · · ·
We can let x → 0 in this to deduce that
limx→0
sin x
x= 1
From the Maclaurin expansion for sin x given above, we can deduce the expansion forsin 2x to be
sin 2x = 2x− (2x)3
3!+
(2x)5
5!− · · ·
= 2x− 4x3
3+
32x5
120− · · ·
Hencesin 2x
x= 2− 4x2
3+ · · ·
Letting x → 0 we deduce that
limx→0
sin 2x
x= 2
It is in fact a general result that limx→0sin kx
x= k for any constant k.
12
3.4 Example
Find
limx→0
sin2 x− x2 cos x
x4
Solution. Recall that
sin x = x− x3
3!+
x5
5!− x7
7!+ · · ·
and
cos x = 1− x2
2!+
x4
4!− x6
6!+ · · ·
Squaring the formula for sin x gives
sin2 x =
(x− x3
6+
x5
120− · · ·
)(x− x3
6+
x5
120− · · ·
)
= x2 − x4
6+ (something) x6 − x4
6+ (something) x6
= x2 − x4
3+ (something) x6
Hence, using also the expansion for cos x given above, we have
sin2 x− x2 cos x
x4=
(x2 − x4
3+ (something) x6 + · · ·
)− x2
(1− x2
2+ x4
24+ · · ·
)x4
=16x4 + (something) x6 + even higher powers of x
x4
=1
6+ (something) x2 + · · ·
Let x → 0 in the above to get
limx→0
sin2 x− x2 cos x
x4=
1
6
3.5 Example
Findlim
x→∞x(e−1/x − 1)
Solution. To deal with x going to infinity, we shall let y = 1/x and let y → 0. Thisgives
limx→∞
x(e−1/x − 1) = limy→0
1
y(e−y − 1)
= limy→0
1
y
({1 + (−y) +
(−y)2
2!+ · · ·
}− 1
)
= limy→0
(−1 +
y
2!+ · · ·
)= −1
where we have used the Maclaurin expansion for the exponential, given by (2.6).
13
4 L’Hopital’s rule
Another way of working out a limit when in a 00
situation is the following result:
if f(a) = 0 and g(a) = 0 then limx→a
f(x)
g(x)= lim
x→a
f ′(x)
g′(x)
The above result is called L’Hopital’s rule.It is absolutely crucial to check the condition f(a) = 0 and g(a) = 0 before using
the rule, because it does not work otherwise.
4.1 Example
limx→0
3x− sin x
xwould be 0
0if we put x = 0 in, so use L’Hopital
= limx→0
3− cos x
1no longer 0
0
= 3− cos 01
= 2
4.2 Example
limx→0
1− cos x
x + x2would be 0
0if we put x = 0 in, so use L’Hopital
= limx→0
sin x
1 + 2xno longer 0
0
= 01
= 0
4.3 Example
limx→2
x− 2
x2 − 4= lim
x→2
1
2x=
1
4
Sometimes we have to apply L’Hopital’s rule more than once to get an answer, as thenext example illustrates:
14
4.4 Example
limx→0
x− sin x
x300
so use L’Hopital
= limx→0
1− cos x
3x2still 0
0so use L’Hopital again
= limx→0
sin x
6xstill 0
0so use L’Hopital again
= limx→0
cos x
6no longer 0
0
= 16
4.5 Example
limx→0
ln cos x
ln cos 3x00
so use L’Hopital
= limx→0
(− sin x
cos x
)(−3 sin 3x
cos 3x
) now simplify this
= limx→0
tan x
3 tan 3xstill 0
0so use L’Hopital again
= limx→0
sec2 x
9 sec2 3xno longer 0
0
= 19
5 Fourier Series
A Fourier Series is an expansion of a periodic function as an infinite sum of sinesand cosines.
Simple examples of periodic functions (other than sin and cos) are the square waveand sawtooth functions. An example of a square wave function (of period 4 in thisparticular case) is the periodic function
f(t) =
{−1, −2 < t < 0,
1, 0 < t < 2,
with f(t + 4) = f(t).An example of a sawtooth function of period 2π would be the periodic function
of period 2π such that f(t) = t for t ∈ (−π, π). Since this function has period 2π wemight suppose that it has an expansion in terms of the functions cos t, cos 2t, cos 3t, . . .and the functions sin t, sin 2t, sin 3t, . . . since these functions also have period 2π. Suchan expansion does indeed exist and in fact any periodic function of period 2π has anexpansion in terms of these trigonometric functions.
If the period is T rather than 2π this is no particular problem. All we have to dois modify the period of the cos and sin functions we work with, i.e. we instead seek
15
an expansion in terms of the functions cos 2nπtT
and sin 2nπtT
for n = 1, 2, 3 . . ., ratherthan cos nt and sin nt. Letting f(t) be a T0 periodic function, this expansion, calledthe Fourier series of f(t), turns out to be
f(t) = 12a0 +
∞∑n=1
(an cos
2nπt
T0
+ bn sin2nπt
T0
)(5.7)
where
an =2
T0
∫ T0
0f(t) cos
2nπt
T0
dt, n = 0, 1, 2, 3, . . . (5.8)
bn =2
T0
∫ T0
0f(t) sin
2nπt
T0
dt, n = 1, 2, 3, . . . (5.9)
A number of important points need to be made:
• When working out the integrals in (5.8,5.9) you can in fact use any interval oflength T0. As a consequence, the alternative formulae:
an =2
T0
∫ T0/2
−T0/2f(t) cos
2nπt
T0
dt, n = 0, 1, 2, 3, . . . (5.10)
bn =2
T0
∫ T0/2
−T0/2f(t) sin
2nπt
T0
dt, n = 1, 2, 3, . . . (5.11)
will work just as well.
• to work out a0 in (5.7) you use the an formula (either (5.8) or (5.10)) withn = 0. You will sometimes find that the n = 0 case needs to be dealt withseparately from the other an coefficients due to division by zero problems.
• the quantity T0 is the period of the wave so the frequency would be 1/T0,usually measured in cycles per second. It is, however, more usual to define thefrequency to be the quantity ω0 defined by
ω0 =2π
T0
rather than 1T0
• often we want to work out the Fourier series of a periodic function that containspoints of discontinuity (the abovementioned square wave and sawtooth functionsbeing examples). It is known that, at a point of discontinuity (at x = a, say)the Fourier series of the function converges to
12(f(a+) + f(a−))
rather than to f(a). This applies regardless of how f(t) is defined (if it is definedat all) at the point a itself. In the above formula the notation f(a+) meansthe value just to the right of the discontinuity and f(a−) means the value tothe left. More formally, f(a+) is the limit of f(a + h) as h tends to zero fromabove, and f(a−) is the limit of f(a− h) as h tends to zero from above.
16
5.1 Example
Let
f(t) =
{−1 −π < t < 0
1 0 < t < π
with f(t + 2π) = f(t). Find the Fourier series of f(t).Solution. In this case the period T0 is given by T0 = 2π. Let us find an first. The
following formulae will be useful
cos nπ = (−1)n and sin nπ = 0, n = 0,±1,±2,±3, . . .
We have
an =2
T0
∫ T0/2
−T0/2f(t) cos
2nπt
T0
dt
=1
π
∫ π
−πf(t) cos nt dt
=1
π
∫ 0
−π(−1) cos nt dt +
1
π
∫ π
0cos nt dt
=1
π
[− sin nt
n
]0−π
+1
π
[sin nt
n
]π0
an = 0
Because of the n in the denominator of the above calculations we need to find a0
separately, but it turns out also to be zero. We would warn you in advance, however,that in plenty of other situations a separate calculation for a0 is absolutely essentialfor a correct Fourier series.
Now let’s find bn. we have
bn =1
π
∫ π
−πf(t) sin nt dt
=1
π
[∫ 0
−π(−1) sin nt dt +
∫ π
0sin nt dt
]=
1
π
[[cos nt
n
]0−π
+[− cos nt
n
]π0
]
=1
πn(1− cos(−nπ) + (− cos nπ + 1))
=1
πn(2− 2(−1)n)
and so
bn =2
πn(1− (−1)n)
With all the an, n = 0, 1, 2, . . ., equal to zero, and also recalling that the periodT0 = 2π, the Fourier series becomes
f(t) =∞∑
n=1
bn sin nt
= b1 sin t + b2 sin 2t + b3 sin 3t + · · ·
17
i.e.
f(t) =4
πsin t +
4
3πsin 3t +
4
5πsin 5t + · · ·
6 Even and odd functions
If a function is an even function or an odd function then certain simplifications arepossible in the calculations required for computing the Fourier series. But note thatplenty of functions are neither even nor odd, eg f(t) = t2 + t.
6.1 Even functions
f(t) is said to be an even function if f(−t) = f(t). This means the graph issymmetrical about the y-axis.
Examples of even functions are f(t) = constant, f(t) = t2, f(t) = t4, f(t) = t6, . . .(all even powers of t); also f(t) = cos t and f(t) = cosh t.
An even function has the important property that∫ a
−af(t) dt = 2
∫ a
0f(t) dt
6.2 Odd functions
f(t) is said to be an odd function if f(−t) = −f(t). This means the graph has 180o
rotational symmetry about the origin.Examples of odd functions are f(t) = t, f(t) = t3, f(t) = t5, . . . (all odd powers
of t); also f(t) = sin t and f(t) = sinh t.An odd function has the important property that∫ a
−af(t) dt = 0
6.3 Useful rules of even and odd functions
even× even = eveneven× odd = oddodd× even = oddodd× odd = even
6.4 Fourier series of an even function
Suppose that f(t) is an even function and we want it’s Fourier series. Since sin t isan odd function we might anticipate that the Fourier series of an even function willcontain no sine terms. We shall show that this is indeed the case. With f(t) being
18
even the bn Fourier coefficient is given by
bn =2
T0
∫ T0/2
−T0/2f(t)︸︷︷︸even
sin2nπt
T0︸ ︷︷ ︸odd
dt
=2
T0
∫ T0/2
−T0/2(something odd) dt
= 0
So if f(t) is even we can declare from the outset that the bn terms are all zero, and weonly need to work out an, n = 0, 1, 2, . . ., a separate calculation often being neededfor a0. With f(t) being even we get an alternative formula for an as follows:
an =2
T0
∫ T0/2
−T0/2f(t)︸︷︷︸even
cos2nπt
T0︸ ︷︷ ︸even
dt
=4
T0
∫ T0/2
0f(t) cos
2nπt
T0
dt
This can save us time and effort.
6.5 Fourier series of an odd function
If f(t) is odd then the an coefficients (including a0) are zero because
an =2
T0
∫ T0/2
−T0/2f(t)︸︷︷︸odd
cos2nπt
T0︸ ︷︷ ︸even
dt
=2
T0
∫ T0/2
−T0/2(something odd) dt
= 0
Thus the Fourier series of an odd function contains only sine terms. Moreover, cal-culation of the bn coefficients of these sine terms can be simplified by exploiting theoddness property.
6.6 Example
Find the Fourier series of the sawtooth function given by
f(t) = t when − 2 < t < 2
with f(t + 4) = f(t) for all t (i.e. the function has period 4).Solution. This function is odd. Its graph has 180o rotational symmetry about
the origin. Since it is odd, we can immediately say that an = 0 for all n (includingn = 0) and we only need to calculate bn.
19
Also note that since the period is 4, we have in this case T0 = 4. We now find bn:
bn =2
T0
∫ T0/2
−T0/2f(t) sin
2nπt
T0
dt
=2
4
∫ 2
−2f(t) sin
2nπt
4dt
=1
2
∫ 2
−2t︸︷︷︸
odd
sinnπt
2︸ ︷︷ ︸odd
dt odd× odd = even
=∫ 2
0t sin
nπt
2dt
=
[−t cos nπt
2
nπ/2
]2
0
+∫ 2
0
cos nπt2
nπ/2dt
= − 4
nπcos nπ +
2
nπ
[sin nπt
2
nπ/2
]2
0
so that
bn = − 4
nπ(−1)n
Recalling that T0 = 4, the Fourier series is
f(t) =∞∑
n=1
(− 4
nπ(−1)n
)sin
nπt
2
= − 4
π
∞∑n=1
(−1)n
nsin
nπt
2
or, in expanded form,
f(t) = − 4
π
(− sin
πt
2+ 1
2sin πt− 1
3sin
3πt
2+
1
4sin 2πt + · · ·
)
6.7 Example
Find the Fourier series of the function such that
f(t) = t2 + t for − π < t < π
with f(t + 2π) = f(t) for all t.Solution. This function is neither even nor odd. It is 2π-periodic so T0 = 2π.
Using this value for T0 the formula for an becomes
an =1
π
∫ π
−πf(t) cos nt dt
=1
π
∫ π
−π(t2 + t) cos nt dt
=1
π
[[(t2 + t)
sin nt
n
]π−π−∫ π
−π(2t + 1)
sin nt
ndt
]if n 6= 0
20
= − 1
πn
∫ π
−π(2t + 1) sin nt dt
= − 1
πn
[[−(2t + 1)
cos nt
n
]π−π
+∫ π
−π
2 cos nt
ndt
]
= − 1
πn
[−(2π + 1)(−1)n
n+
(2(−π) + 1)(−1)n
n+
2
n
[sin nt
n
]π−π
]
= − 1
πn
[−4π(−1)n
n
]=
4
n2(−1)n
We have shown that
an =4
n2(−1)n if n 6= 0
A separate calculation has to be done for a0, since we obviously cannot put n = 0into the above formula for an. Putting n = 0 into the original an integral gives
a0 =1
π
∫ π
−π(t2 + t) dt =
1
π
[t3
3+
t2
2
]π
−π
a0 =2π2
3
Next we find bn. We have
bn =1
π
∫ π
−π(t2 + t) sin nt dt
=1
π
[[−(t2 + t)
cos nt
n
]π−π
+∫ π
−π(2t + 1)
cos nt
ndt
]
=1
π
[−(π2 + π)
(−1)n
n+ (π2 − π)
(−1)n
n+
1
n
∫ π
−π(2t + 1) cos nt dt
]
=1
π
[−2π
(−1)n
n+
1
n
[[(2t + 1)
sin nt
n
]π−π−∫ π
−π
2 sin nt
ndt
]]
=1
π
[−2π
(−1)n
n− 2
n2
∫ π
−π2 sin nt dt
]
so that
bn = − 2
n(−1)n
Putting the formulae for a0, an and bn into the general Fourier series expansion, whichwhen T0 = 2π is
f(t) = 12a0 +
∞∑n=1
(an cos nt + bn sin nt)
gives
f(t) =π2
3+
∞∑n=1
(4
n2(−1)n cos nt− 2
n(−1)n sin nt
)
21
7 Complex form of a Fourier series
Recall thatj =
√−1
Recall also, Euler’s formulaejt = cos t + j sin t (7.12)
and the other useful version of it:
e−jt = cos t− j sin t (7.13)
It is easy to see where (7.12) comes from. We simply expand ejt using Maclaurinseries:
ejt = 1 + jt +(jt)2
2!+
(jt)3
3!+ · · ·
=
(1− t2
2!+
t4
4!− · · ·
)+ j
(t− t3
3!+
t5
5!− · · ·
)= cos t + j sin t
Formula (7.13) follows from (7.12) when we replace t by −t.Now, if we add equations (7.12) and (7.13) the sin t terms disappear and we get
the following result:
cos t =ejt + e−jt
2(7.14)
Similarly, subtracting (7.13) from (7.12) gives
sin t =ejt − e−jt
2j(7.15)
Since cos t and sin t are periodic of period 2π, so is ejt. Furthermore, so are thefunctions enjt for any integer n (positive or negative). This leads us to supposethat any 2π periodic function f(t) can be represented as a sum of the functions enjt
involving all integers n (positive and negative).With suitable adjustments to the period it can be shown that a similar statement
can be made for a function f(t) of period T0. In fact
f(t) =∞∑
n=−∞cn e2jnπt/T0 (7.16)
where
cn =1
T0
∫ T0/2
−T0/2f(t)e−2jnπt/T0 dt for n = 0,±1,±2,±3, . . . (7.17)
Expression (7.16) with coefficients cn given by (7.17) is called the complex formof the Fourier series. Note that the sum is over all integer values of n includingnegative ones.
The convergence properties of the complex form are the same as for the form wediscussed earlier (expression (5.7)), i.e. the infinite sum in (7.16) converges to f(t)unless there us a jump discontinuity in which case the sum converges to the midpointof the jump (regardless of the actual value of f(t) at such a point).
22
7.1 Example
Find the complex Fourier series of the function f(t) such that
f(t) =
0 −π < t < −π/21 −π/2 < t < π/20 π/2 < t < π
with f(t + 2π) = f(t) for all t.Solution. The period is 2π so T0 = 2π. With this value of T0 expressions (7.16)
and (7.17) reduce to
f(t) =∞∑
n=−∞cn ejnt
where
cn =1
2π
∫ π
−πf(t)e−jnt dt
=1
2π
∫ π/2
−π/2e−jnt dt =
1
2π
[e−jnt
−jn
]π/2
−π/2
=1
−2πjn
[e−jnπ/2 − ejnπ/2
]=
1
πn
[ejnπ/2 − e−jnπ/2
2j
]
Recalling the formula sin x = ejx−e−jx
2j, the above formula for cn can be put into the
form
cn =1
πnsin
nπ
2for n = ±1,±2,±3, . . .
The above calculation does not work if n = 0, because it has n in the denominator,so we do a separate calculation for n = 0. The first line of the above calculation forcn, with n = 0, gives
c0 =1
2π
∫ π
−πf(t) dt =
1
2π
∫ π/2
−π/2dt =
1
2
So the complex Fourier series of the function is
f(t) =∞∑
n=−∞cn ejnt
with the above expressions for cn and c0.It is possible to convert the complex form into a real form, as follows. We can
write it in the form
f(t) = 12
+−1∑
n=−∞cne
jnt +∞∑
n=1
cnejnt
23
in which the 12
at the front is the n = 0 term of the sum. Making the substitutionn = −m in the first sum of the above expression gives us
f(t) = 12
+∞∑
m=1
c−me−jmt +∞∑
n=1
cnejnt
and we can now simply replace m by n in the first sum, since they are dummy variablesplaying a similar role to the variable in a definite integral. This observation gives
f(t) = 12
+∞∑
n=1
c−ne−jnt +
∞∑n=1
cnejnt insert expression for cn
= 12
+∞∑
n=1
{1
−πnsin
−nπ
2e−jnt +
1
πnsin
nπ
2ejnt
}
= 12
+∞∑
n=1
1
πnsin
nπ
2
(e−jnt + ejnt
)︸ ︷︷ ︸
=2 cos nt
and so
f(t) = 12
+∞∑
n=1
2
πnsin
nπ
2cos nt
We have converted the complex form into a real form. In the above sum the termswith n = 2, 4, 6, . . . are all zero. Replacing n by 2n − 1 has the effect of removingthese zero terms to give
f(t) = 12
+∞∑
n=1
2
π(2n− 1)sin
(2n− 1)π
2cos(2n− 1)t
= 12
+∞∑
n=1
2(−1)n+1
π(2n− 1)cos(2n− 1)t
which is more computationally efficient.
8 Amplitude and phase spectrum
Recall that the Fourier series of a periodic function of period T0 (and frequencyω0 = 2π/T0) is
f(t) = 12a0 +
∞∑n=1
(an cos
2nπt
T0
+ bn sin2nπt
T0
)with certain formulae, namely (5.8) and (5.9), for the coefficients an and bn.
We can write the Fourier series in terms of ω0 as
f(t) = 12a0 +
∞∑n=1
(an cos nω0t + bn sin nω0t)
= 12a0 +
∞∑n=1
An cos(nω0t + δn)
24
where An is called the amplitude and δn the phase. To find formulae for the numbersAn and δn, n = 1, 2, 3, . . ., we use elementary trigonometry. Now
An cos(nω0t + δn) = An cos nω0t cos δn − An sin nω0t sin δn
Comparing the right hand side of the above expression with
an cos nω0t + bn sin nω0t
we see that we need
An cos δn = an and An sin δn = −bn
These expressions imply that
An =√
a2n + b2
n
and
tan δn = − bn
an
The numbers δn, n = 1, 2, 3, . . . are called the phase spectrum and the numbersAn, n = 1, 2, 3, . . . are called the amplitude spectrum. These two sets of num-bers together form the spectrum and (with the frequency ω0) constitute one way ofdescribing a periodic function.
25