0% found this document useful (0 votes)
17 views85 pages

ANSINI LecturesNotes

The document contains lecture notes on Calculus Unit 2, covering topics such as numerical sequences, series, power series, Riemann integrals, improper integrals, and ordinary differential equations. It provides definitions, theorems, and examples related to sequences and their convergence, including the Cauchy criterion and limits theorem. The content is structured with sections and subsections, detailing various mathematical concepts and methods relevant to the study of calculus.

Uploaded by

paolo1212312
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)
17 views85 pages

ANSINI LecturesNotes

The document contains lecture notes on Calculus Unit 2, covering topics such as numerical sequences, series, power series, Riemann integrals, improper integrals, and ordinary differential equations. It provides definitions, theorems, and examples related to sequences and their convergence, including the Cauchy criterion and limits theorem. The content is structured with sections and subsections, detailing various mathematical concepts and methods relevant to the study of calculus.

Uploaded by

paolo1212312
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

Lecture Notes Calculus Unit 2, ACSAI

Nadia Ansini1

27 February 2025

1
email: ansini@[Link]
2
Contents

1 Numerical Sequences 5
1.1 Sequences of real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 Limits Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Numerical Series 15
2.0.1 Series with non-negative terms . . . . . . . . . . . . . . . . . . . . . . 17
2.0.2 Conditional and absolute convergence . . . . . . . . . . . . . . . . . . 24

3 Power series in R 29
3.1 Convergence of a power series: the radius of convergence . . . . . . . . . . . . 29
3.2 Taylor series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.1 Taylor polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.2.2 From the Taylor polynomials to the Taylor series . . . . . . . . . . . . 35

4 Riemann Integral 39
4.1 Riemann Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Properties of Riemann Integral . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.3 Methods of Integration: substitution and integration by parts . . . . . . . . . 48
4.3.1 Method of substitution: change of variables . . . . . . . . . . . . . . . 48
4.3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.3.3 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.3.4 Examples . . . .√. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3.5 Substitution for a2 − x2 , sin x and cos x . . . . . . . . . . . . . . . . 54
4.4 Integration of rational functions . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.6 Solving Exercises Chapter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5 Improper Integral 61
5.1 Definitions and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2 Comparison Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.4 Solving Exercises Chapter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

6 Ordinary differential equations 71


6.1 First-order ODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.1.1 ODE by separation of variables . . . . . . . . . . . . . . . . . . . . . . 72
6.1.2 First-order linear differential equations . . . . . . . . . . . . . . . . . 77

3
4 CONTENTS

6.1.3 Homogeneous linear first-order ode . . . . . . . . . . . . . . . . . . . . 77


6.1.4 Inhomogeneous linear first-order ode . . . . . . . . . . . . . . . . . . . 78
6.2 Linear Second-order O.D.E. with constant coefficients . . . . . . . . . . . . . 79
6.2.1 The Homogeneous case . . . . . . . . . . . . . . . . . . . . . . . . . . 79
6.2.2 Inhomogeneous equation: method of undetermined coefficients . . . . 81

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.
Chapter 1

Numerical Sequences

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

1.1 Sequences of real numbers


A sequence is a function f : N 7→ R that takes values f (1), f (2), · · · , f (n), · · · . An intuitive
understanding of the definition of a sequence is that a sequence it is an itemized collection of
elements, it is a chain of ordered term. Then, the best notation for sequences is rather

a1 , a2 , · · · , an , · · ·

where n is the index of the sequence and (an ) = {a1 , a2 , · · · , an , · · · } = f (N) is the set of all
values assumed by the function f and denoted by an := f (n).
Before giving the formal definitions of important notions for sequences, we take a look at
the behaviour of the sequence in the example below.

Example 1.1.1. The sequence of the inverse of the integers:

1 1 1 1
an = , (an ) = {1, , , · · · , , · · · } .
n 2 3 n
Note that, the sequence an is bounded from below and from above; i.e., 0 < an ≤ 1. Moreover,
an+1 ≤ an for every n ∈ N; i.e., in this sequence the values are decreasing as n increases and
(1/n) seems to“approach” a single point as n increases that is 0.
Indeed, for every arbitrarily fixed ε > 0 we have that

1 1
0< < ε ⇐⇒ n > ,
n ε

which implies that the sequence (an ) ∈ (0, ε) definitively; i.e., for every n > 1/ε and for every
arbitrarily small ε > 0.

This very simple example suggests the introduction of very important notions already
familiar in the context of sets and functions as: boundedness, monotonicity and limits.

5
6 CHAPTER 1. NUMERICAL SEQUENCES

First of all we can apply the notion of bounded sets to the sequences; i.e., to the set (an ).
More precisely, there alway exist

sup an := sup{an , ∀n ∈ N} ≤ +∞ , inf an := inf{an , ∀n ∈ N} ≥ −∞ ,


n n

hence,

• we say that the sequence (an ) is bounded above if supn an ∈ R or equivalently, there
exists M ∈ R such that an ≤ M for every n ∈ N;

• we say that the sequence (an ) is bounded below if inf n an ∈ R or equivalently, there
exists m ∈ R such that an ≥ m for every n ∈ N;

• we say that the sequence (an ) is bounded if inf n an , supn an ∈ R or equivalently, there
exists m, M ∈ R such that m ≤ an ≤ M for every n ∈ N.

Definition 1.1.2 (Monotone sequences). We say that a sequence (an ) is increasing if an ≤


an+1 for very n ∈ N (or strictly increasing if an < an+1 ). We say that a sequence (an ) is
decreasing if an ≥ an+1 for very n ∈ N (or strictly decreasing if an > an+1 ). Sequences which
are either increasing or decreasing sequences are called monotone (or strictly monotone).

Let us now state the formal definition of convergence. We distinguish sequences whose
elements approach a single point as n increases from those sequences whose elements do not.

Definition 1.1.3 (Convergence of a sequence). We say that a sequence (an ) converges if


there exists L ∈ R such that for every ε > 0, there exists a natural number nε (depending on
ε > 0) such that an ∈ (L − ε, L + ε) or, equivalently, |an − L| < ε, for all n ≥ nε .
It can be easily verified that if such a number L exists then it is unique. In this case, we
say that the sequence (an ) converges to L and we call L the limit of the sequence (an ) and we
denotes it
L := lim an .
n→+∞

By Example 1.1.1 we have then the sequence 1/n converges to 0 since we may apply the
Definition 1.1.3 by taking any natural number nε > 1/ε; hence,

1
lim = 0.
n→+∞ n

Definition 1.1.4 (Divergence of a sequence). We say that a sequence (an ) diverges to +∞ if


for every M > 0, there exists a natural number k such that an > M for all n ≥ k. Similarly,
we say that a sequence (an ) diverges to −∞ if for every m < 0, there exists a natural number
k such that an < m for all n ≥ k. In these cases, we write

lim an = +∞ , lim an = −∞ ,
n→+∞ n→+∞

respectively.

Example 1.1.5. The oscillating sequence an = (−1)n is bounded since (an ) = {1, −1} for
every n ∈ N, it is not monotone and it does not converges since it does not approach a single
1.1. SEQUENCES OF REAL NUMBERS 7

point as n increase. Indeed, if there exists a limit L = limn→+∞ (−1)n then for a fixed ε we
should have by definition

L − ε ≤ (−1)n ≤ L + ε , ∀n ≥ nε

and  1  1
an+1 − an ≤ L + − L− = 1 , ∀n ≥ nε .
2 2
This is in general not true when n is odd.
Finally, we note that (
1 n = 2k , k ∈ N
an =
−1 n = 2k + 1 , k ∈ N .
which means that from an we can extract two sequences bk = a2k = 1 and ck = a2k+1 = −1
and we call bk and ck subsequences of an . More in general, a subsequences of a sequence an
is a sequence defined as bk = ank where n1 < n2 < · · · < nk < · · · with k ∈ N.
The two subsequences bk and ck trivially converge to 1 and −1, respectively. Hence, an is
a bounded sequence that does not converge but we can extract two subsequences converging.
This is true not only for this particular example, but in general!

Theorem 1.1.6 (Bolzano-Weierstrass). Any bounded sequence (an ) ⊂ R has a converging


subsequence.

The following theorem gives a necessary condition for the convergence of a sequence.

Proposition 1.1.7. Every convergent sequence is a bounded sequence.

Proof. Let us assume limn→+∞ an = L. Then, by Definition 1.1.3, we have that |an | < L + ε
for every n ≥ nε ; hence,
|an | < L + ε + M , ∀n ∈ N
with M = max{|a1 |, · · · , |anε −1 |}; i.e., (an ) is bounded.

Definition 1.1.8 (Cauchy Sequences). We say that (an ) is a Cauchy sequence if for every
ε > 0 there exists natural number nε such that

|am − an | ≤ ε , ∀m, n ≥ nε .

Theorem 1.1.9 (Cauchy Criterion). A sequence converges if and only if it is a Cauchy


sequence.

We will see soon an important application of the Criterion to the study of converging
series.

1.1.1 Limits Theorem


Theorem 1.1.10 (Operations of Limits- I). Suppose that an → a and bn → b as n → +∞,
then

• (an ± bn ) → a ± b ,

• an · bn → a · b ,
8 CHAPTER 1. NUMERICAL SEQUENCES

• if bn , b 6= 0 then an /bn → a/b.

Remark 1.1.11 (Indeterminate Forms). If the limits are infinite or 0 they may give rise to
indeterminate forms as:
∞ 0
∞ − ∞, , , ∞·0
∞ 0
This does not means that the limits do not necessarily exist but their computation need a
further investigate. In case of indeterminate forms of limits of function the De l’Hopital’s
theorem gives an instrument to compute the limits 0/0 and ∞/∞ and as a consequence of
these two cases also ∞ · 0 and ∞ − ∞. Thanks to the next Theorem 1.1.13 we may take
advantage of that to study the indeterminate forms for sequences.

Remark 1.1.12 (Operations of Limits- II). Here we collect other cases that can not be
included in the previous theorem but for which we still can predict the limit:

• if an → +∞ and (bn ) is bounded below then (an + bn ) → +∞ ,

• if an → −∞ and (bn ) is bounded above then (an + bn ) → −∞ ,

• if an → ±∞ and bn → L 6= 0 then (an · bn ) → ±∞ according to the sign of infinity and


of L ,

• if an → ±∞ then (1/an ) → 0 ,

• if an → ±∞ and bn → L then (bn /an ) → 0 ,

• if an → 0 then 1/|an | → +∞. In particular, if an > 0 or < 0 then 1/an → +∞ or −∞ .

Theorem 1.1.13 (A bridge between limit of functions and of sequences). Let L ∈ R ∩


{+∞, −∞} and x0 ∈ R ∩ {+∞, −∞} then

lim f (x) = L
x→x0

if and only if for every xn → x0 as n → +∞, xn 6= x0 , we have that

lim f (xn ) = L .
n→+∞

Example 1.1.14. Theorem 1.1.13 is very useful if we have to compute limit of sequences
f (xn ) by knowing the limit of the function f (x) as shown the following examples.

• The limit of √
n
lim e = +∞ ,
n→+∞

since limn→+∞ n = +∞ and limx→+∞ ex = +∞.

• The limit of
1
lim n sin = 1,
n→+∞ n
since, limn→+∞ 1/n = 0 and limx→0 sin x/x = 1. Note that, if we compute the limit as
the product of the limits we would have an indeterminate form ∞ · 0 or, equivalently,
∞/∞ by writing n sin(1/n) = sin(1/n)/(1/n).
1.1. SEQUENCES OF REAL NUMBERS 9

Less known application of the theorem is to prove the no existence of a limit of a function.
Let us prove, for example, that
@ lim sin x .
x→+∞

We recall that Theorem 1.1.13 states that the limx→x0 f (x) = L if and only limn→+∞ f (xn ) =
L for EVERY sequences xn → x0 . This implies that if we find two sequences bn and cn both
converging to x0 such that limn→+∞ f (bn ) 6= limn→+∞ f (cn ) then we can conclude that the
limit limx→x0 f (x) does not exists!
Indeed, if we consider bn = 2πn and cn = π/2 + 2πn, both they are diverging to +∞ and
π
lim sin(2πn) = 0 6= lim sin( + 2πn) = 1 .
n→+∞ n→+∞ 2
Theorem 1.1.15 (Sandwiches Theorem). Suppose that an ≤ bn ≤ cn for every n ∈ N (or
there exists n0 such that the inequality is satisfied for every n ≥ n0 ). Then, if there exists
limn→+∞ an = limn→+∞ cn = L ∈ R then there exists also limn→+∞ bn = L.

Theorem 1.1.16 (Comparison Test for sequences). Suppose that an ≤ bn for every n ∈ N
(or there exists n0 such that the inequality is satisfied for every n ≥ n0 ). Then,

• if limn→+∞ an = +∞ then limn→+∞ bn = +∞ ;

• if limn→+∞ bn = −∞ then limn→+∞ an = −∞ ;

• if |an | ≤ bn and limn→+∞ bn = 0 then limn→+∞ an = 0.

Theorem 1.1.17 (Ratio test for sequences). Let (an ) be a sequence of real numbers such that
an > 0 for all n ∈ N and
an+1
lim = l.
n→+∞ an

Then

1. if l < 1 then limn→+∞ an = 0 ,

2. if l > 1 then limn→+∞ an = +∞ .

Proof. If l < 1 then we can fix ε such that l + ε < 1 and, for every n ≥ nε , we have that
an+1
≤ (l + ε) < 1
an
which implies that

anε +1 < (l + ε)anε


anε +2 < (l + ε)anε +1 < (l + ε)2 anε
···
0 < anε +k < (l + ε)k anε .

Since l + ε < 1 then limn→+∞ (l + ε)k = 0. By Theorem 1.1.16 we get that limn→+∞ an = 0.
If l > 1 then we can fix ε such that l − ε > 1 and, for every n ≥ nε , we have that
an+1
≥ (l − ε) > 1 .
an
10 CHAPTER 1. NUMERICAL SEQUENCES

Reasoning as above, we have that

anε +k > (l − ε)k anε

for every k ∈ N. By Theorem 1.1.16 we get that limn→+∞ an = +∞.

Remark 1.1.18. If l = 1 we can not predict the limit of (an ). Indeed, if we consider an = n
then an+1 /an → 1, as n → +∞, and limn→+∞ an = +∞, while if we consider an = 3 + 1/n
then an+1 /an → 1 and limn→+∞ an = 3.

In the following proposition we study how fast some sequences approach infinity.

Proposition 1.1.19 (Hierarchy of sequences). If α > 0 and a > 1 then we have

loga n nα
lim = 0, lim = 0.
n→+∞ nα n→+∞ an

If a > 0 then we have


an n!
lim = 0, lim = 0. (1.1)
n→+∞ n! n→+∞ nn

Proof. The proof of (1.1) is an application of the ratio test Theorem 1.1.17.

Example 1.1.20 (Indeterminate forms: ∞0 , 00 , 1∞ ). Another limit of sequence that can


give rise to an indeterminate form is

n
lim n.
n→+∞


This limit can be rewritten as limn→+∞ n n = limn→+∞ f (n)g(n) where f (x) = x and g(x) =
1/x. We recall that if there exist finite limx→x0 f (x) and limx→x0 g(x) then limx→x0 f (x)g(x) =
(limx→x0 f (x))(limx→x0 g(x)) . If we apply directly Theorem 1.1.13 we get then an indeterminate
form ∞0 .
Still we can use the same approach by rewriting
√ √
n 1
n
n = eln n
= e n ln n ;

hence, by Theorem 1.1.13 and Proposition 1.1.19


√ 1
lim n
n = elimn→+∞ n ln n = e0 = 1 . (1.2)
n→+∞

As a consequence of the previous result we can prove that


11 1
n
lim = lim √
n
= 1.
n→+∞ n n→+∞ n

Note that in this case, reasoning as above, we could have an indeterminate form by applying
directly Theorem 1.1.13 as following limn→+∞ f (n)g(n) = 00 with f (x) = 1/x and g(x) = 1/x.
Finally, we recall that the Euler number e can be defined as limit of the sequence
 1 n
e := lim 1+ . (1.3)
n→+∞ n
1.1. SEQUENCES OF REAL NUMBERS 11

The proof, that such sequence converges, is an interesting application of the convergence of
monotone sequence (see Theorem 1.1.21 below) to the sequence (an−1 /an ) after proving that
(an ) is bounded; i.e., 2 ≤ an < 4. Note that, reasoning as above, by a direct application of
Theorem 1.1.13 the limit in (1.3) gives rise to the indeterminate form 1∞ .
More in general, if limn→+∞ an = ±∞ still we may prove that
 1 an
e = lim 1+ .
n→+∞ an

Theorem 1.1.21 (Limits of monotone sequences). Suppose (an ) is a bounded and increasing
sequence. Then there exists the limit of (an ) and

lim an = sup an ∈ R .
n→+∞ n∈N

If (an ) is not bounded above then limn→+∞ an = +∞.


Suppose (an ) is a bounded and decreasing sequence. Then there exists the limit of (an )
and
lim an = inf an ∈ R .
n→+∞ n∈N

If (an ) is not bounded below then limn→+∞ an = −∞.

Proof. Suppose supn∈N an = M . Then for given ε > 0, there exists nε such that M − ε ≤ anε .
Since (an ) is increasing, we have a≤ anε for all n ≥ nε . This implies that M − ε ≤ an ≤ M ≤
M + ε for all n ≥ nε . That is limn→+∞ an = M .
For decreasing sequences the proof is similar.
√ √
Example 1.1.22. (1) Let a1 = 2 and an = 2 + an−1 for n > 1. Then use induction to
see that 0 ≤ anp≤ 2 and (an ) is increasing. Therefore, by previous result (an ) converges.
√ √
Indeed, a2 = 2 + 2 and (a2 )2 = 2 + 2 < 4; hence a2 < 2. similarly, if an−1 < 2
then (an )2 = 2 + an−1
p < 4 which implies an√< 2. Suppose limn→+∞ an = L. Then
limn→+∞ an = L = 2 + (limn→+∞ an−1 ) = 2 + L. This implies that L = 2.

(2) Prove that the


√ √
lim n − n + 1 = 0.
n→+∞

The limit can not be computed by applying Theorem 1.1.10, it gives rise to the inde-
terminate form ∞ − ∞. But, we can rationalised
√ √
√ √ n − n + 1 √ √ 
n− n+1 = √ √ n+ n+1
n+ n+1
n − (n + 1) 1
= √ √ =√ √ → 0,
n+ n+1 n+ n+1

as n → +∞.

(3) Prove that


3n + n
lim = +∞ . (1.4)
n→+∞ n3 + 1
12 CHAPTER 1. NUMERICAL SEQUENCES

It is convenient to rewrite the sequence as follows

3n + n 3n n
= + 3
n3 + 1 3
n +1 n +1
 3n  n3  1
= + n3
.
n3 n3 + 1 + 1
n n

By Proposition 1.1.19 we have that (3n /n3 ) → +∞, moreover by Remark 1.1.12 we
have
n3 1 1 1
n3 + 1
= 1 → 1, n3 1
= 2 1 → 0,
1 + n3 n + n
n +n

which gives (1.4).

(4) Find the following limit of sequences

n+2
lim .
n→+∞ n2 + 3n

It is convenient to rewrite the sequence as follows

n+2 n 2
0≤ = + 2
n2 + 3n n2
+ 3n n + 3n
 1   2 
= + ;
n+3 n2 + 3n

by Remark 1.1.12 we get that

n+2
lim = 0.
n→+∞ n2 + 3n

(5) Find the following limit of sequences

3n3 + 2n + 1
lim .
n→+∞ 4n4 + 3n3 + 2

We divide the numerator and the denominator by n3 then


2 1
3n3 + 2n + 1 3+ n2
+ n3
= 2 .
4n4 + 3n3 + 2 4n + 3 + n3

By Remark 1.1.12 we get that

2 1 2
lim 3 + 2
+ 3 = 3, lim 4n + 3 + = +∞ ,
n→+∞ n n n→+∞ n3

and,
3n3 + 2n + 1
lim = 0.
n→+∞ 4n4 + 3n3 + 2
1.1. SEQUENCES OF REAL NUMBERS 13

(6) Find the following limit of sequences

3n
lim .
n→+∞ 2n + 4n

We divide the numerator and the denominator by 3n then


3n 1
= 2 n .
n
2 +4 n ( 3 ) + ( 43 )n

Since 2/3 < 1 and 4/3 > 1 we have that


2 4
lim ( )n = 0 , lim ( )n = +∞ .
n→+∞ 3 n→+∞ 3

Hence,
2 4
lim ( )n + ( )n = +∞ ,
n→+∞ 3 3
and, by Remark 1.1.12 we have that
1
lim = 0.
n→+∞ ( 23 )n + ( 43 )n

(7) Find the limit by varying the parameter α ∈ R of the sequence


n−1
lim .
n→+∞ nα + 2

We divide the numerator and denominator by n; hence,



1
1− n +∞ if α < 1

lim = 1 if α = 1 (1.5)
n→+∞ nα−1 + 2
n

0 if α > 1 .

Indeed,
2 1
lim = lim = 0,
n→+∞ n n→+∞ n

hence, the limit in (1.5) depends on the sign of (α − 1) since limn→+∞ nα−1 = +∞, 1, 0
if (α − 1) > 0, 0, < 0, respectively.
14 CHAPTER 1. NUMERICAL SEQUENCES
Chapter 2

Numerical Series

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

Given a sequence of real numbers (an ) = {a0 , a1 , a2 , · · · , an , · · · } we associate to (an ) a


recursive sequence (sn ) defined as
s0 = a0
sn+1 = sn + an+1 , n ∈ N;
that is,
s0 = a0
s1 = a0 + a1
s2 = a0 + a1 + a2
···
sn = a0 + · · · + an .
The sequence (sn ) is called series and it is denoted by

X
an ,
n=0
Pk=n
the single element of the sequence sn = k=0 ak is called partial sums. Then, (sn ) is also
called the sequence of partial sums.
Definition 2.0.1. We say that a series is convergent if there exists finite the limit limn→+∞ sn =
s ∈ R, it is called the sum of the series and it is denoted by

X
s= an .
n=0

The series is divergent if limn→+∞ sn = ±∞. The series does not converge if does not exists
limn→+∞ sn . The remainder associated to the series is defined by
+∞
X
Rn := s − sn = ak .
k=n+1

15
16 CHAPTER 2. NUMERICAL SERIES

Note that the series converges if and only if limn→+∞ Rn = 0.

Example 2.0.2 (Geometric series). The geometric series is defined as



X
xk ,
k=0

for every x ∈ R. Note that x = xk+1 /xk ; i.e., x represents a common ratio between all terms
of the series that is constant. It is easy to prove that the partial sum is given by

1 − xn+1
if x 6= 1



 1−x
sn =



n if x = 1 .

We get then
1

 if |x| < 1




 1 x



lim sn = +∞ if x ≥ 1 (2.1)
n→+∞ 






if x ≤ −1 ;

@
that is,

• the geometric series converges for every |x| < 1 and ∞ n


P
n=0 x = 1/(x − 1) ,

• the geometric series diverges for every x ≥ 1 and ∞ n


P
n=0 x = +∞ .

Theorem 2.0.3 (Cauchy Criterion). The series ∞


P
n=0 an converges if and only if for every
ε > 0 there exists nε ∈ N such that for every n ≥ nε and p ∈ N we have that
n+p
X
ak ≤ ε .
k=n

Proof. By Theorem 1.1.9 we have that the sequence (sn ) converges if and only if it is a Cauchy
sequence; i.e., for every ε > 0 there exists natural number nε such that

|sm − sl | ≤ ε , ∀l, m ≥ nε ,

(see Definition 1.1.8 of Cauchy sequence). Without loss of generality we may always assume
Pn+p
that l = n − 1 and m = n + p; hence, we get the thesis since |sm − sl | = k=n ak .

A very important consequence of the theorem is the following Corollary that provides a
necessary condition for the convergence of a series.

Corollary 2.0.4. If the series ∞


P
n=0 an converges then limn→+∞ an = 0.

Proof. It is a straightforward consequence of Theorem 2.0.3 with p = 0.


17

Example 2.0.5. The limn→+∞ an = 0 is not sufficient to guarantee that the associated series
P∞
n=0 an converges. Indeed, let us consider


X 1 1 1 1
= 1 + + + ··· + + ···
n 2 3 n
n=1

it is called harmonic series. Then if we choose m = 2n we have that


1 1 1 1 1
s2n − sn = + + ··· + ≥n =
n+1 n+2 2n 2n 2
since we are summing up n-terms with the denominators (n+1), (n+2), · · · , (2n−1), 2n ≤ 2n.
This proves that (sn ) is not a Cauchy sequence and therefore it can not be convergent.

2.0.1 Series with non-negative terms


P∞
A series n=0 an with non-negative terms an ≥ 0, n ∈ N, it is always convergent or divergent
since the sequence of partial sums (sn ) is monotone increasing; i.e.,

sn+1 = sn + an+1 ≥ sn , ∀n ∈ N ;

hence, as already observed in Theorem 1.1.21, there always exists

lim sn = sup sn ≤ +∞ .
n→+∞ n∈N

In particular, a series with non-negative terms converges if and only if the sequence of partial
sums (sn ) is bounded.
Here below, we collect some methods that allow to study the divergence or convergence
of a series with non negative terms.

Theorem 2.0.6 (Integral test). Let f : [1, +∞) 7→ [0, +∞) be a monotone decreasing func-
tion. Then
X∞ Z ∞
f (n) , and f (x) dx
n=1 1

converge or diverge simultaneously.

Proof. Let us consider a partition of [1, n] in subintervals of width 1; i.e., x1 = 1, · · · , xk =


k, xk+1 = (k + 1), · · · , xn = n. Since f is a decreasing function we have that the Riemann
Integral on [1, n] can be approximated from below and from above by the following lower and
upper sum
n−1
X n−1
X Z n n−1
X Z k+1 n−1
X n−1
X
f (k + 1) = mk ≤ f (x) dx = f (x) dx ≤ Mk = f (k) ; (2.2)
k=1 k=1 1 k=1 k k=1 k=1
P∞
respectively. Note that, the sequence of partial sums associated to the series n=1 f (n) is
given by
n−1
X
sn−1 = f (k) .
k=1
18 CHAPTER 2. NUMERICAL SERIES

Similarly,
n−1
X n
X
f (k + 1) = f (h) = sn − s1 .
k=1 h=2
Therefore, Z n
sn − s1 ≤ f (x) dx ≤ sn−1 ,
1
which implies that series and improper integral has the same behaviour; i.e., both converges
or diverges. Indeed,
Z n
lim sn − s1 ≤ lim f (x) dx ≤ lim sn−1 .
n→+∞ n→+∞ 1 n→+∞

Example 2.0.7 (α-series). We consider the series



X 1
, α > 0.

n=1

The function 1/xα , α > 0, satisfies the assumption of Theorem 2.0.6. Moreover, by (5.2), we
have that
1

Z ∞  if α > 1
α−1

1 
dx =
1 xα 

+∞ if α ≤ 1 ;

hence, 

X 1 converges
 if α > 1
= (2.3)
nα 
n=1 
+∞ if α ≤ 1 .

Theorem 2.0.8 (Comparison test). Let (an ) and (bn ) be nonnegative sequences and assume
that there exists N ∈ N such that

an ≤ bn , n≥N.

Then, we have

• if ∞
P P∞
n=0 an diverges then n=0 bn diverges ,
P∞ P∞
• if n=0 bn converges then n=0 an converges.

Theorem 2.0.9 (Limit Comparison Test). Let (an ) be a nonnegative sequence, let (bn ) be a
positive sequence and assume that
an
lim = L.
n→+∞ bn

Then, we have

• if L ∈ (0, +∞) then the series ∞


P P∞
n=0 an and n=0 bn converge or diverge simultane-
ously ,
19

• if L = 0 then

X ∞
X
bn < +∞ =⇒ an < +∞
n=0 n=0
or

X ∞
X
an = +∞ =⇒ bn = +∞ ,
n=0 n=0

• if L = +∞ then

X ∞
X
an < +∞ =⇒ bn < +∞
n=0 n=0
or

X ∞
X
bn = +∞ =⇒ an = +∞ .
n=0 n=0

Proof. If L ∈ (0, +∞), then we may choose ε > 0 such that L − ε > 0; hence,
an
−ε < −L <ε =⇒ (L − ε)bn < an < (L + ε)bn , ∀n ≥ nε .
bn
If L = 0 then, by definition of limit, for every ε > 0 there exists nε ∈ N such that
an
0≤ <ε =⇒ 0 ≤ an < εbn , ∀n ≥ nε .
bn
Finally, if L = +∞ then, for every M > 0 there exists k ∈ N
an
>M =⇒ an > M bn , ∀n ≥ k .
bn
By Comparison Test 2.0.8, we get the thesis.

Example 2.0.10 (Bertrand series). Let us consider



X 1
, α, β ∈ R . (2.4)
nα (ln n)β
n=2

• If α < 1, we can write α = γ − ε with α < γ < 1 and ε > 0; hence,


1 nε
= .
nα (ln n)β nγ (ln n)β
By Proposition 1.1.19, for every ε > 0 and β ∈ R, we have that
nε nε
lim β
= +∞ =⇒ > 1, ∀n ≥ N ,
n→+∞ (ln n) (ln n)β
which implies that
nε 1
γ β
≥ γ.
n (ln n) n
Since 0 < γ < 1, by Comparison Test 2.0.8 and (2.3), we have that the series in (2.4)
diverges for every α < 1 and β ∈ R.
20 CHAPTER 2. NUMERICAL SERIES

• If α > 1, we can write α = γ + ε with 1 < γ < α and ε > 0; hence,


1 1 1
= .
nα (ln n)β γ
n n (ln n)β
ε

Since
1 1
lim = 0 =⇒ ε < 1, ∀n ≥ N ,
n→+∞ nε (ln n)β n (ln n)β
which implies that
1 1 1
≤ γ.
nγ nε (ln n)β n
Since γ > 1 by Comparison Test 2.0.8 and (2.3), we have that the series in (2.4)
converges for every α > 1 and β ∈ R.

• If α = 1 and β ≤ 0 then
(ln n)−β (ln 2)−β

n n
By Comparison Test 2.0.8 and (2.3), we have that the series in (2.4) diverges.

• If α = 1 and β > 0 then we can not use comparison argument with α-series. We apply
then the Integral test since we can associate to the series a function f : [2, +∞) 7→ R+
defined as below
1
f (x) =
x(ln x)β
that is continuous and decreasing . Now, by the change of variable y = ln x we have for
every L > 2
 −β+1
y ln L
6 1
if β =



Z L
1
Z ln L
1  (−β + 1) ln 2

β
dx = β
dy =
2 x(ln x) ln 2 y 

 ln L
ln y

if β = 1 .
ln 2

If β > 1 we have that the series in (2.4) converges since there exists the improper
integral; i.e.,

(ln L)−β+1 − (ln 2)−β+1


Z +∞
1
dx = lim
2 x(ln x)β L→+∞ (−β + 1)
(ln 2)1−β
= .
(β − 1)

Since the series is with positive terms and it converges if and only if β > 1 we can
conclude that it diverges for 0 < β ≤ 1

Example 2.0.11. Determine whether the following series converges or diverges.



X 1
sin .
n
n=1
21

Since
sin n1
lim 1 = 1,
n→+∞
n
by the Limit Comparison Test 2.0.9, we have that the two series
∞ 1 ∞
X X 1
sin ,
n n
n=1 n=1

do the same; i.e., both they diverge.



X 1
.
n(1 + sin n)
n=1
Note that, this is a series with positive terms since 0 < 1 + sin n < 2, in particular we
have that
1 1
≥ .
n(1 + sin n) 2n
By Comparison Test 2.0.8 and (2.3) we have that the series diverges.



X 2n + 1
√ .
n 4+4
n=1

We compare (2n + 1)/ n4 + 4 with 1/n. Indeed,

√2n+1
n4 +4 2n2 + n
lim 1 = lim √
n→+∞
n
n→+∞ n4 + 4
2 + n1
= lim q
n→+∞
1 + n44
= 2.

By the Limit Comparison Test 2.0.9 we have that the series diverges.



X 2n + 1
√ .
n=1
n4 + 4

We compare (2n + 1)/ n4 + 4 con 1/n. More precisely, we compute the ratio

√2n+1
n4 +4 2n2 + n
lim 1 = lim √
n→+∞
n
n→+∞ n4 + 4
2 + n1
= lim q
n→+∞
1 + n44
= 2.

By the Limit Comparison Test 2.0.9 the series diverges.


22 CHAPTER 2. NUMERICAL SERIES


∞ 
X √
n

2−1 .
n=1

n
The series satisfies the necessary condition; i.e., limn→∞ 2 − 1 = 0. Moreover,
√ √
n
2 = elog 2 = elog 2/n ;
n

we may apply the special limit, de l’ Hôpital or Taylor expansion, as you like... and
together with Bridge theorem we get

ex − 1 elog 2/n
lim = 1 =⇒ lim = log 2 .
x→0 x n→∞ 1/n

Therefore, the series diverges since, by the Limit Comparison Test 2.0.9, it has the same
behaviour as harmonic series ∞
P
n=1 1/n.

• √
∞ 
X 1 2
1+ 2 −1
n
n=1
 √ 2
1
The series satisfies the necessary condition; i.e., limn→∞ 1 + − 1 = 0. Moreover,
n2
we may apply de l’ Hôpital or Taylor expansion, that together with Bridge theorem we
get
 √ 2
1
(1 + x)α − 1 1 + n2 −1
lim = 1 =⇒ lim √ = 1.
x→0 αx n→∞ 2/n2
Therefore, the series converges since,
P∞by the 2Limit Comparison Test 2.0.9, it has the
same behaviour as harmonic series n=1 1/n .

Theorem 2.0.12 (Root test). Let (an ) be a nonnegative sequence and assume that there
exists L ∈ [0, 1) and N ∈ N such that

n
an ≤ L , n≥N,

then, the series converges. If there exists N ∈ N such that



n
an ≥ 1 , n≥N,

then, the series diverges to +∞.

As an immediate consequence we have that

Corollary 2.0.13 (Limit Root test ). Let (an ) be a nonnegative sequence and assume that

lim n
an = L .
n→+∞

Then, we have

• if L < 1 then the series converges ,


23

• if L > 1 then the series diverges .


Example 2.0.14.

X 3n + 5n
.
2n + 6n
n=0
Note that r  n
n 3
r 1 +
n 3n + 5 n  5  5
n n
= r n ;
2 +6 6 n 
2
1+ 6

hence, if we pass to the limit


r  n
n 3
r 1 +
n 3n + 5n  5  5 5
lim = lim = .
2n + 6n n→+∞ 6 n
r
n→+∞  n
2 6
1+ 6

By the Limit Root Test, since (5/6) < 1 we have that the series converges.
We can study the convergence of the series also by comparing it with suitable geometric
series. Indeed,
3n + 5 n 3n 5n
= +
2n + 6 n 2n + 6n 2n + 6n
3 n 5 n  1 n  5  n
≤ + = + .
6n 6n 2 6
Hence, by (2.1), we have that
∞ ∞  
X 3n + 5 n X 1 n  5 n
≤ +
2n + 6 n 2 6
n=0 n=0
∞  ∞
X 1  n X  5 n
= +
2 6
n=0 n=0
= 2 + 6.
P∞ P∞
Note that in the previous
P∞ formula we use the following general fact: if n=0 an and n=0 bn
converge then also n=0 (an + bn ) converges and

X ∞
X ∞
X
(an + bn ) = an + bn .
n=0 n=0 n=0

Could you prove it?


Theorem 2.0.15 (Ratio test). Let (an ) be a positive sequence and assume that there exists
L ∈ (0, 1) and N ∈ N such that
an+1
≤ L, n ≥ N ,
an
then, the series converges. If
an+1 ≥ an , n≥N,
then, the series diverges to +∞.
24 CHAPTER 2. NUMERICAL SERIES

As an immediate consequence we have that

Corollary 2.0.16 (Limit Ratio test ). Let (an ) be a positive sequence and assume that
an+1
lim = L.
n→+∞ an

Then, we have

• if L < 1 then the series converges ,

• if L > 1 then the series diverges .

Example 2.0.17 (Case L = 1 in Limit Root and Ratio test). As observed, if L = 1 the series
may be either divergent or convergent as the following examples show.
Let us consider

X 1

n=1

We already know that the series diverges for α ≤ 1 and it converges for α > 1 (see Example
2.3). Nevertheless, if we apply the limit root test, by (1.2), we have that

1 1
lim √ = lim √ = 1, ∀α .
n→+∞ n
n α n→+∞ ( n)α
n

Example 2.0.18. Let us consider



X 1
.
n!
n=1

By Limit Ratio test we have that

1/(n + 1)! n! 1
lim = lim = lim = 0.
n→+∞ 1/n! n→+∞ (n + 1)! n→+∞ (n + 1)

2.0.2 Conditional and absolute convergence


If a series ∞
P
n=0 an has both positive and negative terms
P∞ an then we can consider a new series
by taking the absolute value of each terms; i.e., n=0 |an | and we may ask if such series
converges.

2.0.19. If ∞
P P∞
Definition
P∞ P∞|an | converges then we say that
n=0 P∞ n=0 an converges absolutely.
If n=0 an converges but n=0 |an | does not, we say that n=0 an converges conditionally.

Theorem 2.0.20. If ∞
P P∞
n=0 |an | converges then n=0 an is convergent; i.e., a series absolutely
convergent is always conditionally convergent.

Proof. For every n, p ∈ N we have that


n+p
X n+p
X
|sn+p − sn−1 | = ak ≤ |ak | ;
k=n k=n
25

hence, ∞
P
n=0 |an | converges, by the Cauchy Criterion 2.0.3, for every ε > 0 there exists nε ∈ N
such that for every n ≥ nε and p ∈ N we have
n+p
X
|sn+p − sn−1 | = ak ≤ ε ,
k=n
P∞
which implies that n=0 an converges.

The Vice versa, it is not true as show the following example.


Example 2.0.21. Let us consider

X (−1)n
.
n
n=0
Such series does not converge absolutely since |(−1)n /n| = 1/n. Nevertheless we can prove
that such series converge conditionally thanks to the following theorem.
Similarly, if we consider
X∞ √ 
(−1)n
n
2−1
n=1
by Example 2.0.11 we have that the series it is not absolutely convergent. Nevertheless, also in
this case we can prove that such series converge conditionally thanks to the following Leibniz
Criterion.
Theorem 2.0.22 (Leibniz Criterion). Suppose that an > 0 is a decreasing sequence which
tends to zero as n → +∞. Then,
• the series ∞ n
P
n=1 (−1) an converges ,

• |Rn | = |s − sn | ≤ an+1 , ∀n ∈ N .
Remark 2.0.23. It is possible to prove that in particular
s2n+1 ≤ s ≤ s2n , ∀n ∈ N ,
this implies that we have more information on the approximate the sum of the series s from
below with s2n+1 and from above with s2n .
By Theorem 2.0.22 we can prove that

X (−1)n
n
n=1

converges P
conditionally. The Leibniz criterion is the only method that we are able to provide
for series ∞n=0 an that has both positive and negative terms an .
Remark 2.0.24. The geometric series ∞ n
P
n=0 x with x ∈ R is absolutely convergent for every
|x| < 1. We can apply either the Ratio or the Root Test to prove it. Indeed,
|x|n+1 p
n
= |x| , |x|n = |x| ;
|x|n
hence, by Theorems 2.0.15 and 2.0.12 we get that the series is absolutely convergent
P∞for every
|x| < 1 and it is divergent for every for x ≥ 1. Finally, for x ≤ −1 the series n
P∞ n=0 x =
n n
n=0 (−1) |x| but the Liebniz Criterion does not apply and we can prove that the series
neither converge nor diverge as already observed in (2.1).
26 CHAPTER 2. NUMERICAL SERIES

Example 2.0.25. Say if the following series converges absolutely and/or conditionally.



X sin n
.
n2
n=1

We apply the Comparison Test 2.0.8 to the series of the absolute value
∞ ∞
X | sin n| X 1
≤ < +∞ . (2.5)
n2 n2
n=1 n=1



X 3 + (−1)n 2n
.
6n
n=0

As already observed in Example 2.0.14 if we prove that the two following series
∞ ∞
X 3 X 2n
, (−1)n
6n 6n
n=0 n=0

are both converging then we may conclude that also (2.5) converges. Indeed,
∞ ∞  
X 3 X 1 n
= 3
6n 6
n=0 n=0

that is a geometric series with ratio 1/6 < 1, then it converges. By Leibniz Criterion
also the second series is convergent
∞ ∞
X 2n X n 1
 n
(−1)n = (−1) .
6n 3
n=0 n=0

since (1/3)n is a decreasing sequence, positive and converging to 0.



X sin(n π ) 2
.
n
n=1

Note that (
π 0 ifn = 2k
sin(n ) =
2 −1 ifn = 2k + 1 ,
for k ∈ N. Hence, the series can be rewritten as

X 1
(−1)k ,
2k + 1
k=0

and it converges by the Leibniz criterion.


27



X 1
sin(nπ + ).
n
n=1

Note that we may rewrite the series as



X 1
(−1)n sin( ) ,
n
n=1

by applying sin(nπ + 1/n) = cos nπ sin(1/n) = (−1)n sin(1/n). The series converges by
the Leibniz criterion.

Exercise 2.0.26. Does the series


∞ ∞
X n+3 X n2 + 2n + 5
(−1)n 2
, (−1)n
n + 2n + 5 2n
n=1 n=1

converges absolutely, converges conditionally or diverges?

Solutions:


∞ ∞
X n+3 X n+3
(−1)n 2
= 2
n + 2n + 5 n + 2n + 5
n=1 n=1

using the limit comparison test, comparing with 1/n we get the series diverge. Then
the series does not converge absolutely.
Using the alternating series test, we have to check that the sequence
n+3
n2 + 2n + 5
is decreasing. Then

(n + 1) + 3 n+3
2
≤ 2
(n + 1) + 2(n + 1) + 5 n + 2n + 5

if and only if

(n + 1) + 3 1 (n + 1)2 + 2(n + 1) + 5 2n + 3
=1+ ≤ 2
=1+ 2 .
n+3 n+3 n + 2n + 5 n + 2n + 5
Hence
1 2n + 3
≤ 2
n+3 n + 2n + 5
if and only if n2 + 7n + 4 ≥ 0, that is true for very n ≥ 1. Moreover, it is easy to check
that
n+3
lim 2 = 0;
n→+∞ n + 2n + 5

hence, by Theorem 2.0.22 we have that the series converges conditionally.


28 CHAPTER 2. NUMERICAL SERIES


∞ ∞
X n2 + 2n + 5 X n2 + 2n + 5
(−1)n = .
2n 2n
n=1 n=1

Using the ratio test we have


(n+1)2 +2(n+1)+5  2n  (n + 1)2 + 2(n + 1) + 5
2n+1
n2 +2n+5
=
2n+1 n2 + 2n + 5
2n
1 2n + 3 
= 1+ 2 .
2 n + 2n + 5
Then
1 2n + 3  1
lim 1+ 2 = ,
n→+∞ 2 n + 2n + 5 2
which gives the absolutely convergence of the series.
Chapter 3

Power series in R

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

Given a sequence of real numbers (an ) and a fixed x0 ∈ R we defined a power series
centered at x0 with coefficients (an ) as
+∞
X
an (x − x0 )n
n=0

with x ∈ R. Note that, if the series converges then the sum of the series is given by a function
+∞
X
f (x) := an (x − x0 )n
n=0
P+∞
defined in the set A = {x ∈ R : n=0 an (x − x0 )n < +∞}.

Where else do we see such series?

Example 2.0.2: the Geometric series ! Indeed, if we consider an ≡ 1 and x0 = 0, the power
series takes the form
+∞
X
xn .
n=0

P fix an ≡ c for
Of course, we may fixed constant c ∈ R and x0 6= 0 and still we have a
anyP
geometric series +∞n=0 c(x − x 0 ) n =c +∞ n
n=0 (x − x0 ) that can be solved as in Example 2.0.2
by replacing x with (x − x0 ).

3.1 Convergence of a power series: the radius of convergence


We now want to study the convergence of the power series, we expect that it will depend on
x.
P+∞ First of all we observe that such series converges at least at x = x0 since in this case
n
n=0 an (x0 − x0 ) = a0 . The following Theorem provides a characterisation of the set of
convergence of the series.

29
30 CHAPTER 3. POWER SERIES IN R

P+∞ n
Theorem 3.1.1. Given n=0 an (x − x0 ) . Then, one of the following statements holds true:
(1) the series converges only at x = x0 ,
(2) the series converges absolutely for every x ∈ R ,
(3) there exists R > 0 such that the series converges absolutely for every |x − x0 | < R and it
does not converge for every |x − x0 | > R . For |x − x0 | = R there is no general statement
on the convergence of the series.
Proof. Without loss of generality we may assume that x0 = [Link] is always P possible by
a change of variable y = x − x0 . Suppose that there exists x1 6= 0 such that +∞ n
n=0 an x1
converges.
P+∞ We now prove that the series converges absolutely for every |x| < |x1 |. Indeed,
since n=0 an x1 converges we have that limn→+∞ an xn1 = 0 then it is bounded; i.e., there
n

exists M > 0 such that


|an xn1 | ≤ M , ∀n ∈ N .
Therefore, for every n ∈ N
x n x n
|an xn | = |an xn1 | ≤M ,
x1 x1
and, by the comparison test, we have that
+∞ +∞
x X x n X
< 1 =⇒ < +∞ , =⇒ |an xn | < +∞ .
x1 x1
n=0 n=0
We now set
n +∞
X o
R := sup |x| ∈ R : an xn < +∞ .
n=0
Note that, the set is not empty since at least x = 0 belongs to it; hence, the definition of R
is well posed.
If R = 0, +∞ then (1) and (2) holds true. If R ∈ (0, +∞) then the series converges
absolutely for every |x| < R and it does not converge not only absolutely but also conditionally
for |x| > R, otherwise we will have a contraction by the definition of R as supremum. Then
also (3) holds true.
In the general case x0 6= 0, we define
n +∞
X o
R := sup |x − x0 | ∈ R : an (x − x0 )n < +∞ ,
n=0
and we reason as above by making a change of variable y = x − x0 .
The radius of convergence can be computed by applying the Root and Ratio test for series.
Proposition 3.1.2. Given +∞ n
P
n=0 an (x − x0 ) assume that there exists
p
lim n |an | =: L ∈ [0, +∞] .
n→+∞

Then, the radius of convergence of the series is given by


1



L if L ∈ (0, +∞)
R = +∞ if L = 0 (3.1)


0 if L = +∞ .

3.1. CONVERGENCE OF A POWER SERIES: THE RADIUS OF CONVERGENCE 31

Proof. For x 6= x0 we have that


p p
lim n |an (x − x0 )n | = |x − x0 | lim n |an | = L |x − x0 | .
n→+∞ n→+∞

By the Root Test, the series converges absolutely if L |x−x0 | < 1; i.e., for every |x−x0 | < 1/L
and it does not converge if |x − x0 | > R = 1/L. Then R = 1/L.
If L = +∞, the series converges only for x = x0 then R = 0. Finally, if L = 0 then the
series converges for every x ∈ R.

Similarly,
P+∞
Proposition 3.1.3. Given n=0 an (x − x0 )n assume that there exists
an+1
lim =: L ∈ [0, +∞] .
n→+∞ an
Then, the radius of convergence of the series is given by
1



L if L ∈ (0, +∞)
R = +∞ if L = 0 (3.2)


0 if L = +∞ .

Example 3.1.4. Find the interval of convergence of the following power series.

+∞
X (x + 3)3n
.
8n n2
n=1
The series is centered at x = −3. We study the absolutely convergence by applying the
ratio test:
|x+3|3(n+1)
8n+1 (n+1)2 |x + 3|3(n+1) 8n n2
|x+3|3n
= ·
8n+1 (n + 1)2 |x + 3|3n
8n n2
|x + 3|3 n2
= ·
8 (n + 1)2
then
|x+3|3(n+1)
8n+1 (n+1)2 |x + 3|3
lim |x+3|3n
= .
n→+∞ 8
8n n2
If |x + 3| < 2 the series converges absolutely, then R = 2. Let us study what happens
on the extremes of the interval; i.e., |x + 3| = 2. If we evaluate the serie x = −5 then
+∞ +∞ +∞
X 23n X
n 8
n X 1
(−1)n n 2
= (−1) n 2
= (−1)n 2
8 n 8 n n
n=1 n=1 n=1

that is a series absolutely convergent. If we evaluate the series at x = −1 then


+∞
X 1
n2
n=1

which is again convergent. Hence, the power series converges absolutely in [−5, −1].
32 CHAPTER 3. POWER SERIES IN R


+∞ n
X x
.
n!
n=1

By Ratio test we have that


1
(n+1)! 1
lim 1 = lim = 0.
n→+∞
n!
n→+∞ (n + 1)

Hence, by (3.2), we have that R = +∞; i.e., the series converges absolutely for every
x ∈ R.


+∞ n
X x
.
n
n=1

By Root test we have that


r
n 1 1
lim = lim √
n
= 1.
n→+∞ n n→+∞ n

Hence, by (3.1), we have that R = 1; i.e., the series converges absolutely for every
|x| < 1. If |x| = 1 then we have

+∞ +∞
X (−1)n X 1
< +∞ , = +∞ ,
n n
n=1 n=1

which implies that the power series converges in the interval [−1, 1).

• For α ∈ R
+∞
X
nα xn .
n=1

We recall that

lim = 0, ∀α ∈ R , a > 1 ;
n→+∞ an

hence, the necessary condition for the convergence of the series is satisfied only if |x| < 1
for every α ∈ R or if |x| = 1 and α < 0. Moreover,

n
lim nα = 1 , ∀α ∈ R ;
n→+∞

hence, by Proposition 3.1.2 we have that R = 1 and the series converges absolutely for
|x| < 1 and every α ∈ R. If x = 1 the series converges for α < −1; if x = −1, by Leibniz
Criterion, the series converges for every α < 0.
Sumarising, we have that the series converges in (−1, 1) for every α ∈ R, in [−1, 1] for
every α < −1, in [−1, 1) for every α ∈ [−1, 0).
3.2. TAYLOR SERIES 33

3.2 Taylor series


The Taylor series of a function f that is infinitely differentiable at a point x0 is a power series
centered at x0 with coefficients f (n) (x0 )/n!; i.e.,

X f (n) (x0 ) f 2 (x0 ) f 3 (x0 )
(x − x0 )n = f (x0 ) + f 0 (x0 )(x − x0 ) + (x − x0 )2 + (x − x0 )3
n! 2 3!
n=0
f 4 (x0 ) f (n) (x0 )
+ (x − x0 )4 + · · · + (x − x0 )n + ....
4! n!
where f (n) (x0 ) denotes the n-derivative of the function f at x0 and n! = 1 · 2 · 3 · 4 · · · (n − 1) · n
(0! = 1). Many questions arise naturally!

(1) What about the convergence of the series?

(2) The series converges to the function f ?

(3) What about functions that are not infinitely differentiable but only n-times differen-
tiable?

We will start by answering to Question 3 !

3.2.1 Taylor polynomials


First of all we prove that if a function is n-differentiable at a point x0 it can be approximated
by (Taylor) polynomials! How? How do we determine the accuracy when we use a (Taylor)
polynomial to approximate a function?
Let’s start by the case n = 1!
Let f : I 7→ R be a function differentiable in x0 ∈ I then we can state the equation of the
tangent line at the point (x0 , f (x0 )) as y = f (x0 ) + f 0 (x0 )(x − x0 ) where f 0 (x0 ) is the angular
coefficient. The tangent line is in particular a polynomial of degree 1 that we can denote by

P1 (x; x0 ) := f (x0 ) + f 0 (x0 )(x − x0 ) ,

which satisfies the following property

f (x) − P1 (x; x0 )
lim = 0.
x→x0 (x − x0 )

Indeed, if we denote by R1 (x; x0 ) := f (x)−P1 (x; x0 ); i.e., the remainder between the function
and the tangent line at (x0 , f (x0 )), then by definition of derivative we have that

R1 (x; x0 ) f (x) − f (x0 )


lim = lim − f 0 (x0 ) = 0 . (3.3)
x→x0 (x − x0 ) x→x0 (x − x0 )

Formula (3.3) says that the remainder R1 (x; x0 ) goes to zero, as x → x0 , faster than (x − x0 )
which gives us an important information on the capacity to approximate the graph of the
function f with the tangent line at the graph around (x0 , f (x0 )); i.e., with the polynomial
P1 (x; x0 ).
We need a language to describe the behaviour of a function that is vanishing as x → x0 .
34 CHAPTER 3. POWER SERIES IN R

Definition 3.2.1. Given two functions f and g defined in an interval I with x0 ∈ I such
that f (x0 ) = g(x0 ) = 0, we say that f is a “small o”of g and we write
f (x)
f (x) = o(g(x)) ⇐⇒ lim = 0;
x→x0 g(x)
that is, the function f approaches 0, as x → x0 , faster than g.
Hence, by Definition 3.2.1 we have that R1 (x; x0 ) = o(x − x0 ) and

f (x) = P1 (x; x0 ) + o(x − x0 )


= f (x0 ) + f 0 (x0 )(x − x0 ) + o(x − x0 ) .

Theorem 3.2.2 (Taylor Formula). If f : I 7→ R has n-derivatives on an open interval I that


contains x0 , we define, for every x ∈ I, the Taylor polynomial Pn (x; x0 ) and the remainder
Rn (x; x0 ) as
n
X f (k) (x0 )
Pn (x; x0 ) := (x − x0 )k , Rn (x; x0 ) := f (x) − Pn (x; x0 ) .
k!
k=0

Then,
Rn (x; x0 )
lim = 0,
x→x0 (x − x0 )n
or, equivalently,
Rn (x; x0 ) = o((x − x0 )n ) .
As a consequence of the theorem above we have that

f 2 (x0 ) f 3 (x0 ) f (n) (x0 )


f (x) = f (x0 )+f 0 (x0 )(x−x0 )+ (x−x0 )2 + (x−x0 )3 +· · ·+ (x−x0 )n +o((x−x0 )n )
2 3! n!
and the error we incur by approximating f with a polynomial Pn (x; x0 ) near x0 is given by
Rn (x; x0 ) that goes to zero faster than (x − x0 )n , as x → x0 .
Corollary 3.2.3 (Lagrange Formula for the remainder). If f has (n + 1)-derivatives on an
open interval I that contains x0 then the remainder in Taylor’s theorem can be written as

f (n+1) (ξ)
Rn (x; x0 ) = (x − x0 )n+1
(n + 1)!
with ξ ∈ R between x and x0 .
Remark 3.2.4 (Maclaurin Formula). If x0 = 0 the Taylor formula is also called Maclaurin
Formula.
Example 3.2.5. • There functions that we can not keep taking derivatives as f (x) = |x|3
that is differentiable only two times at x0 = 0:
|x|3
f 0 (0) = lim =0
x→0 x
f 2 (0) = lim 3|x| = 0
x→0
3
@f (0) .
3.2. TAYLOR SERIES 35

• The Taylor Polynomial for the exponential function f (x) = ex with x0 = 0 is given by

x2 x3 xn
Pn (x : 0) = 1 + x + + + ··· + (3.4)
2 3! n!
Since ex is infinitely differentiable we can use the Lagrange formula for the remainder

xn+1 |x|n+1 |x|n+1


Rn (x; 0) = eξ =⇒ Rn (x; 0) = eξ ≤M
(n + 1)! (n + 1)! (n + 1)!
where M = ex for every fixed x > 0 ( since 0 < ξ < x) or M = 1 for every fixed x < 0.
It follows then that limn→+∞ Rn (x; 0) = 0 which implies the convergences of the series
+∞ n
X x
n!
n=0

for every fixed x ∈ R as already showed in Examples 3.1.4 (see also Definition 2.0.1).
Therefore we can approximate ex as closely we wish by Taylor polynomials, in particular,
+∞ n
X x
ex = .
n!
n=0

3.2.2 From the Taylor polynomials to the Taylor series


In Section 3.2.1 we have computed the Taylor polynomials for a differentiable function and
we have used it to approximate that function. We have also observed that if the function is
infinitely differentiable we can compute a Taylor series and since it is in particular a power
series, we know how to study its convergence (see Section 3.1). By the general theory de-
veloped in Section 2 for numerical series we recognise the Taylor polynomials as the partial
sums of the Taylor series. This answers to Question 1 !
Now, we can address also Question 2:

When does a function equal its Taylor series?

The function f (x) will equal the Taylor series in x provided the remainder Rn (x; x0 ) goes
to zero as n → +∞; i.e., for every fixed x “near x0 ” ( and of course in the domain of f )

X f n (x0 ) n
 
f (x) = (x − x0 ) ⇐⇒ lim f (x) − Pn (x; x0 ) = 0 .
n! n→+∞
n=0

Example 3.2.6 (VIE: very important example). Let us consider the following function de-
fined on R ( 2
e−1/x , x 6= 0
f (x) =
0, x = 0.
The function f is infinitely differentiable in x = 0. Indeed, by applying L’ Hopital rules and
the hierarchy between power and exponential, we have that
2
e−1/x 2 2
f 0 (0) = lim = lim 3 e−1/x = 0 .
x→0 x x→0 x
36 CHAPTER 3. POWER SERIES IN R

2
If we continue to derive we have that f n is a sum of terms of the type e−1/x /xh (up to
some constants), which implies that passing into the limit as x → 0 we always get f n (0) = 0!
Therefore, the Taylor series of f at x0 = 0 is identically zero and then, trivially, it converges
for every x “near to 0”but the function f equals the Taylor series only at x = 0!

We conclude this section by saying:

What can go wrong?

(1) For some functions the derivatives exist at x = x0 but are too big (they grow too
quickly)...Imagine if f n (0) = (n!)2 then f n (0)/n!n! and the Taylor series around 0 is

X
n!xn
n=0

which has a radius of convergence R = 0. There exists such a function but the formula
is quite complicated....

(2) Example 3.2.6 shows that for some functions Taylor series converges but not to the
function itself! In this case the polynomials are not the right object to describe around
2
0 an exponential like e−1/x that probably decreases too fast near to zero ...

Example 3.2.7. • Let’s study the Taylor series of the sine function f (x) = sin x. We
recall that

f (x) = sin x , f 0 (x) = cos x , f 2 (x) = − sin x , f 3 (x) = − cos x ,


f 4 (x) = sin x , ···

From the derivative of order 4 the pattern repeats itself then if we consider x0 = 0
we have that the even derivative are always zero at 0 and the odd derivatives are
alternatively 1 and −1

f (0) = 0 , f 2 (0) = 0 , f 4 (0) = 0 ,


f 0 (0) = 1 , f 3 (0) = −1 , f 5 (0) = 1 , · · · .

Therefore in the Taylor polynomials only odd powers appear and this is not surprising
since the sine function is and odd function and it is infinitely differentiable; hence, for
every n ∈ N we have that
n
X x2h−1 x2n+1  d2n+1 
sin x = (−1)h−1 + sin x
(2h − 1)! (2n + 1)! dx x=ξ
h=1
n
X x2h−1 x2n+1
= (−1)h−1 + (−1)(n) cos ξ ,
(2h − 1)! (2n + 1)!
h=1

since  d2n+1 
sin x = (−1)n cos x .
dx
3.2. TAYLOR SERIES 37

Therefore,
|x|2n+1
lim |R2n−1 (x; 0)| ≤ lim = 0,
n→+∞ n→+∞ (2n + 1)!

we have that the Taylor series converges to the sine function


+∞
X x2h−1
sin x = (−1)h−1 .
(2h − 1)!
h=1

Similarly, we can prove that


n
X x2h x2n+2
cos x = (−1)h + (−1)(n+1) cos ξ ;
(2h)! (2n + 2)!
h=0

hence,
|x|2n+2
lim |R2n (x; 0)| ≤ lim = 0,
n→+∞ n→+∞ (2n + 2)!

and
+∞
X x2h
cos x = (−1)h .
(2h)!
h=0

• Let us consider
1
f (x) = ,
1−x

1 1 2 3!
f (x) = , f 0 (x) = , f 2 (x) = , f 3 (x) = ,
1−x (1 − x)2 (1 − x)3 (1 − x)4
n!
· · · f n (x) = ;
(1 − x)n
hence, there exists ξ between 0 and x such that
n
1 X xn+1
= xh + .
1−x (1 − ξ)n+1
h=0

Note that, the remainder can be also rewritten in the following form
n
1 − nh=0 xh (1 − x)
P
1 X
h
Rn (x; 0) = − x =
1−x 1−x
h=0
Pn
1 − h=0 (xh − xh+1 )
=
1−x
1 − (1 − x + x − x2 + x2 − · · · + xn − xn+1 )
=
1−x
x n+1
= .
1−x
Hence, if |x| < 1 we have that limn→+∞ Rn (x; 0) = 0 and we have the convergence of
the series
+∞
1 X
= xn , ∀|x| < 1 ,
1−x
h=0
38 CHAPTER 3. POWER SERIES IN R

which agrees with the analysis that we performed for the geometric series in Example
2.0.2.

• We come now to the logarithm function

f (x) = ln(1 + x)

which is defined in (−1, +∞) and on that interval has derivatives of all orders:

1 1 2 3!
f 0 (x) = , f 2 (x) = − , f 3 (x) = , f 4 (x) = − ,
1+x (1 + x)2 (1 + x)3 (1 + x)4
4!
f 5 (x) = ,···
(1 + x)5

The pattern is clear

(h − 1)!
f h (x) = (−1)h−1 , ∀h ≥ 1 =⇒ f h (0) = (−1)h−1 (h − 1)! .
(1 + x)h

Therefore,
n
X (−1)h−1 (−1)n xn+1
ln(1 + x) = xh + .
h (n + 1) (1 + ξ)n+1
h=1

If 0 < ξ < x then 1/(1 + ξ) < 1 and

|x|n+1
lim |Rn (x; 0)| ≤ lim = 0, ∀ 0 < x < 1.
n→+∞ n→+∞ (n + 1)

Actually, we can prove that the remainder by Lagrange formula goes to zero, as n →
+∞, for every −1/2 < x < 1. To recover (−1, 1) we have to apply another formula
that allows us to represent the remainder term in integral form. Indeed, by the general
theory of power series, we can prove that the radius of convergence of the Taylor series
is R = 1 and it is possible to prove (by using the integral formula of the remainder)
that the sum of series egual the function; i.e.,
+∞
X (−1)n−1
ln(1 + x) = xn , ∀|x| < 1 .
n
n=1
Chapter 4

Riemann Integral

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

4.1 Riemann Integral


We assume f : [a, b] 7→ R bounded function defined on a closed bounded interval [a, b]; hence,
there exists m, M ∈ R such that

m ≤ f (x) ≤ M ∀x ∈ [a, b] .

A partition P of [a, b] is a finite sets of points xi (not necessarily uniformly spread) for
i = 0, · · · , n such that
a = x0 ≤ x1 ≤ · · · ≤ xi ≤ · · · ≤ xn = b ,
where we label the endpoints of the subintervals by x0 , x1 , ..., so that the leftmost point is
a = x0 and the rightmost point is b = xn . We denote by Ii = [xi−1 , xi ], i = 1, · · · , n. There
always exist

mi := inf{f (x) : x ∈ Ii } ,
Mi := sup{f (x) : x ∈ Ii } ,

since f is bounded we have that mi , Mi ∈ R for every i = 0, · · · , n. Hence, we define


n
X
s(f, Pn ) := mi (xi − xi−1 )
i=1
Xn
S(f, Pn ) := Mi (xi − xi−1 ) ,
i=1

where s(f, Pn ) and S(f, Pn ) denote the lower sum and the upper sum, respectively, of f
with respect to the partition Pn . Note that, by definition

s(f, P ) ≤ S(f, P )

for every P partition of [a, b]. If we increase the number of points of the partition; i.e.,
we consider Pm with m > n, then s(f, Pn ) ≤ s(f, Pm ) and similarly, S(f, Pn ) ≥ S(f, Pm ).

39
40 CHAPTER 4. RIEMANN INTEGRAL

Indeed, assume for simplicity that we add just one point x̄ ∈ Ij ; hence, we get a new partition
Pn+1 = {a = x0 ≤ x1 ≤ · · · ≤ xi ≤ · · · xj−1 < x̄ < xj < · · · < xn = b}. We may split the
interval Ij := [xj−1 , x̄) ∪ [x̄, xj ] and we get that

mj ≤ m1j := inf{f (x) : x ∈ [xj−1 , x̄)} , mj ≤ m2j := inf{f (x) : x ∈ [x̄, xj ]} ,

moreover,

mj (xj − xj−1 ) = mj (x̄ − xj−1 ) + mj (xj − x̄) ≤ m1j (x̄ − xj−1 ) + m2j (xj − x̄) .

Therefore,
n
X
s(f, Pn ) = mi (xi − xi−1 )
i=1
j−1
X n
X
≤ mi (xi − xi−1 ) + m1j (x̄ − xj−1 ) + m2j (xj − x̄) + mi (xi − xi−1 )
i=1 i=j+1
= s(f, Pn+1 ) ,

similarly, we get
S(f, Pn ) ≥ S(f, Pn+1 ) ,
and
s(f, Pn ) ≤ s(f, Pn+1 ) ≤ S(f, Pn+1 ) ≤ S(f, Pn ) .
Hence, it turns out that s(f, Pn ) and S(f, Pn ) have a monotone behaviour and we may define
the lower and upper integral as

s(f ) := sup s(f, Pn ) ≤ S(f ) := inf S(f, Pn ) ,


n n

respectively.
The following example clarify the role of lower and upper sum and lower and upper integral
in the Definition 4.1.5 of the Riemann integral.

Example 4.1.1 (Method of exhaustion to compute the area underneath the graph
of a parabola). Let us consider an increasing positive monotone function f (x) = x2 in
[0, 1]. We investigate the area of the region that is under the graph of f (x) and above the
interval [a, b] on the x-axis. The region under the graph of f (x) has such a strange shape,
calculating its area is too difficult. But calculating the area of rectangles is simpler! Let’s
simplify our life by pretending the region is composed of a bunch of rectangles. We divide
[0, 1] into n subintervals of length xi − xi−1 = (1/n) and we construct rectangles with base
given by (xi − xi−1 ) and height equal to Mi or mi . Hence, by adding up the areas of all the
rectangles we get
n
X mi
s(f, Pn ) =
n
i=1
n
X Mi
S(f, Pn ) = ,
n
i=1
4.1. RIEMANN INTEGRAL 41

where s(f, Pn ) and S(f, Pn ) denote the lower sum and the upper sum, respectively, of f
with respect to the partition Pn . The lower and upper sum s(f, Pn ) and S(f, Pn ), represent
only an approximation to the actual area underneath the graph of f ; i.e.,
n n
X mi X Mi
≤ Area(Gf ) ≤
n n
i=1 i=1

where Gf = {(x, y) ∈ R × R : x ∈ [a, b], 0 ≤ y ≤ x2 }. Since f is an increasing function we


have that mi = f (xi−1 ) and Mi = f (xi ); hence,
n n−1
1 X (i − 1) 2 1 X 2 (n − 1)n(2n − 1)
s(f, Pn ) = ( ) = ( )3 k = ,
n n n 6
i=1 k=0

similarly,
n n
1X i 2 1 X 2 n(n + 1)(2n + 1)
S(f, Pn ) = ( ) = ( )3 i = .
n n n 6
i=1 i=1

To make the approximation better, we have to increase the number of points xi which makes
increase the number of subintervals; as already observed, we have that s(f, Pn ) ≤ s(f, Pn+1 ) ≤
S(f, Pn+1 ) ≤ S(f, Pn ). Therefore,

(n − 1)n(2n − 1) n(n + 1)(2n + 1)


s(f, Pn ) = 3
≤ Area(Gf ) ≤ = S(f, Pn ) ,
6n 6n3
for every n ∈ N, and
 (n − 1)n(2n − 1)  (n − 1)n(2n − 1)
sup = lim
n 6n3 n→+∞ 6n3
1
=
3
n(n + 1)(2n + 1)  n(n + 1)(2n + 1) 
= lim = inf .
n→+∞ 6n3 n 6n3
Hence, by the comparison theorem for sequences, we have that

Area(Gf ) = sup s(f, Pn )


n
= inf S(f, Pn )
n
1
= .
3
The example shows that when the number of subintervals increase the lower and the upper
sum approach the area Area(Gf ) from above and from below therefore is quite intuitive to
reach Area(Gf ) as the infimum of S(f, P ) among all possible partition P as well as the
supremum of s(f, P ).

Example 4.1.2. Let f (x) = c, with c ∈ R, then f si integrable and the integral is
Z b
c dx = c(b − a) .
a
42 CHAPTER 4. RIEMANN INTEGRAL

Indeed,
n
X
s(f, P ) = c (xi − xi−1 ) = S(f, P ) = c (b − a) ;
i=1
hence,
s(f ) = S(f ) = c (b − a) .
If f is bounded but not necessarily continuous in [a, b] we can generalize the definition of
s(f, P ) and S(f, P ) by using inf and sup instead of min and max. More precisely, we denote
by
mi := inf f (x) , Mi := sup f (x) .
x∈[xi−1 ,xi ] x∈[xi−1 ,xi ]

Example 4.1.3. Let f : [0, 2] 7→ R be defined as



1
 x ∈ [0, 1)
f (x) = 1/2 x = 1 (4.1)

0 x ∈ (1, 2] .

Let 0 < ε < 1 and consider Pε = {0 < x1 := 1 − ε < x2 := 1 + ε < 2} then we have

m1 = inf f (x) = 1 M1 = sup f (x) = 1


x∈[0,1−ε] x∈[0,1−ε]
m2 = inf f (x) = 0 M2 = sup f (x) = 1
x∈[1−ε,1+ε] x∈[1−ε,1+ε]
m3 = inf f (x) = 0 M3 = sup f (x) = 0 .
x∈[1+ε,2] x∈[1+ε,2]

Hence,

s(f, Pε ) = m1 (1 − ε) + m2 2ε + m3 (1 − ε) = 1 − ε
S(f, Pε ) = M1 (1 − ε) + M2 2ε + M3 (1 − ε) = 1 − ε + 2ε = 1 + ε .

Therefore,
inf S(f, P ) − sup s(f, P ) < S(f, Pε ) − s(f, Pε ) = 2ε .
P P
By the arbritrariness of ε we have that
Z 2
inf S(f, P ) = sup s(f, P ) = f (x) dx = 1 .
P P 0

Nevertheless, if f is bounded but not continuous it may also happen that...


Example 4.1.4 (Dirichlet function). Consider the Dirichlet’s function over [0, 1]
(
1 x ∈ [0, 1] ∩ Q
f (x) =
0 x ∈ [0, 1] ∩ R \ Q

for any partition P we have that mi = 0 and Mi = 1 for all i = 1, · · · , n. Therefore,


s(f, P ) = 0 and S(f, P ) = 1 and

0 = sup s(f, P ) < inf S(f, P ) = 1 .


P P
4.1. RIEMANN INTEGRAL 43

We are now ready to define the Riemann integral.

Definition 4.1.5. Let f : [a, b] 7→ R be a bounded function with −∞ < a < b < +∞. We
define lower Riemann integral and upper Riemann integral as

s(f ) := sup s(f, P ) , S(f ) := inf S(f, P ) ;


P P

respectively, where
n
X
s(f, P ) = mi (xi − xi−1 )
i=1
Xn
S(f, P ) = Mi (xi − xi−1 ) ,
i=1

with
mi := inf f (x) , Mi := sup f (x) .
x∈[xi−1 ,xi ] x∈[xi−1 ,xi ]

We say that f is Riemann integrable if

s(f ) = S(f ) .

We call the (Riemann) Integral of f over [a, b] the real number


Z b
f (x) dx := s(f ) = S(f ) .
a

Math vocabulary: a and b are also called extremes of integration, f is the integrand, dx
states that “it’s summing”
Rb all increments of the function f . Since the extremes of integration
are fixed we call a f (x) dx also definite integral.

Proposition 4.1.6 (Integrability Criterion). Let f : [a, b] 7→ R be a bounded function, we say


that f is Riemann integrable over [a, b] if and only if for every ε > 0 there exists a partition
Pε of [a, b] such that
S(f, Pε ) − s(f, Pε ) < ε .

Theorem 4.1.7. Let f : [a, b] 7→ R be a bounded function.

a If f is continuous on [a, b] then f is Riemann integrable.

b If f is monotone on [a, b] then f is Riemann integrable.

c If f has a finitely many discontinuities (i.e. f is continuous on [a, b] except on a finite


number of points), then f is Riemann integrable.

Proof. (b). Assume f is an increasing function (for decreasing function the argument is the
same). We consider the partition Pn which divides the interval [a, b] into n sub-intervals of
equal length (and the length is (b−a)/n) meaning xi = a+i(b−a)/n, i = 0 · · · , n. Then, since
44 CHAPTER 4. RIEMANN INTEGRAL

f is increasing, we have mi = inf [xi−1 ,xi ] f (x) = f (xi−1 ) and Mi = sup[xi−1 ,xi ] f (x) = f (xi );
the lower and upper sums are
n
X
S(f, Pn ) − s(f, Pn ) = (f (xi ) − f (xi−1 ))(xi − xi−1 )
i=1
b − a
= (f (xi ) − f (xi−1 ))
n
b − a
= (f (b) − f (a)) .
n
Hence, for every ε > 0 there exists Pn with n = d1/εe (that is the ceiling function, 1/ε ≤ n),
such that S(f, Pn ) − s(f, Pn ) < ε.
(c) We may divide the interval [a, b] into finitely many subintervals [ai−1 , ai ] where f is
continuous on the interior: [a, b] = [a1 , a2 ] ∪ [a2 , a3 ] ∪ · · · ∪ [an−1 , an ]. By using the additivity
result with respect to the domain of integration we have that
Z b Xn Z bi
f (x) dx = f (x) dx .
a i=1 ai

Example 4.1.8. (
1 + sin x1 x ∈ (0, 1]
f (x) =
0 x = 0.

4.2 Properties of Riemann Integral


From now on we will refer to Riemann integrable function or Riemann integral as integrable
function or integral, respectively.
Let f and g be integrable functions on [a, b] and let λ ∈ R. Then:

1) (Additivity) the integral of the sum or difference of two functions can be computed
by integrated each term separately
Z b Z b Z b
(f (x) ± g(x)) dx = f (x) dx ± g(x) dx ; (4.2)
a a a

2) (Linearity) a constant factor λ ∈ R can be moved outside the integral sign


Z b Z b
λ f (x) dx = λ f (x) dx ; (4.3)
a a

3) (Additivity with respect to the interval of integration): for every c ∈ (a, b) we


have that Z b Z c Z b
f (x) dx = f (x) dx + f (x) dx ; (4.4)
a a c

4) (Positivity) if f ≥ 0 (respectively, f (x) ≤ 0) then


Z b
f (x) dx ≥ 0 (resp. ≤ 0) . (4.5)
a
4.2. PROPERTIES OF RIEMANN INTEGRAL 45

As a consequence of (1)-(2)-(4) we have the following comparison properties between


integrals:

5) (Monotonicity) If f ≤ g on [a, b] then


Z b Z b
f (x) dx ≤ g(x) dx ; (4.6)
a a

6) (Modulus)
Z b Z b
f (x) dx ≤ |f (x)| dx . (4.7)
a a

Finally, note that so far we always assume that a < b for the intervals of integration. In
general, we set

• Z a
f (x) dx = 0 ;
a

• Z a Z b
f (x) dx = − f (x) dx .
b a

Remark 4.2.1. Geometric Interpretation.


Example 4.1.1 shows that if f is a positive function the area of the region that is under
the graph of f (x) and above the interval [a, b] on the x-axis can be compute by the Riemann
integral. If f has a changing sign, for example, f is positive on [a, c] and negative on [c, b],
then the integral
Z b Z c Z b
f (x) dx = f (x) dx + f (x) dx
a a c
= Area({(x, y) ∈ R × R : x ∈ [a, c], 0 ≤ y ≤ f (x)})
−Area({(x, y) ∈ R × R : x ∈ [c, b], 0 ≤ y ≤ −f (x)}) ;

that is, the integral is the sum of the areas with sign! In particular, we may have that
Z b
f (x) dx = 0 .
a

Theorem 4.2.2 (Mean value Theorem for Integrals). Let f be a continuous function on [a, b]
then there exists x0 ∈ [a, b] such that
Z b
1
f (x) dx = f (x0 ) .
(b − a) a

Proof. By the monotonicity of the integral, Example 4.1.2 and Weierstrass’s theorem for
continuous functions on a bounded and closed interval we have that
Z b
(b − a) min f (x) ≤ f (x) dx ≤ (b − a) max f (x)
x∈[a,b] a x∈[a,b]
46 CHAPTER 4. RIEMANN INTEGRAL

which implies
Z b
1
min f (x) ≤ f (x) dx ≤ max f (x) .
x∈[a,b] (b − a) a x∈[a,b]

Since the continuous functions takes any given values between their minimum value and their
maximum value (this is statement of the Intermediate Value theorem), we can conclude that
there exists x0 ∈ [a, b] such that
Z b
1
f (x0 ) = f (x) dx .
(b − a) a

Definition 4.2.3. A function F : [a, b] 7→ R is called primitive or antiderivative of a


function f : [a, b] 7→ R if F is differentiable on [a, b] and F 0 (x) = f (x) for all x ∈ [a, b].
The Theorem 4.2.2 allows us to prove a very important theorem: the Fundamental The-
orem of Integral Calculus. Such theorem is extremely powerful since it establishes the
relationship between differentiation and integration, and gives us a way to evaluate definite
integrals without using Riemann sums. The theorem is comprised of two parts, the first of
which, establishes the relationship between differentiation and integration but also it guaran-
tees that any continuous function has a primitive function that is its integral function. The
second part of the theorem guarantees that given a primitive function we can evaluate the
definite integral by evaluating the primitive F at the extremes of integration and subtracting.
Theorem 4.2.4 (Fundamental Theorem of Integral Calculus). Let f : [a, b] 7→ R be a con-
tinuous function. We define the bf integral function F : [a, b] 7→ R as follows
Z x
F (x) := f (t) dt . (4.8)
a

Then F is differentiable on [a, b] and

F 0 (x) = f (x) , ∀x ∈ [a, b] . (4.9)

Moreover, if G is a differentiable function such that G0 (x) = f (x); i.e., G is any primitive of
f , then Z x
f (t) dt = G(x) − G(a) .
a

Proof. Applying the definition of the derivative, we have

F (x) − F (x0 ) 1 Z x Z x0 
= f (t) dt − f (t) dt
x − x0 (x − x0 ) a a
1 Z x 
= f (t) dt .
(x − x0 ) x0

By the Mean value Theorem for Integrals 4.2.2 we have that there exists ξ between x and x0
such that
F (x) − F (x0 )
= f (ξ) ;
x − x0
4.2. PROPERTIES OF RIEMANN INTEGRAL 47

hence, by continuity of f we have that there exists the limit as x tends to x0

F (x) − F (x0 )
lim = f (x0 )
x→x0 x − x0

for any x0 ∈ [a, b]. It follows that F is differentiable and F 0 (x) = f (x).
Let G be such that G0 (x) = f (x), then by definition of G and the first part of the theorem
we have that

F 0 (x) − G0 (x) = 0 → F (x) − G(x) = c = F (a) − G(a) = −G(a)

with c an arbitrary constant. Hence, F (x) = G(x) − G(a); i.e.,


Z x
f (t) dt = G(x) − G(a) , ∀x ∈ [a, b] .
a

Remark 4.2.5. Note that if F and G are both primitive of f then F and G differ by an
additive constant; i.e.,
G(x) = F (x) + c ,
c ∈ R. Moreover, if we change the extreme of integration a with any other x1 ∈ [a, b] then
Z x Z x1 Z x Z x
f (t) dt = f (t) dt + f (t) dt = C + f (t) dt ;
a a x1 x1

hence, without loss of generality we can always consider a has endpoints in the definition of
integral function F .
By Theorem 4.2.4 we have then any definite integral
Z b
f (t) dt = G(b) − G(a) ;
a

equivalently,
Z b b
f 0 (t) dt = f (x) = f (b) − f (a) .
a a

Definition 4.2.6 (Indefinite Integral). The indefinite integral of f is the set of all possible
primitives or antiderivatives of f ; i.e.,
Z
f (x) dx = {F (x) + c , ∀c ∈ R} .
48 CHAPTER 4. RIEMANN INTEGRAL

Function Primitive Indefinite Integrals


Z
sin x − cos x sin x dx = − cos x + c

Z
cos x sin x cos x dx = sin x + c

xα+1 xα+1
Z
xα , α 6= −1 xα dx = +c
α+1 α+1
Z
1 1
, x 6= 0 ln |x| dx = ln |x| + c
x x
Z
ex ex ex dx = ex + c

ax ax
Z
ax , (a > 0, a 6= 1) ax dx = +c
ln a ln a

Let us study the case of xα , α 6= −1. We expect that the primitive of xα is still a power
function, xβ , since its derivative should gives back a power function too. Hence,
d β
x = βxβ−1
dx
which implies that
d xβ
xα = ( ) = xβ−1
dx β
and therefore, β = α + 1.
Let us now consider α = −1 ; i.e., 1/x. If x > 0 this the derivative of ln x and therefore,
the last one is its primitive. If x < 0, then we can rewrite
Z Z
1 1
dx = − dx = ln(−x) + c ,
x (−x)

which implies that the primitive of 1/x for every x 6= 0 is ln |x|.

4.3 Methods of Integration: substitution and integration by


parts
In this section we discuss the two main strategies for calculating an integral: integration by
parts and change of variable.

4.3.1 Method of substitution: change of variables


Regarding the substitution technique, we need to first establish some reasonable hypothesis:
if we set s = g(t), where the variable t ∈ [a, b] and the new (dependent) variable s varies in a
4.3. METHODS OF INTEGRATION: SUBSTITUTION AND INTEGRATION BY PARTS49

new interval, say [α, β], we need the mapping t → g(t) = s to be a bijection between [a, b] and
[α, β]; moreover, we need to require that if such map is regular on [a, b] (say, it is a continuous
function with continuous derivative), also its inverse has the same regularity. Such properties
are certainly satisfied if we assume the following hypothesis in the next proposition.
Proposition 4.3.1 (Change of variables). Let f : [α, β] 7→ R be a continuous function and let
g : [a, b] 7→ R be a continuous function with continuous derivative g 0 (t) 6= 0 for all t ∈ [a, b].
Then Z b Z g(b)
f (g(t))g 0 (t) dt = f (s) ds . (4.10)
a g(a)

4.3.2 Examples
(1) Find Z
t2 (t3 + 2)2 dt .

Let us choose g(t) = t3 + 2 and f (x) = x2 . Note that, g 0 (t) = 3t2 ; hence, dx = g 0 (t) dt
and
Z Z
1
t2 (t3 + 2)2 dt = f (g(t)) g 0 (t) dt
3
Z
1
= 3t2 (t3 + 2)2 dt
3
x3
Z
1
= x2 dx = +c
3 9
(t3 + 2)3
= +c
9
The exercise suggests a general rule: if α 6= −1 then
[g(t)]α+1
Z
[g(t)]α g 0 (t) dt = + c, ∀α 6= −1 ;
(α + 1)
if α = −1 then
g 0 (t)
Z
dt = log |g(t)| + c .
g(t)
For example, let us consider
Z Z
sin t
tan t dt = dt
cos t
g 0 (t)
Z
= − dt
g(t)
= − log | cos t| + c .

(2) Find
Z Z Z
3x 4 3x
e − (x − 3) dx = e dx − (x − 3)4 dx

e3x (x − 3)5
= − + c;
3 5
50 CHAPTER 4. RIEMANN INTEGRAL

(3) Find

√ (x + 3)1/2+1
Z
1
x+3− dx = − ln |x| + c
x ( 12 + 1)
2
= (x + 3)3/2 − ln |x| + c .
3

(4) Find
Z
3
dx
1 + 2x2
√ √
we make the following substitution t = 2x, dt = 2 dx, t2 = 2x2 , then
Z Z
3 3 1
dx = √ dt
1 + 2x2 2 1 + t2
3
= √ arctan t + c
2
3 √
= √ arctan 2x + c .
2

(5) Find
√ Z
sin x
√ dx .
x

We make the following substitution t = x, dt = 2√1 x dx, 2t dt = dx, then

Z √ Z
sin x sin t
√ dx = 2t dt
x t
Z
= 2 sin t dt = −2 cos t + c

= −2 cos x + c .

(6) Find
e2 e2
g 0 (x)
Z Z
dx
= dx
e x ln x e g(x)

with g(x) = ln x; hence, we solve it

Z e2 e2
dx
= ln(ln x)
e x ln x e
 ln e2 
= ln(ln e2 ) − ln(ln e) = ln
ln e
 ln e 
= ln 2 = ln 2 .
ln e
4.3. METHODS OF INTEGRATION: SUBSTITUTION AND INTEGRATION BY PARTS51

Note that, in case of logarithm with respect to a base a 6= e, we recall that (loga x)0 =
1/x(ln a); hence, if we take g(x) = loga x we have that
Z e2 Z e2 0
dx 1 g (x)
= dx
e x loga x ln a e g(x)
1 e2 1  log e 
= ln(loga x) = ln 2 a
ln a e ln a loga e
ln 2
= .
ln a

(7) Find
g 0 (x)
Z Z
cos x
dx = dx = ln |4 + sin x| + c ,
4 + sin x g(x)
with g(x) = 4 + sin x.

(8) Find
Z 1
1
dx
0 ex + e−x
by substitution t = ex , dt = ex dxwe have that the indefinite integral
Z Z
1 1 1
dx = dt
ex + e−x t + 1t t
Z
1
= dt = arctan t + c .
1 + t2

To compute the definite integral we can proceed in two different way:

(a) since t = ex for every 0 ≤ x ≤ 1 we have that 1 ≤ t ≤ e; hence,


Z 1 Z e
1 1 e
dx = dt = arctan t = arctan e − arctan 1 ;
0 e + e−x
x
1 1+t2 1

(b) Z
1
dx = arctan t + c = arctan ex + c ;
ex + e−x
hence, Z 1
1 1
−x
dx = arctan ex = arctan e − arctan 1 .
0 ex +e 0

4.3.3 Integration by parts


The integration by parts is a straightforward consequence of the Leibniz rule for the derivative
of the product:
(f (t)g(t))0 = f 0 (t)g(t) + f (t)g 0 (t) ;
hence,
Z b b
Z b
0
f (t)g (t) dt = f (t)g(t) − f 0 (t)g(t) dt (4.11)
a a a
52 CHAPTER 4. RIEMANN INTEGRAL

4.3.4 Examples
(1)
Z Z
x sin x dx = −x cos x − 1 · (− cos x) dx
= −x cos x + sin x + c .
Note that, in this case it’s not convenient to choose g 0 (x) = x since we are increasing
the power of x; i.e.,
x2
Z Z 2
x
x sin x dx = sin x − (cos x) dx .
2 2
In general, if we have an integrand function of the type xn h(x) it is always more
convenient to reduce the power of xn and identify h(x) = g 0 (x) such that
Z Z
x h(x) dx = x g(x) + nxn−1 g(x) dx .
n n

For example,

Z Z
x2 sin x dx = −x2 cos x − 2x(− cos x) dx
Z
= −x2 cos x + 2x sin x − 2x sin x dx

= −x2 cos x + 2x sin x + 2 cos x + c .

(2)
Z Z
ex sin x dx = ex sin x − ex cos x dx
 Z 
= ex sin x − ex cos x + ex sin x dx ;

hence, Z
2 ex sin x dx = ex sin x − ex cos x + c ;

which implies
ex (sin x − cos x)
Z
ex sin x dx = + c.
2
(3)
Z Z
arctan x dx = 1 · arctan x dx
Z
x
= x arctan x − dx
1 + x2
1 p
= x arctan x − ln(1 + x2 ) + c = x arctan x − ln 1 + x2 + c
2
 1 
= x arctan x + ln √ +c
1 + x2
4.3. METHODS OF INTEGRATION: SUBSTITUTION AND INTEGRATION BY PARTS53

(4)
2
x2
Z Z
2
x(ln x) dx = (ln x)2 − x ln x dx .
1 2
We proceed again as above

x2
Z Z 2
x 1
x ln x dx = ln x − dx
2 2 x
x2 x2
= ln x − + c;
2 4
hence,
2 h x2 x2 x2 i
Z
2
x(ln x)2 dx = (ln x)2 −
ln x +
1 2 2 4 1
3
= 2(ln 2)2 − 2 ln 2 + .
4

(5)
Z 2π Z π Z 2π
−x −x
e | sin x| dx = e sin x dx − e−x sin x dx
0 0 π

Since sin x is an odd function we can make the change of variable t = −x, sin(−t) =
− sin t, dt = −dx; hence, by Exercise (2) we have that

et (sin t − cos t)
Z Z
−x
e sin x dx = et sin t dt = +c
2
e−x (− sin x − cos x)
= + c,
2
and,

e−x (sin x + cos x) π e−x (sin x + cos x) 2π
Z
e−x | sin x| dx = − +
0 2 0 2 π
−x −x
e (cos x) π e (cos x) 2π
= − +
2 0 2 π
e−π + 1 e−2π + e−π 1 + e−2π
= + = + e−π .
2 2 2

(6)
4 4
x3 x2
Z Z
2x
√ dx = √ dx
0 1 + x2 0 2 1 + xZ2
p p  p x 
= x2 1 + x2 − 2x 1 + x2 dx where ( 1 + x2 )0 = √ )
1 + x2
p h 2 i4
= x2
1 + x2 − (1 + x2 )3/2
3 0
√ 2 3/2 2 14 √ 2
= 16 17 − (17) + = 17 + .
3 3 3 3
54 CHAPTER 4. RIEMANN INTEGRAL

4.3.5 Substitution for a2 − x2 , sin x and cos x
Let start with the irrational function
p
f (x) = a2 − x2 ,

by substitution x = a sin t, dx = a cos t dt we get


p p p
a2 − x2 = a2 (1 − sin t2 ) = (a cos t)2 = |a cos t| .

Example 4.3.2. (1)


Z 1p Z π/2
1− x2 dx = (cos t)2 dt ,
0 0
see below for the final answer...
(2)
Z 1 p Z π/2 p
2 2
x 1 − x dx = (sin t)2 (cos t)2 cos t dt
0 0
Z π/2
= (sin x)2 (cos t)2 dt
0
Z π/2
= (sin x)2 − (sin x)4 dt .
0

How to solve these integrals is explained below.


In case of rational functions depending on cos x and/ or sin x we may proceed with the
following substitution
x 2
t = tan , x = 2 arctan t , dx = dt
2 1 + t2
which implies
1 − t2 2t
cos x = , sin t = .
1 + t2 1 + t2
For example,
1 − t2 2 2
Z Z 
2
(cos x) dx = dt
1 + t2 1 + t2
(1 − t2 )2
Z
= 2 dt .
(1 + t2 )3
Note that, we can also integrate by parts
Z Z
2
(cos x) dx = (cos x) · (cos x) dx
Z
= (sin x)0 · (cos x) dx
Z
= sin x cos x + (sin x)2 dx
Z
= sin x cos x + 1 − (cos x)2 dx ,
4.4. INTEGRATION OF RATIONAL FUNCTIONS 55

then Z
sin x cos x + x
(cos x)2 dx = + c.
2
Similarly,
− sin x cos x + x
Z
(sin x)2 dx = + c.
2

4.4 Integration of rational functions


A rational function is a function that can be written as the quotient of two polynomials
P (x)
f (x) = ,
Q(x)
with Q not zero. In this section we learn how to integrate rational function where the degree
of P is strictly less then the degree of Q, in particular, we consider P (x) = p0 + p1 x and
Q(x) = q0 + q1 x + q2 x2 polynomials of degree 1 and 2, respectively.
If the degree of the P is greater than Q we first perform a long division of P into Q as
shown in the following example: let x3 + x be the dividend and x2 + x + 1 the divisor

x3 + x
.
x2 + x + 1
We divide the first term of the dividend, x3 , by the highest term of the divisor, x2 , which
gives x (the first term of the quotient). Hence

x(x2 + x + 1) = x3 + x2 + x

if we make the difference (x3 + x) − (x3 + x2 + x) = −x2 the remainder that has the same
degree of the divisor; hence, we have to repeat the previous step. We divide −x2 by the
highest term of the divisor, x2 , and we get −1 (this will be the second term of the quotient).
It remains to multiply then −1 times x2 + x + 1 and makes the difference with −x2 ; i.e.,
−x2 − [−(x2 + x + 1)] = x + 1. Now we stop the algorithm since the remainder r(x) = x + 1
has degree less then the divisor. Then we can conclude that

x3 + x x+1
2
= (x − 1) + 2 .
x +x+1 x +x+1
In this way, we have reduced the computation of the integral into a sum of two integrals

x3 + x
Z Z Z
x+1
dx = (x − 1) dx + dx ,
x2 + x + 1 x2 + x + 1
the first one is the integral of the quotient, the second one is still an integral of a rational
function where the degree of the polynomial at numerator is not greater than the degree of
the polynomial at denominator.
If Q(x) is a polynomial of degree 2 we may distinguish between three different cases:

(1) there exist two real roots x1 6= x2 such that Q(x1 ) = Q(x2 ) = 0, then

Q(x) = (a1 x + b1 ) × (a2 x + b2 )


56 CHAPTER 4. RIEMANN INTEGRAL

and we have to find A 6= B such that

P (x) A B
= + .
Q(x) (a1 x + b1 ) (a2 x + b2 )

For example, let us consider the following rational function


Z
x+2
dx .
x2 + x − 6

The solutions to x2 + x − 6 = 0 are 2, −3; hence,

x+2 A B
= +
x2 +x−6 x−2 x+3
(A + B)x + 3A − 2B
=
(x − 2)(x + 3)

if and only if A + B = 1 and 3A − 2B = 2; i.e., A = 4/5 and B = 1/5. Therefore,


Z Z Z
x+2 4 1 1 1
2
dx = dx + dx
x +x−6 5 x−2 5 x+3
4 1
= ln |x − 2| + ln |x + 3| + c .
5 5

(2) there exists one real root x1 such that Q(x1 ) = 0, then

Q(x) = (ax + b)2 .

In this case we decompose in sum of terms of the form

P (x) A B
= + .
Q(x) ax + b (ax + b)2

For example, let us consider the following rational function


Z
(x + 1)
dx ;
(3x + 2)2

hence,

(x + 1) A B
= +
(3x + 2)2 (3x + 2) (3x + 2)2
3Ax + (2A + B)
= .
(3x + 2)2

We get then
Z Z Z
(x + 1) 1 1 1 1
dx = dx + dx
(3x + 2)2 3 (3x + 2) 3 (3x + 2)2
1 1 1
= ln |3x + 2| − + c.
9 9 (3x + 2)
4.4. INTEGRATION OF RATIONAL FUNCTIONS 57

Similarly, we may proceed by substitution t = 3x + 2, dt = 3 dx, then


Z t−2
( 3 ) + 1 dt
Z
(x + 1)
dx =
(3x + 2)2 t2 3
Z Z Z
1 t+1 1 1 1 
= dt = dt + dt
9 t2 9 t t2
1 1 1
= ln |3x + 2| − + c.
9 9 (3x + 2)

(3) there are not real roots; i.e., Q(x) 6= 0 for very x ∈ R. In this case we decompose the
rational function in sum of terms of the form
P (x) Q0 (x) B
=A + ,
Q(x) Q(x) Q(x)
where Q0 (x) denotes the first derivative of the polynomial Q(x). Hence
Q0 (x)
Z Z Z
P (x) 1
dx = A dx + B dx
Q(x) Q(x) Q(x)
Z
1
= A ln |Q(x)| + B dx + c .
Q(x)
For example, let us consider the following rational function
x 2x + 2 B
= A + 2
x2 + 2x + 4 x2+ 2x + 4 x + 2x + 4
2Ax + (2A + B)
= .
x2 + 2x + 4
Therefore we get A = 1/2, B = −1 and
Z Z Z
x 1 2x + 2 1
dx = dx − dx
x2 + 2x + 4 2 x2 + 2x + 4 x2 + 2x + 4
Z
1 1
= ln |x2 + 2x + 4| − dx .
2 x2 + 2x + 4
To solve the last integral we rewrite the polynomial x2 + 2x + 4 as the sum of two
squared terms such that the primitive is the arctan function. More precisely,

x2 + 2x + 4 = (x + 1)2 + 3 ;

hence, by a substitution t = (x + 1)/ 3, we get
Z Z
1 1
2
dx = dx
x + 2x + 4 (x + 1)2 + 3
√ Z √ √
3 1 3 3 x + 1
= dt = arctan t + c = arctan √ + c.
3 t2 + 1 3 3 3
General rule: h b 2 4ac − b2 i
ax2 + bx + c = a x + +
2a 4a2
where 4ac − b2 = −∆ that is the discriminant changed of signed.
58 CHAPTER 4. RIEMANN INTEGRAL

4.5 Exercises
(1) Compute the area of the following region A ⊂ R2 :

A = {(x, y) ∈ R2 : 0 ≤ x ≤ 1, x2 ≤ y ≤ x}.

(2) Find the following integrals:


π
Z π Z 1 Z
3 x 2
sin (x) dx dx cos3 (x) dx
0 −1 (4x + 1)5
2
0
π
Z 1 Z Z −1  
4 3
 4 1 1
x + 5x + 1 dx, cos(x) dx, 2
− 3 dx,
0 0 −2 x x
Z 2 Z 1 Z −1
−2x 1 2x + 1
e dx dx dx
0 0 x2 +4 −2 (x − 1)2

(3) Find the following integrals:


Z Z 1 Z
3 2 3 2
(3x + 1) dx x (3x + 1) dx x(3x2 + 1)3 dx
0
π
Z 1  Z
2
Z π/4
5/6 −2 −1 x 2
x + 2x − 3x + 2 dx e (sin x) dx, cos 2x sin x dx,
Z0  0 Z0
√ √
Z
1 2 3x
x+ 3
x+2+ dx e−x x3 dx
x2 x2
−x−2
1
e − e−x 
Z  2x
(x − 2)
Z Z
x
dx dx
−1 1 + x2 3 (2x − 1)2
Z 1 Z Z
(x + 3)
e−|x| dx (x2 + 5x + 4)ex dx
−1 (x2 − x + 4)
Z 1 Z 3 Z π
x e3x dx x2 ln x dx x cos x dx
0 1 0

4.6 Solving Exercises Chapter 1


(1) The following integral can be solve by substitution t = 3x + 1; i.e.,

t3 t4
Z Z
3
(3x + 1) dx = dt = + c.
3 12

If we consider Z
x(3x2 + 1)3 dx

it can be still solved by substitution by identifying


Z Z
x(3x + 1) dx = g 0 (x)f (g(x)) dx ;
2 3
4.6. SOLVING EXERCISES CHAPTER 1 59

hence,
y3 (3x2 + 1)4
Z Z
2 3
x(3x + 1) dx = dy = + c.
6 6·4
Note that, x multiplying (3x2 + 1)3 makes easier the computation of the integral because, up
to a constant, it coincides with the derivative of 3x2 + 1 and it allows us to apply the method
by substitution. Let us consider another case slightly different
Z
x (3x + 1)3 dx .

Here, x does not have “the same role”as in the previous case, we do not have to interprete x
as derivative of ... better make it disappear... How? By parts! Let’s do it

(3x + 1)4 (3x + 1)4


Z Z
3
x (3x + 1) dx = x − dx
4·3 12
(3x + 1)4 (3x + 1)5
= x − + c.
12 12 · 5
(2) Find
Z 3π
2
ex (sin x)2 dx .
0
We use the method of integration by parts
Z 3π Z
2
ex (sin x)2 dx = ex (sin x)2 − ex 2 sin x cos x dx .
0

Now, we may proceed in two different way: 1) use the trigonometric formula sin(2x) =
2 sin x cos x; 2) we use integration by parts again and the trigonometric identity 1 = (sin x)2 +
(cos x)2 .
In the first case
Z π Z π
2 2
ex (sin x)2 dx = ex (sin x)2 − ex 2 sin x cos x dx
0 0
Z π
π/2 2
x 2
= e (sin x) − ex (sin 2x) dx
0 0
= eπ/2 + And now what?

The second strategy is longer than the first one but probably most useful....
Z π Z
2
ex (sin x)2 dx = ex (sin x)2 − ex 2 sin x cos x dx
0
π/2 π/2
Z π/2
x 2 x
= e (sin x) −2 e sin x cos x +2 ex [−(sin x)2 + (cos x)2 ] dx
0 0 0
Z π/2
= eπ/2 + 2 ex [1 − 2(sin x)2 ] dx
0
Z π/2
π/2 π/2
= e + 2(e − 1) − 4 ex (sin x)2 dx .
0
60 CHAPTER 4. RIEMANN INTEGRAL

Hence,
Z π
2
5 ex (sin x)2 dx = eπ/2 + 2(eπ/2 − 1) ,
0

and π
3eπ/2 − 2
Z
2
ex (sin x)2 dx = .
0 5
Chapter 5

Improper Integral

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

The Riemann integral has been defined for functions f : [a, b] 7→ R satisfying the following
assumptions:

(1) [a, b] is a bounded interval;

(b) f is a bounded function.

Now the question is:


What does it happen when we remove one or both assumptions?
From the geometric interpretation of the integral we may immediately observe that we
pass from a bounded region (underneath the graph of f ) to an unbounded region! Still, is it
possibile to have (at least in some cases, we don’ t expect always....) a finite area?
The answer is:
We may still have, in some cases, that the “Integral’ is finite!
Let us consider the following function
1
f (x) = , x > 0.

The function f is not bounded in (0, 1] (or in any interval (0, a]) since limx→0+ 1/xα = +∞;
hence, we can not perform the Riemann integral on (0, 1] but on [a, 1] for every a > 0. More
precisely,
 1 (1 − a1−α ) if α 6= 1

Z 1 1 − α

1
α
dx =
a x 

− ln a if α = 1 ,

passing to the limit on a we get


1

1
 if α < 1
1−α
Z 
1 
lim dx = (5.1)
a→0+ a xα 

+∞ if α ≥ 1 .

61
62 CHAPTER 5. IMPROPER INTEGRAL

Let us consider the function f on [1, +∞). Again we can not apply the theory of Riemann
integral since [1, +∞) is an unbounded interval. We may reason as above; hence,
1

Z L  (L1−α − 1) if α 6= 1


1  1 α
α
dx =
1 x 

ln L if α = 1 ,

passing to the limit on L we get


1

L
 if α > 1
α−1
Z 
1 
lim dx = (5.2)
L→+∞ 1 xα 

+∞ if α ≤ 1 .

This example suggests that we may introduce a notion of integrability for unbounded functions
and unbounded intervals such that
1
is “ integrable”on (0, 1] for every α < 1 and on [1, +∞) for every α > 1 .

5.1 Definitions and Examples


Definition 5.1.1 (Improper Integral-def1). Let f : (a, b] 7→ R be a Riemann integrable
function in [c, b] for every c ∈ (a, b). Then the improper integral of f in (a, b] is defined as
Z b Z b
f (x) dx := lim f (x) dx ∈ R .
a c→a+ c

Similarly, let f : [a, +∞) 7→ R be a Riemann integrable function on [a, L] for every L > a.
Then the improper integral of f in [a, +∞) is defined as
Z +∞ Z L
f (x) dx := lim f (x) dx ∈ R .
a L→+∞ a

Remark 5.1.2. Similarly, if f : [a, b) 7→ R is Riemann integrable in [a, c] for every c ∈ (a, b),
then the improper integral of f in [a, b) is given by
Z b Z c
f (x) dx := lim f (x) dx ∈ R ;
a c→b− a

if f : (−∞, b] 7→ R is Riemann integrable in [L, b] for every L < b, then the improper integral
of f in (−∞, b] is given by
Z b Z b
f (x) dx := lim f (x) dx ∈ R .
−∞ L→−∞ L

Example 5.1.3. Let us consider f (x) = e−x . It is continuous on R; hence, it is Riemann


integrable in [a, b] for every a, b ∈ R. There exists the improper integral of f on (−∞, a]
and/or on [a, +∞)?
Z b
b
e−x dx = −e−x = −e−b + e−a ;
a a
5.1. DEFINITIONS AND EXAMPLES 63

hence,

lim −e−b + e−a = e−a ,


b→+∞

lim −e−b + e−a = +∞ .


a→−∞

Then the answer is: for every a, b ∈ R there exists the improper integral of f on [a, +∞) but
not in (−∞, b] !
In general, we integrate also a function f where all cases, listed above, are combined as
in case of function f that is not defined in the two extremes of the interval or in an internal
point. In addition, we may require to integrate an unbounded function in an unbounded
interval as f (x) = 1/xα , x ∈ (0, +∞. Then we may integrate with respect to Riemann in a
bounded interval where the function is bounded as follows
Z L
1 1
α
dx = (L1−α − a1−α )
a x α−1

and, finally, we pass to the limit as a → 0+ and L → +∞.


Note that, there exists the improper integral if the result does not depend on the order
of the limit as a → 0+ and L → +∞, since by the additivity of the integral we may always
separate the two limits as follows
Z +∞ Z L
1 1 
dx := lim lim dx
0 xα a→0+ L→+∞ a xα
Z L
1 
= lim lim dx
L→+∞ a→0+ a xα
Z x0 Z L
1 1
= lim dx + lim dx .
a→0+ a xα L→+∞ x0 xα

Definition 5.1.4 (Improper Integral-def2). Let −∞ ≤ a ≤ b ≤ +∞ and let f : (a, b) 7→ R be


a Riemann integrable function in [c, d] for every [c, d] ⊂ (a, b). Then there exists the improper
integral of f in (a, b) if there exist the two following limit
Z x0 Z d
l− := lim f (x) dx ∈ R , l+ := lim f (x) dx ∈ R .
c→a+ c d→b− x0

and Z b
f (x) dx := l− + l+ ,
a
for any arbitrary fixed x0 ∈ R. In particular,
Z Z +∞ Z x0 Z d
f (x) dx = f (x) dx := lim f (x) dx + lim f (x) dx .
R −∞ c→−∞ c d→+∞ x0

Example 5.1.5. Find the improper integral of the following function on (−1, 1)

1
f (x) = √ .
1 − x2
64 CHAPTER 5. IMPROPER INTEGRAL

Note that f is not defined in ±1 and it is unbounded on (−1, 1). We study separately the
integrability on (−1, x0 ] and [x0 , 1) for an arbitrary x0 ∈ (−1, 1), for example we may choose
x0 = 0. Then,
Z 0 Z 0
1 1 0 π
√ dx = lim √ dx = lim arcsin x = − arcsin(−1) =
−1 1−x 2 c→(−1) +
c 1−x 2 c→(−1) + c 2
Z 1 Z c
1 1 c π
√ dx = lim √ dx = lim arcsin x = arcsin(1) = .
0 1−x 2 c→1 −
0 1−x 2 c→1 − 0 2

Hence, Z 1
1 π π
√ dx = + = π .
−1 1−x 2 2 2
Example 5.1.6. Find the following improper integral
Z 1
1
√ dx .
0 x 1−x

The integrand function is not define in x = 0, 1 and is unbounded in the interval (0, 1). Hence,
we first find the Riemann
√ integral in [c, x0 ] ⊂ (0, 1). More precisely, we make the following
change of variable 1 − x = t
−2
Z Z
1
√ dx = dt
x 1−x 1 − t2

By Definition 5.1.4 we have that


Z 1 Z x0 Z d
1 1 1
√ dx = lim √ dx + lim √ dx
0 x 1−x c→0+ c x 1−x d→1− x0 x 1−x
√ √
Z 1−c Z 1−x0
2 2
= lim √ dt + lim √ dt .
c→0+ 1−x0 1 − t2 d→1− 1−d 1 − t2

By Section 4.4 we have that


Z Z 
2 1 1  1 + t
dt = + dt = ln + c.
1 − t2 1−t 1+t 1−t
Hence,
Z x0
1  1 + √1 − c   1 + √1 − x 
0
lim √ dx = lim ln √ − ln √ = +∞ ;
c→0+ c x 1−x c→0+ 1− 1−c 1 − 1 − x0
Z d
1  1 + √1 − x   1 + √1 − d   1 + √1 − x 
0 0
lim √ dx = lim ln √ − ln √ = ln √ .
d→1− x0 x 1−x d→1− 1 − 1 − x0 1− 1−d 1 − 1 − x0

Since, one of the two limit is infinite we conclude that does not exist the improper integral
on (0, 1). Indeed, it exists on every interval [a, 1) with a > 0.
Example 5.1.7. Let us consider
1
f (x) = , x ∈ R.
x2 +1
5.1. DEFINITIONS AND EXAMPLES 65

We may fix x0 = 0; hence,


Z 0
1 π
lim dx = lim − arctan c =
c→−∞ c x2 +1 c→−∞ 2

and Z d
1 π
lim dx = lim arctan d = .
d→+∞ 0 x2 +1 d→+∞ 2
Therefore, there exists the improper integral on R
Z +∞
1
dx = π .
−∞ x2 + 1

Example 5.1.8. Let us consider


1
f (x) = p , x ∈ [−1, 1] \ {0} .
2 |x|

The function f is not definite in 0 then we may integrate in [−1, 0) and (0, 1]. More precisely,
since f is even and by definition of improper integral, we have that
Z 1 Z 0
1 1
p dx = p dx
0 2 |x| −1 2 |x|
Z 1
1 √
= lim p dx = lim 1 − ε = 1 ;
ε→0+ ε 2 |x| ε→0+

hence, there exists the improper integral in [−1, 1] \ {0} and it is given by
Z 1
1
p dx = 2 .
−1 2 |x|

Example 5.1.9. Let us consider for α > 0 the following function


1
f (x) = , x ∈ (0, +∞) \ {1}
x| ln x|α

Determine the value of α and the intervals where there exists the improper integral.
Note that the function f is unbounded and not definite in 0 and 1. Moreover, we want to
integrate in an unbounded interval. Hence, according to Definition 5.1.4, we have to study
the existence of the improper integral in (0, 1) and (1, +∞), separately. More precisely, fixing
x0 = 1/2, we have that
Z 1 Z 1/2 Z 1−ε
1 1 1
dx := lim dx + lim dx ;
0 x| ln x|α ε→0+ ε x| ln x|α ε→0+ 1/2 x| ln x|α

and, fixing x0 = 2, we have that


Z +∞ Z 2 Z L
1 1 1
dx := lim dx + lim dx .
1 x| ln x|α ε→0+ 1+ε x| ln x|α L→+∞ 2 x| ln x|α
66 CHAPTER 5. IMPROPER INTEGRAL

In (0, 1) we have that | ln x| = − ln x; hence, we make the following change of variable t =


− ln x. Since − ln ε → +∞ as ε → 0+ , by (5.2), we get that there exists the improper integral
on (0, 1/2), for any α > 1; i.e.,
1/2 1/2 − ln ε
(ln 2)1−α
Z Z Z
1 1 1
dx = lim dx = lim dt = , α > 1.
0 x| ln x|α ε→0+ ε x| ln x|α ε→0+ ln 2 tα α−1

Since − ln(1 − ε) → 0 as ε → 0+ , by (5.1), we have that there exists the improper integral on
(1/2, 1), for any α < 1; i.e.,
Z 1−ε Z ln 2
1 1 (ln 2)1−α
lim dx = lim dt = , α < 1.
ε→0+ 1/2 x| ln x|α ε→0+ − ln(1−ε) tα 1−α

Let us study the improper integral in (1, +∞). More precisely, we study the improper integral
in (1, 2) and (2, +∞). By applying the same change of variable as above, we get that
Z 2 Z ln 2
1 1 (ln 2)1−α
lim dx = lim dt = , α < 1,
ε→0+ 1+ε x| ln x|α ε→0+ ln(1+ε) tα 1−α

that is, since, limε→0+ ln(1 + ε) = 0, we can conclude that there exists the improper integral
if and only if α < 1. Finally,
Z L Z ln L
1 1 (ln 2)1−α
lim dx = lim dt = , α > 1.
L→+∞ 2 x| ln x|α L→+∞ ln 2 tα α−1

Summing up, there exists the improper integral on [a, b] for every a < 1 < b and 0 < α < 1;
on (0, a] and [b, +∞) for every a < 1 < b and α > 1.
Remark 5.1.10. In case the improper integral has to be worked out by dividing the interval
in subintervals, as in the previous example where the function was not defined in 0 and 1,
then also the corresponding limits have to be performed separately, otherwise we could have
a contradiction. Let us consider 1/x in (−1, 1), the improper integrals has to be worked out
in (0, 1) and (−1, 0). Hence,
Z 1 Z 1 Z −ε
1 1 1
dx = lim dx + lim dx
−1 x ε x −1 x
ε→0 + ε→0 +

= lim − ln ε + lim ln ε ;
ε→0+ ε→0+

while, if we do not separate the computation of the limit we would have


Z 1
1
dx = lim − ln ε + ln ε = 0 ,
−1 x ε→0+

that is absolutely FALSE! Actually, it might be confusing the choice of the same parameter
ε in both limits... Indeed, since the two limits have to be worked out independently, it would
be better to use two different parameters ε and δ
Z 1 Z 1 Z −δ
1 1 1
dx = lim dx + lim dx
−1 x ε→0 +
ε x δ→0 +
−1 x
= lim − ln ε + lim ln δ .
ε→0+ δ→0+
5.2. COMPARISON THEOREMS 67

5.2 Comparison Theorems


Let f : [a, +∞) 7→ [0, +∞) be a non negative function, Riemann integrable on very closed
and bounded subintervals [a, b]. The integral function
Z L
F (L) := f (x) dx
a

it is a non-decreasing function and the limit limL→+∞ F (L) always exists. Hence, there exists
the improper integral of f on [a, +∞) if and only if such limit is finite and it does not exists
if limL→+∞ F (L) = +∞. Note that in this case, as for the Riemann integral, there is a
natural geometric interpretation of the improper integral as the ‘measure’ of an unbounded
area underneath the graph of the function f that is finite if the improper integral of f is
finite.
Similarly, if we consider the improper integral on bounded interval [a, b), (a, b], (a, b).
The geometric interpretation suggests also some other considerations: if a graph of a
positive function g is above the graph of another positive function f then by the monotonicity
of the Riemann integral we have that also the improper integrability are related to each other.
More precisely, we have the following comparison theorem
Theorem 5.2.1 (Comparison Test). Let f, g : [a, b) 7→ R be two Riemann integrable function
on every [a, c] foe any c ∈ (a, b) and b ≤ +∞. Let us assume that

0 ≤ f (x) ≤ g(x) , ∀x ∈ [a, b) .

Then,
Z b Z b
0≤ f (x) dx ≤ g(x) dx ,
a a

and
Z b Z b
if f (x) dx = +∞ =⇒ g(x) dx = +∞ ;
a a
Z b Z b
if g(x) dx < +∞ =⇒ f (x) dx < +∞ .
a a

Example 5.2.2. prove that the following improper integral exists and is finite
+∞
| cos x|
Z
dx .
1 x2

It is not easy to find the primitive of | cos x|/x2 but we can establish by comparison if the
integral is finite or not. Indeed,

| cos x| 1
≤ 2 , ∀x ≥ 1 ,
x2 x
moreover, by (5.2), we have that
Z +∞
1
dx = 1 ;
1 x2
68 CHAPTER 5. IMPROPER INTEGRAL

hence, by Theorem 5.2.1, we have that


+∞
| cos x|
Z
dx ≤ 1 ,
1 x2

which implies not only the existence of the improper integral but also an estimate for above.

Exercise 5.2.3. Say if the following improper integral is finite or infinite


1
1 + ex
Z
dx .
0 x

Theorem 5.2.4 (Asymptotic Comparison Test). Let f, g : [a, b) 7→ R be two Riemann inte-
grable function on every [a, c] foe any c ∈ (a, b) and b ≤ +∞. Let us assume that f (x) ≥ 0
and g(x) > 0 for every x ∈ [a, b).

• Assume that
f (x)
lim = l > 0,
x→b− g(x)
then,
Z b Z b
if f (x) dx = +∞ ⇐⇒ g(x) dx = +∞ ;
a a
Z b Z b
if g(x) dx < +∞ ⇐⇒ f (x) dx < +∞ .
a a

• Assume that
f (x)
lim = 0,
x→b− g(x)
then,
Z b Z b
if f (x) dx = +∞ =⇒ g(x) dx = +∞ ;
a a
Z b Z b
if g(x) dx < +∞ =⇒ f (x) dx < +∞ .
a a

• Assume that
f (x)
lim = +∞ ,
x→b− g(x)
then,
Z b Z b
if g(x) dx = +∞ =⇒ f (x) dx = +∞ ;
a a
Z b Z b
if f (x) dx < +∞ =⇒ g(x) dx < +∞ .
a a
5.3. EXERCISES 69

Example 5.2.5. Say if the following improper integral is finite or infinite


Z +∞
2
e−x dx .
−∞
2
The function e−x is continuous, bounded and even on R, hence the improper integral on R
is finite if Z L
2
lim e−x dx < +∞ .
L→+∞ 0

Note that 2
e−x
lim = 0.
x→±∞ 1/(x2 + 1)

Hence, by the Asymptotic comparison test Theorem 5.2.4, we have that the improper integral
on R is finite since Z +∞ Z 0
1 1 π
2
dx = 2
dx = ,
0 x +1 −∞ x + 1 2
(see Example 5.1.7).

5.3 Exercises
(1) Say if the following improper integrals are finite or infinite
Z ∞
1 + 2 sin(arctan x) − e−x
Z +∞
log(x2 + 4)
dx ; dx;
0 (1 + x2 ) 1 x2
Z 1
1
p dx , with k 2 < 1 .
0 (1 − x )(1 − k 2 x2 )
2

(2) Find the following improper integrals with p, q ∈ R


Z 3 Z 1 Z 1
x sin x (sin x)q
2
dx dx, dx
−1 x − 9 0 xp 0 x
Z 2 Z 1 Z 2
1 1 x2
2
dx, dx, 3
dx,
1 (x − 1) (x + 1) 0 x log x 1 x −8

5.4 Solving Exercises Chapter 2


(1) Say if the following improper integral is finite or infinite.
Z 1
1
p dx k2 < 1 . (5.3)
2 2
(1 − x )(1 − k x ) 2
0

2
p
2 2
p of all we note that since k < 1 then the function 1/ (1 − k x ) is bounded while
First
2
1/ (1 − x ) is unbounded for every x ∈ [0, 1]; more precisely,
1 1 1
1≤ p ≤p , lim p = +∞ .
(1 − k 2 x2 ) (1 − k 2 ) x→1− (1 − x2 )
70 CHAPTER 5. IMPROPER INTEGRAL
p
Hence, the contribution which makes unbounded the function 1/ (1 − x2 ) is just:

1
√ . (5.4)
1−x
Thus we actually need to compare the whole function to that function:

√ 1
(1−x2 )(1−k2 x2 ) 1
lim =p . (5.5)
x→1− √1 2(1 − k 2 ) < ∞
1−x

By Theorem 5.2.4 we have that the improper integral is finite by comparison with
Z 1
1
Z 1
1 √ 1
√ dx = √ dt = lim 2 t = 2 .
0 1−x 0 t ε→0 ε
p
Note that, in Example 5.1.5 we solve the improper integral of 1/ (1 − x2 ) on [0, 1] by rec-
ognizing the function as a primitive of the arcsin function.
Chapter 6

Ordinary differential equations

This work is licensed under a Creative Commons “Attribution-


NonCommercial-NoDerivatives 4.0 International” license.

An ordinary differential equation is an equation that relates an unknown function, y, to


one or more of its derivatives y 0 , y 00 , · · · , y n ; i.e.,

F (t, y, y 0 , y 00 , · · · , y n ) = 0 ; (6.1)

where F : A 7→ R is a given function of (n+2) variables (t, y, z1 , · · · , zn ) ∈ A ⊂ R×R×· · ·×R,


y : I 7→ R and t ∈ I. Solving the equation (6.1) means to find an interval I ⊂ R and a n-times
derivable function y : I 7→ R such that (t, y(t), y 0 (t), y 00 (t), · · · , y n (t)) ∈ A for every t ∈ I
and F (t, y(t), y 0 (t), y 00 (t), · · · , y n (t)) = 0. The function y is said a solution to the ordinary
differential equation. An ordinary differential equation may have infinitely many solutions,
or finitely many solutions or even no solutions at all. We define the general integral of the
equation as the following set (which may be infinite, finite, a singleton or empty)

I = {y : I 7→ R | I ⊂ R , y is a solution to o.d.e.}

In other words the general integral is the set of all solutions of the equation, everyone defined
on its interval of definition. The equation (6.1) is in the so-called non-normal form, that is
the highest order derivative, y n , is not “isolated” with respect to the other derivatives.

In this chapter we will focus on first and second-order partial differential equations (n =
1, 2) in normal form.

6.1 First-order ODE


Definition 6.1.1. A first-order ODE, in normal form, on the unknown y and f : A 7→ R
given, is
y 0 (t) = f (t, y) . (6.2)
Solving the equation (6.2) means to find an interval I ⊂ R and a derivable function y : I 7→ R
such that (t, y(t), y 0 (t)) ∈ A and y 0 (t) = f (t, y(t)) for every t ∈ I. The function y is said a
solution to the ordinary differential equation.

71
72 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

We define the general integral of the equation as the following set (which may be infinite,
finite, a singleton or empty)

I = {y : I 7→ R | I ⊂ R , y is a solution to (6.2)} .

6.1.1 ODE by separation of variables


A very important class of ODE is the one with the f given by

f (t, y) = a(t) g(y) ,

where a : I 7→ R and g : J 7→ R are continuous functions in I and J (intervals of R),


respectively. Given (t0 , y0 ) ∈ I × J we can also defined the initial value problem, the so-called
Cauchy Problem (
y 0 (t) = a(t) g(y) ,
y(t0 ) = y0 ,

where y(t0 ) = y0 represents the initial condition.


If g(y0 ) = 0 then y(t) ≡ y0 is a solution for every t ∈ I to the Cauchy Problem. If
g(y0 ) 6= 0 then we can solve the differential equation by separation of variables; i.e., we first
rewrite the equation as
y 0 (t)
= a(t) ,
g(y(t))
then we integrate with respect to the variable t on both sides of the equation and we get an
integral equation
y 0 (t)
Z Z
dt = a(t) dt . (6.3)
g(y(t))
In particular,
y 0 (t)
Z Z
1
dt = ds ,
g(y(t)) g(s)
hence, Z Z
1
ds = a(t) dt .
g(s)
To find the general integral of the equation we have to solve the two indefinite integrals. To
find the solution of the Cauchy Problem we can evaluate the general integral in t0 and fix
the constant (of the indefinite integrals) by imposing that y(t0 ) = y0 . In alternative, we can
use directly the initial condition in the integral equation (6.3) by fixing one of the extremes
of integration; i.e.,

t
y 0 (τ ) t y(t) t
Z Z Z Z
1
dτ = a(τ ) dτ =⇒ ds = a(τ ) dτ .
t0 g(y(τ )) t0 y0 g(s) t0

If a(t) ≡ 1 then we have an autonomous differential equation; i.e.,

y 0 (t) = g(y)
6.1. FIRST-ORDER ODE 73

and the rate of change of y(t), the derivative y 0 (t), does not depends explicitly on t. This
implies that given a solution y to the Cauchy Problem
(
y 0 (t) = g(y) ,
y(0) = y0 ,

then, any other solution to (


ȳ 0 (t) = g(ȳ) ,
ȳ(t0 ) = y0 ,
it can be obtained by translating y in the variable t as follows ȳ(t) := y(t − t0 ). Indeed,
ȳ 0 (t) = y 0 (t − t0 ) = g(y(t − t0 )) = g(ȳ(t)) and satisfies the initial condition ȳ(t0 ) = y(0) = y0
as show the following example.
Example 6.1.2. Solve (
y 0 (t) = y 2 ,
y(0) = 1 ,
By separation of variables we have from one side that
Z t 0 Z y(t)
y (t) 1 1
2
dt = 2
ds = 1 − .
0 y (t) 1 s y(t)
On the other side, we have
Z t
1 1
dt = t =⇒ 1− =t =⇒ y(t) = ∀t ∈ [0, 1).
0 y(t) 1−t
Note that in this case the solution exists and is unique on the bounded interval [0, 1) even if
the function a(t) ≡ 1 and g(y) = y 2 are both defined on the whole real line I = R and J = R.
This example suggests that, in general, the interval of existence of a solution is contained in
I and (t, y(t)) may take values in a subset strictly contained in I × J.
Moreover, this equation ia an example of autonomous differenatial equation; hence, we
expect the phenomena described above; i.e., if we consider t0 < 1 with ȳ(t0 ) = 1 we get that
the solution ȳ is defined on [t0 , 1) and is given by
1
ȳ(t) = ∀t ∈ [t0 , 1) . (6.4)
1 − (t − t0 )
Indeed,
t
ȳ 0 (t) ȳ(t)
Z Z
1 1
dt = ds = 1 − = (t − t0 ) .
t0 ȳ 2 (t) 1 s2 ȳ(t)
Hence, we get (6.4).
Finally, if y0 = 0 then y ≡ 0 is a solution on R!
Theorem 6.1.3 (Existence and uniqueness of solutions to equation with separation of vari-
ables). Let a : I 7→ R and g : J 7→ R be two continuous functions in the intervals I and J
with J open. Then, for every (x0 , y0 ) ∈ I × J the Cauchy Problem
(
y 0 (x) = a(x) g(y) ,
y(x0 ) = y0 ,
74 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

admits at least a solution. If g is locally Lipschitz (for example g ∈ C 1 ) then the solution is
also unique in the maximal interval of existence.

Proof. If g(y0 ) = 0 then there exists a unique solution y(x) ≡ y0 . Hence we focus on the case
g(y0 ) 6= 0. By the Theorem of permanence of sign there exists J0 ⊆ J such that g(y) 6= 0
in particular it maintains the sign of g(y0 ) for every y ∈ J0 . Note the solution y(x), we are
looking for, is continuous in the interval of existence since y 0 (t) = a(t) g(y) is continuous by
the assumptions on a and g. Therefore, there exists a neighborhood of x0 , Iδ (x0 ), such that
Iδ (x0 ) ⊆ I and g(y(x)) 6= 0 for every x ∈ Iδ (x0 ). Note that, since y is continuous we have
that y −1 (J0 ) is an open subinterval of I containing x0 since y0 ∈ J0 , therefore there exists
Iδ (x0 ) ⊆ y −1 (J0 ) such that the solution y : Iδ (x0 ) 7→ J0 and g(y(x)) 6= 0 for every x ∈ Iδ (x0 ).
We now separate the variable in the equation; i.e.,

y 0 (x)
= a(x) , ∀ x ∈ Iδ (x0 )
g(y)

and we integrate with respect to the variable x


Z 0 Z
y (x)
G(y(x)) := dx = a(x) dx := F (x) + c
g(y)

with G(y) and F (x) primitive of 1/g(y) in J and a(x) in I, respectively. In order to derive
an explicit formula for the solution y(x) we prove that the function G(y) : J0 7→ R such
that G0 (y) = 1/g(y) is invertible. Indeed, G0 (y) 6= 0 for every y ∈ J0 ; hence G is continuous
and strictly monotone which implies G−1 continuous and strictly monotone in G(J0 ) as well.
Then, there exists
y(x) := G−1 (F (x) + c) , ∀x ∈ Iδ (x0 ) . (6.5)
Note that, since G−1 : G(J0 ) 7→ J0 , there exists a further neighborhood of x0 , Iδ1 (x0 ) ⊂
Iδ (x0 ) ⊂ I, such that F (x) + c ∈ J0 for every x ∈ Iδ1 (x0 ) with c = G(y0 ) − F (x0 ); i.e., c fixed
by the initial condition y(x0 ) = y0 . Since, G−1 is strictly monotone and therefore injective,
it follows that one c is fixed also the solution (6.5) is unique.

Let’s see some other examples.


Example 6.1.4. • Solve 2
y 0 (t) = y(t) .
t
By separation of variables we have that
Z 0 Z
y (t) 2
dt = dt , =⇒ ln |y(t)| = ln t2 + c0
y(t) t

where the constant c0 ∈ R is due to the computation of two indefinite integrals. Then
we get the general integral of the equation

y(t) = ±ec0 t2 =⇒ y(t) = c t2 , c ∈ R.

If we have also an initial condition then we can fix the constant c by evaluating the
general integral at t0 . For example, if fix the initial condition y(−1) = 2 then c = 2 and
the unique solution to the Cauchy Problem is y(t) = 2 t2 .
6.1. FIRST-ORDER ODE 75

• Solve
y 0 (t) =
p
y(t) .
By separation of variables we have that
y 0 (t)
Z Z p
p dt = dt , =⇒ 2 y(t) = t + c0 ,
y(t)
that is,
 t + c 2
0
y(t) = .
2
If we consider the Cauchy problem
(
y 0 (t) = y(t) ,
p

y(0) = 0 ,

then y ≡ 0 is solution but also y(t) = (t/2)2 with c0 = 0.... In this case we DO NOT

HAVE UNIQUENESS of the solution! The reason is that the function g(y) = y is not
Lipschitz at y = 0; i.e., the derivative g 0 is not bounded “around” y = 0.
In this course we will not further investigate the uniqueness of the solutions. By the
way, it is important to be aware that the uniqueness of the solution of a Cauchy problem
depends on the regularity of the function y 7→ f (t, y).
If we change initial condition, for example,
(
y 0 (t) = y(t) ,
p

y(0) = 1 ,
p p
then, by evaluating 2 y(t) = t + c0 at t0 = 0 we have 2 y(0) = c0 , which implies
2 = c0 . Therefore, the solution to the cauchy problem in this case is unique and it is
given by
 t + 2 2
y(t) = .
2
Finally,
p note that we can not choose a negative initial condition, y(0) < 0, since g(y) =
y(t) is defined only on J = [0, +∞) and the initial datum (t0 , y0 ) ∈ I × J.

• Solve ( p
y 0 (t) = 2t 1 − y 2
y(0) = 0 .
p
The function g(y) = 1 − y 2 is defined on J = [−1, 1] and g(±1) = 0; hence, y(t) = ±1
are constant solutions to the equation with initial condition y0 = ±1, respectively.
The other solutions can be obtained by separation of variable
y 0 (t)
Z Z
p dt = 2t dt = t2 + c0 .
1 − y2
Hence, since y(0) = 0 we have that c0 = 0 and
r r
2 π 2 π π
arcsin y(t) = t ∈ [0, ) =⇒ y(t) = sin(t ) , ∀t ∈ (− , ).
2 2 2
76 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

• Solve (
y 0 (t) = 1 − y 2
y(0) = 0 .

• Solve
y 0 (t) = 2t y 2 .
By separation of variables we have from one side that
Z 0 Z
y (t) 1 1
2
dt = 2
ds = − .
y (t) s y(t)
On the other side, we have
Z
1 1
2t dt = t2 + c0 =⇒ − = t2 + c0 =⇒ y(t) = − .
y(t) t2 + c0

If c0 > 0 then the solution exists for every t ∈ R; if c0 < 0 then t2 + c0 = 0 if and only

if t = ± −c0 . It implies that we may have three different type of solutions according
to the initial condition y(t0 ) = y0 ; i.e.,
1 √
y(t) = − , t ∈ (−∞, − −c0 ) ,
+ c0 t2
1 √ √
y(t) = − 2 , t ∈ (− −c0 , −c0 ) ,
t + c0
1 √
y(t) = − 2 , t ∈ (− −c0 , +∞) . (6.6)
t + c0
Finally, if c0 = 0 we have two solutions defined in two different intervals
1 1
y(t) = − , t ∈ (0, +∞) , y(t) = − , t ∈ (−∞, 0) .
t2 t2
Let ’s make an example by fixing the initial condition y(0) = 1. By replacing in
1 1
y(t) = − =⇒ 1 = − =⇒ c0 = −1 ;
t2 + c0 c0
hence, we are in one of the three cases in (6.6). More precisely, since t0 = 0 the interval
of existence of the solution should contain 0; i.e.,
1
y(t) = − , ∀t ∈ (−1, 1) .
t2
• Solve 
0 (t) = t2 + 1
y


2t(t − 1)y 2




y(2) = − ln 2



6
By separation of variables we have
t2 + 1 t2 + 1
Z Z
2 0 0
y y (t) = =⇒ y y (t) dt = dt .
2t(t2 − 1) 2(t2 − 1)t
6.1. FIRST-ORDER ODE 77

Hence,
y 3 (t) t2 + 1
Z
1
= dt
3 2 t(t2 − 1)
in particular, we can split in tow parts and solve the first integral by integration by
parts the second integral by the method of integration of rational functions (Section
4.4); i.e.,

t2 + 1
Z Z Z
t 1
2
dt = dt + dt
2t(t − 1) t−1 t(t − 1)
−1
Z
1
= (t − 1) ln(t − 1) − 3t + + dt
t t−1
= (t − 1) ln(t − 1) − 3t − ln t + ln(t − 1) + c0
= t ln(t − 1) − 3t − ln t + c0 .

Therefore
1 ln 2 ln 2
y 3 (t) = (t ln(t − 1) − 3t − ln t + c0 ) =⇒ y 3 (2) = −1 − + c0 = − =⇒ c0 = 1 ,
6 6 6
and r
3 1
y(t) = (t ln(t − 1) − 3t − ln t + 1 .
6

6.1.2 First-order linear differential equations


A first order linear differential equation can be written in the form

y 0 (t) = a(t)y(t) + b(t) (6.7)

with a, b : I 7→ R continuous functions.

6.1.3 Homogeneous linear first-order ode


If b(t) ≡ 0 then the equation is called homogeneous

y 0 (t) = a(t)y(t) (6.8)

and we can solved it by separation of variables. In particular,


Z 0 Z Z Z
y (t) 1
dt = a(t) dt =⇒ ds = a(t) dt ,
y(t) s
and, the general integral of the homogeneous equation (6.8) is given by

ln |y(t)| = A(t) + c0 =⇒ yh (t) = c eA(t) , ∀t ∈ I , c ∈ R

where Z
A(t) = a(t) dt .

The solution to the homogeneous ode is called homogeneous solution. If we fix the initial
condition y(t0 ) = y0 then
yh (t) = y0 eA(t)−A(t0 ) , ∀t ∈ I (6.9)
78 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

where Z t
A(t) − A(t0 ) = a(τ ) dτ .
t0
In particular, if y0 = 0 then y ≡ 0.

6.1.4 Inhomogeneous linear first-order ode


The general integral for the equation (6.7) is the sum of the homogeneous solution (the
solution to (6.8)) and te so-called particular solution that we denote by yp and that we get
by the method of variation of constants. More precisely, we replace the constant c with C(t);
i.e.,
yp (t) = C(t) eA(t) ,
then we differentiate
yp0 (t) = C 0 (t) eA(t) + C(t)A0 (t) eA(t) ,
and we replace in (6.7); hence,

C 0 (t) eA(t) + C(t)A0 (t) eA(t) = a(t) C(t) eA(t) + b(t) .

since A0 (t) = a(t), we have that

C 0 (t) eA(t) = b(t) =⇒ C 0 (t) = e−A(t) b(t) .

Therefore,
Z Z 
C(t) = e−A(τ ) b(τ ) dτ =⇒ yp (t) = eA(t) e−A(τ ) b(τ ) dτ ,

and the general integral is given by


 Z 
y(t) = yh + yp = e A(t)
c+ e−A(τ ) b(τ ) dτ . (6.10)

In particular, the solution to the Cauchy Problem


(
y 0 (t) = a(t) y(t) + b(t) ,
y(t0 ) = y0 ,

is given, for every t ∈ I, by


Rt  Z t Rs 
a(τ ) dτ − a(τ ) dτ
y(t) = e t0 y0 + e t0 b(s) ds . (6.11)
t0

Example 6.1.5. • Find the general integral of

y 0 (t) = (tan t)y(t) + sin t .

We first note that we have to study the equation in an interval of continuity for tan t
( the function sin t is continuous in R). We consider I = (−π/2, π/2) and we compute
the primitive of a(t) = tan t; i.e.,
Z
π π
A(t) = tan t dt = − ln | cos t| = − ln(cos t) , ∀t(− , ) .
2 2
6.2. LINEAR SECOND-ORDER O.D.E. WITH CONSTANT COEFFICIENTS 79

Therefore,
 Z 
y(t) = e− ln(cos t) c + eln(cos t) sin t dt
Z
1  
= c + cos t sin t dt
cos t
1 1
= (c − (cos t)2 ) .
cos t 2
• Find the solution to the ODE
t y 0 (t) = y(t) + t2 cos t .
First of all we note that we can always rewrite the equation in normal form
1
y 0 (t) =
y(t) + t cos t
t
with t 6= 0. According to the initial condition y(t0 ) = y0 , the solution then will exist in
an interval contained in (0, +∞) or (−∞, 0) if t0 ∈ (0, +∞) or t0 ∈ (−∞, 0), respectively.
General solution
y(t) = (c + sin t)t .
• Find the solution of the following ODE:
a) y 0 (t) = (y(t) − 3) cos t
b) y 0 (t) = et+y
2
c) 2t y 0 (t) + yt = 0
d) y 0 (t) + y + et = 0
e) y 0 (t) + yt = sin t
f) y 0 (t) + t2 y = 2t2
g) y 0 (t) = −t y 2 with y(0) = 2
h) y 0 (t) + t2 y = 0 with y(0) = 3
i) t y 0 (t) − y(t) = t2 cos t with y( π2 ) = π.

6.2 Linear Second-order O.D.E. with constant coefficients


6.2.1 The Homogeneous case
The form for the linear second order ode with constant coefficients a0 , a1 , a2 ∈ R is
a2 y 00 (t) + a1 y 0 (t) + a0 y(t) = 0 , (6.12)
with a2 6= 0 otherwise the equation would be of first order.
The solution is determined by assuming that there is a solution of the form eλt ; hence,
a2 λ2 eλt + a1 λ eλt + a0 eλt = 0 =⇒ a2 λ2 + a1 λ + a0 = 0 .
The polynomial a2 λ2 + a1 λ + a0 is called the characteristic polynomial of the ode and we have
to solve the characteristic equation
a2 λ2 + a1 λ + a0 = 0 . (6.13)
80 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

Theorem 6.2.1 (Solutions to Homogeneous equation with constant coefficients). Let c1 , c2 ∈


R be two arbitrary constant and let λ1 , λ2 be the roots to the characteristic equations (6.13).
Then any solutions to (6.12) fulfilled only one of the following cases:
• if there exists λ1 , λ2 ∈ R with λ1 6= λ2 then

y(t) = c1 eλ1 t + c2 eλ2 t ;

• if there exists λ1 , λ2 ∈ R with λ1 ≡ λ2 then

y(t) = (c1 + tc2 )eλ1 t ;

• if there exists λ1 , λ2 ∈ C then λ1 , λ2 = α ± iβ with α, β ∈ R and

y(t) = c1 eαt cos(βt) + c2 eαt sin(βt) .

Moreover, for every fixed t0 , y0 , y1 ∈ R there exists a unique solution to the initial value
problem 
00 0
a2 y (t) + a1 y (t) + a0 y(t) = 0 ,

y(t0 ) = y0 , (6.14)

 0
y (t0 ) = y1 .
Example 6.2.2. • Find the general solution to the following homogeneous equation

2y 00 (t) − 3 y 0 (t) + y(t) = 0 .

We associate to the ode the characteristic equation

2λ2 − 3λ + 1 = 0 ;

hence, there exists two real and distinct roots λ1 = 1, λ2 = 1/2 and the general integral
is
y(t) = c1 et + c2 et/2 ,
for any arbitrary constants c1 , c2 .

• Find the solution to the initial value problem

y 00 (t) + 2 y 0 (t) + 3y = 0 , y(0) = 1 , y 0 (0) = 2 .

We associate to the ode the characteristic equation

λ2 + 2λ + 3 = 0 ;

hence, there exists λ1 , λ2 = −1 ± i 2 and the general integral is
 √ √ 
y(t) = e−t c1 cos( 2 t) + c2 sin( 2 t) .

We now find the constants c1 and c2 that satisfy the initial conditions; hence, y(0) =
c1 = 1 and
 √ √   √ √ √ √ 
y 0 (t) = −e−t c1 cos( 2 t) + c2 sin( 2 t) + e−t − 2 c1 sin( 2 t) + 2 c2 cos( 2 t)
6.2. LINEAR SECOND-ORDER O.D.E. WITH CONSTANT COEFFICIENTS 81

and
√ √ 3
y 0 (0) = −c1 + 2 c2 = 2 =⇒ −1 + 2 c2 = 2 =⇒ c2 = √ .
2
Therefore, the unique solution to the initial value problem is
 √ 3 √ 
y(t) = e−t cos( 2 t) + √ sin( 2 t) .
2

• Find the solution to the initial value problem

y 00 (t) + 4 y 0 (t) + 4y = 0 , y(0) = 3 , y 0 (0) = 2 .

We associate to the ode the characteristic equation

λ2 + 4λ + 4 = 0 =⇒ (λ + 2)2 = 0 =⇒ λ1 ≡ λ2 = −2 .

Therefore, the general integral is

y(t) = (c1 + tc2 )e−2t .

Let us now fix the constants c1 , c2 . In particular, y(0) = c1 = 3 and y 0 (t) = −2e−2t (c1 +
tc2 ) + c2 e−2t , which implies y 0 (0) = −6 + c2 = 2; i.e., c2 = 8. Therefore, the unique
solution to the initial value problem is

y(t) = (3 + 8t) e−2t .

Exercise 6.2.3. Find the solution to the initial value problem

y 00 (t) + 5 y 0 (t) + 6y = 0 , y(0) = 1 , y 0 (0) = −1 .

6.2.2 Inhomogeneous equation: method of undetermined coefficients


We now consider the case of linear second-order o.d.e. with constant coefficients not homo-
geneous; i.e.,
a2 y 00 (t) + a1 y 0 (t) + a0 y(t) = f (t) . (6.15)
Similarly to the first order inhomogeneous case, the general integral is given by the sum of the
solution to the homogeneous equation (that is the one with f ≡ 0) with a so-called particular
solution yp . More precisely,
y(t) = c1 y1 + c2 y2 + yp
where c1 , c2 ∈ R are two arbitrary constants and y1 , y2 are as in Theorem 6.2.1.
There are cases where the particular solution yp belongs to the same class of functions of
f . Here below the different cases.

(1) If f (t) = Pn (t) is a polynomial of order n then:

(a) if a0 6= 0 then yp = Qn (t) ,


(b) if a0 = 0 and a1 6= 0 then yp = t Qn (t) ,
(c) if a0 = 0 and a1 = 0 then yp = t2 Qn (t) .
82 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

(2) If f (t) = A cos at or B sin at or f (t) = A cos at + B sin at then yp (t) = C cos at + D sin at.

(3) If f (t) = CeBt where B is not a root of the characteristic equation then yp (t) = AeBt .
Note that the exponential is the same, we may find another constant.

Example 6.2.4 (f is a polynomial). (1) Find the general integral of equation

y 00 (t) − 2y(t) = 1 + t2 .

Let’s start by the particular solution that will be a polynomial of degree 2 since f (t) =
1 + t2 . Note that a0 6= 0 then yp = p2 t2 + p1 t + p0 . To fined the coefficients p0 , p1 , p2 we
have to compute

yp0 = 2p2 t + p1
=⇒ 2p2 − 2(p2 t2 + p1 t + p0 ) = 1 + t2
yp00 (t) = 2p2 − 2p2 t2 − 2p1 t + 2p2 − 2p0 = t2 + 1 .

Therefore,

−2p2 = 1 , −2p1 = 0 , 2p2 − 2p0 = 1 =⇒ p0 = −1 , p1 = 0 , p2 = −1/2 ;

and the particular solution is


1
yp = − t2 − 1 .
2

The homogeneous solution is obtained by solving λ2 − 2 = 0; i.e., λ = ± 2; hence,
√ √ t2
y(t) = c1 e 2t
+ c2 e− 2t
− − 1.
2

(2) Find the general integral of equation

y 00 (t) + 2y 0 (t) = t .

Note that a0 = 0; hence, we expect a particular solution of the type yp = t(p0 + p1 t).
More precisely,

yp0 = 2p1 t + p0
=⇒ 2p1 + 4p1 t + 2p0 = t
1 1
yp00 (t) = 2p1 4p1 = 1 , 2p0 + 2p1 = 0 , =⇒ p1 = , p0 = − .
4 4
Therefore,
t
yp = (t − 1) .
4
The homogeneous solution is obtained by solving λ2 + 2λ = 0; i.e., λ = 0 , −2; hence,
t
y(t) = c1 + c2 e−2t + (t − 1) .
4
It is important to underlying that, at difference of the previous case, now the particular
solution is NOT given by a polynomial of the same degree of f .
6.2. LINEAR SECOND-ORDER O.D.E. WITH CONSTANT COEFFICIENTS 83

(3) Find the general integral of equation

y 00 (t) = t .

Note that a0 = a1 = 0 then we expect a particular solution of the type yp = t2 (p0 +p1 t) =
p0 t2 + p1 t3 . More precisely,

yp0 = 3p1 t2 + 2p0 t


=⇒ 6p1 t + 2p0 = t
1
yp00 (t) = 6p1 t + 2p0 6p1 = 1 , p0 = 0 , =⇒ p1 = , p0 = 0 .
6
Therefore,
t t3
yp = t2 = .
6 6
The homogeneous solution is obtained by solving λ2 = 0; i.e., λ = 0; hence,

t3
y(t) = (c1 + c2 t) + .
6

Example 6.2.5 (f is a combination of cos and sin). (1) Find the general integral of equa-
tion
y 00 (t) + y 0 (t) + 2y = 2 cos t .
Let’s start by the particular solution that will be of the form yp = A cos t+B sin t. More
precisely,

yp0 = −A sin t + B cos t


yp00 (t) = −A cos t − B sin t ,

which implies

−A cos t − B sin t + −A sin t + B cos t + 2(A cos t + B sin t)


= (A + B) cos t + (B − A) sin t
= 2 cos t .

Therefore,

A + B = 2

=⇒ A = B = 1

B − A = 0,

and
yp = cos t + sin t .

The homogeneous solution is obtained by solving λ2 + λ + 2 = 0; i.e., λ = (−1 ± i 7)/2
and √ √
−t/2 7) 7)
y(t) = e (c1 cos( )t + c2 sin( )t) + cos t + sin t .
2 2
84 CHAPTER 6. ORDINARY DIFFERENTIAL EQUATIONS

(2) Solve the initial value problem


1 5 √
y 00 (t) + 2y 0 (t) + 3y = 6 sin 3t , y(0) = , y 0 (0) = − − 2 .
2 2
The corresponding homogeneous
√ o.d.e. has a characteristic equation λ2 + 2λ + 3 = 0
with roots λ = −1 ± i 2 so the homogeneous solution is
 √ √ 
yh = e−t c1 cos( 2 t) + c2 sin( 2 t) .

The method of undetermined coefficients says that we should try for a particular solution
of the form
yp = C cos 3t + D cos 3t .
Then,

y 0 (t) = −3C sin 3t + 3D cos 3t , y 00 (t) = −9C cos 3t − 9D sin 3t .

Substituting into the O.D.E. gives

−9C cos 3t − 9D sin 3t + 2(−3C sin 3t + 3D cos 3t) + 3(C cos 3t + D sin 3t)
= (6D − 6C) cos 3t + (−6D − 6C) sin 3t
= 6 sin 3t .

We can now compare the coefficients of cos 3t and sin 3t to get


1
(6D − 6C) = 0 , (−6D − 6C) = 6 =⇒ D = C = − .
2
Therefore, the general solution is
 √ √  1 1
y(t) = e−t c1 cos( 2 t) + c2 sin( 2 t) − cos 3t − sin 3t .
2 2
We now consider the initial conditions
1 1
y(0) = c1 − = =⇒ c1 = 1 .
2 2
To consider the initial condition y 0 (0) we have first to derivate the general integral
 √ √   √ √ √ √ 
y 0 (t) = −e−t c1 cos( 2 t) + c2 sin( 2 t) + e−t − 2c1 sin( 2 t) + c2 2 cos( 2 t)
3 3
+ sin 3t − cos 3t
2 2
0
√ 3 5 √
y (0) = −c1 + c2 2 − = − + c2 2
2 2
5 √
= − − 2,
2
so we get c2 = −1. The unique solution to the initial value problem is then
 √ √  1 1
y(t) = e−t cos( 2 t) − sin( 2 t) − cos 3t − sin 3t .
2 2
6.2. LINEAR SECOND-ORDER O.D.E. WITH CONSTANT COEFFICIENTS 85

Example 6.2.6 (f is the exponential function). (1) Solve

3y 00 (t) − 2y 0 (t) − y = e2t ,

given that
y(0) = 0 , y 0 (0) = 1 .
The corresponding homogeneous o.d.e. has a characteristic equation 3λ2 − 2λ − 1 = 0
with roots λ = 1, −1/3. Hence the homogeneous solution is yh (t) = c1 et + c2 e−t/3 . We
have to look for a particular solution of the form yp = C e2t ; hence,

yp0 (t) = 2C e2t , yp00 (t) = 4C e2t .

Substituting into the O.D.E. gives

12C e2t − 4C e2t − C e2t = 7C e2t .

We now compare 7C e2t with f (t) = e2t and we get C = 1/7 and the general integral is
given by
1
y(t) = c1 et + c2 e−t/3 + e2t .
7
Now we use the initial conditions to find c1 and c2 . Firstly,
1 1
y(0) = c1 + c2 + = 0 =⇒ c1 + c2 = − .
7 7
Also,
1 2 1 2
y 0 (t) = c1 et − c2 e−t/3 + e2t =⇒ y 0 (0) = c1 − c2 + = 1
3 7 3 7
which gives c1 − c2 /3 = 5/7. To find c1 and c2 we have to solve the following linear
system 
c1 + c2 = − 17

=⇒ c1 = 12 , c2 = − 14
9

c1 − c32 = 57 .

Therefore, the unique solution to the initial value problem is


1 9 1
y(t) = et − e−t/3 + e2t .
2 14 7

You might also like