Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For...

164
Calculus II: For Biology and Medicine Yi Li Department of Mathematics, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218 E-mail address : [email protected]; [email protected]

Transcript of Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For...

Page 1: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

Calculus II: For Biology and Medicine

Yi Li

Department of Mathematics, Johns Hopkins University, 3400 NorthCharles Street, Baltimore, MD 21218

E-mail address: [email protected]; [email protected]

Page 2: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

Abstract. This is the lecture note on Calculus for biology and medicine. The

content contains additional topics beyond the textbook and lots of interestingproblems.

• Please inform me typos and other error (e.g., grammar) via

[email protected]!• I will keep to update material.

• All figures come from Google Image and Wiki.

Page 3: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

Contents

Chapter 1. Numbers and functions 51.1. Real and complex numbers 51.2. Elementary functions 11

Chapter 2. Sequences and difference equations 172.1. Sequences 172.2. Population models 22

Chapter 3. Limits and continuity 273.1. Limits 273.2. Continuity 31

Chapter 4. Differentiation 354.1. Derivatives 354.2. Basic rules and chain rule 36

Chapter 5. Applications of differentiation 395.1. Extrema and the mean-value theorem 395.2. Monotonicity, concavity, and inflection points 435.3. L’Hospital’s rule 455.4. Antiderivative 47

Chapter 6. Integrations 496.1. Definite integrals 496.2. The fundamental theorem of calculus 516.3. Applications of integration 54

Chapter 7. Integration techniques 597.1. Basic rules 597.2. Integration by parts 627.3. Rational functions and partial fractions 657.4. Improper integrals 687.5. Taylor approximation 74

Chapter 8. Differential equations 818.1. Solving differential equations 818.2. Equilibria and stability 85

Chapter 9. Linear algebra 899.1. Linear systems 899.2. Matrices 949.3. Linear maps, eigenvectors, and eigenvalues 103

3

Page 4: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

4 CONTENTS

9.4. Analytic geometry 110

Chapter 10. Multi-variable calculus 12110.1. Limits and continuity 12110.2. Partial derivatives 12710.3. Tangent planes, differentiability, and linearization 13110.4. Chain rule 13810.5. Applications 145

Chapter 11. Systems of differential equations 15911.1. Linear systems 15911.2. Solving linear systems 16111.3. Equilibria and stability 164

Page 5: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 1

Numbers and functions

This chapter1 deals with the preliminaries used in the followingchapters, including the systematical description of real and com-plex numbers, and elementary functions. An important class ofelementary functions is the class of polynomial functions, sincewe will see that any continuous function on a compact set (e.g.,on a closed interval [0, 1]) can be approximated by polynomials.

1.1. Real and complex numbers

Let N be the set of all natural numbers, i.e.,

N := {n : n = 1, 2, · · · },

and N≥0 := N ∪ {0} the set of whole numbers. Let us denote Z and Q the set ofall integers and rational numbers, respectively. The relations of N,Z,Q are relatedin Figure 1.1.

1.1.1. The real numbers. Let R be the set of all real numbers. For any realnumbers a, b ∈ R with a < b, define

open interval (a, b) := {x ∈ R : a < x < b},closed interval [a, b] := {x ∈ R : a ≤ x ≤ b}.

We also use half-open intervals:

[a, b) := {x ∈ R : a ≤ x < b}, (a, b] := {x ∈ R : a < x ≤ b}.

1March 25, 2013

Figure 1.1. Numbers

5

Page 6: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

6 1. NUMBERS AND FUNCTIONS

Figure 1.2. Real numbers

Figure 1.3. Absolute value

The above three types of intervals are clearly bounded; unbounded intervals aresets of the forms {x ∈ R : x > a}. Here are the possible cases:

[a,∞) := {x ∈ R : x ≥ a},(−∞, a] := {x ∈ R : x ≤ a},

(a,∞) := {x ∈ R : x > a},(−∞, a) := {x ∈ R : x < a}.

The symbols “∞” and “−∞” “plus infinity” and “minus infinity”, respectively. Inparticular,

R = (−∞,∞).

Definition 1.1.1. The absolute value of a real number a, denoted by |a|, is

(1.1.1) |a| :={

a, a ≥ 0,−a, a < 0.

Looking at Figure 1.3, we see the x = 0 is the “singular point” of the blueline; a geometric interpretation says that the function y = x has no tangent line atx = 0. The second picture in Figure 1.3 locally looks like the first one, at pointsx = b, c, d.

1.1.2. Lines in the plane. The linear equation in the plane is given by

(1.1.2) Ax+By + C = 0,

Page 7: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

1.1. REAL AND COMPLEX NUMBERS 7

Figure 1.4. Linear equation

where A,B, and C are some constants. When A = B = 0 in (1.1.2), we must haveC = 0. Hence, we may assume that A and B are not both equal to 0. Geometrically,the graph of a linear equation is a straight line.

If the two points (x1, y1) and (x2, y2) lie on a straight line (see Figure 1.4), thenthe slope of the line is

(1.1.3) m :=y2 − y1

x2 − x1.

Two points (or one point and the slope) are sufficient to determine the equation ofa straight line.

(i) If we are given one point (x0, y0) and the slope m, we can use the point-slope form of a straight line to write its equation:

(1.1.4) y − y0 = m(x− x0).

(ii) The equation (1.1.4) can be equivalently written as the slop-interceptform

(1.1.5) y = mx+ b,

where b is the y-intercept, which is the point of intersection of the linewith the y-axis.

We say y is proportional to x, if

y = mx

for some m ∈ R; in this case we call m the constant of proportionality and wewrite

y ∝ x.In particular, y − b ∝ x from (1.1.5).

Given two lines l1 and l2 in the plane.

(i) When l1 and l2 have no points in common or are identical, they are calledparallel, denoted by l1 ‖ l2. Note that two noncoincident lines are parallelif and only if their slopes are identical. In particular, for two noncoinci-dent, nonvertical lines l1 and l2 with slopes m1 and m2, respectively, wehave

l1 ‖ l2 ⇐⇒ m1 = m2.

Page 8: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

8 1. NUMBERS AND FUNCTIONS

Figure 1.5. Circle

Figure 1.6. Trigonometric functions

(ii) Two l1 and l2 are called perpendicular, denoted l1 ⊥ l2, if their inter-section forms an angle of 90◦. Two nonvertical lines are perpendicular ifand only if their slopes are negative reciprocals; that is, if l1 and l2 arenonvertical lines with slopes m1 and m2, then

l1 ⊥ l2 ⇐⇒ m1m2 = −1.

1.1.3. Equation of the circle. A circle is the set of all points at a givendistance, called the radius, from a given point, called the center.

If r is the distance from (x0, y0) to (x, y), then we have

(1.1.6) (x− x0)2 + (y − y0)2 = r2.

If r = 1 and (x0, y0) the circle is called the unit circle, denoted S1 (that is, S1 isthe sphere of dimension 1).

1.1.4. Trigonometry. Consider a point B = (x, y) on the unit circle S1 (seeFigure 1.6). The point B and O = (0, 0) form an angle θ. Define

sin θ = y, csc θ =1

sin θ,

cos θ = x, sec θ =1

cos θ,

tan θ =y

x, cot θ =

1

tan θ.

Page 9: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

1.1. REAL AND COMPLEX NUMBERS 9

From the definition, we have

sin2 θ + cos2 θ = 1,(1.1.7)

tan2 θ + 1 = sec2 θ.(1.1.8)

Furthermore,

(i) Symmetry:

sin(−θ) = − sin θ, cos(−θ) = cos θ,

sin(π

2− θ)

= cos θ, cos(π

2− θ)

= sin θ,

sin(π − θ) = sin θ, cos(π − θ) = − cos θ.

(ii) Shifts:

sin(θ +

π

2

)= cos θ, cos

(θ +

π

2

)= − sin θ,

sin(θ + π) = − sin θ, cos(θ + π) = − cos θ,

sin(θ + 2π) = sin θ, cos(θ + 2π) = cos θ.

(iii) Angle sum and difference identities:

sin(α± β) = sinα · cosβ ± cosα · sinβ, cos(α± β) = cosα · cosβ ± sinα · sinβ.

(iv) Double-angle formula:

sin(2θ) = 2 sin θ · cos θ =2 tan θ

1 + tan2 θ,

cos(2θ) = cos2 θ − sin2 θ = 2 cos2 θ − 1 = 1− 2 sin2 θ

=1− tan2 θ

1 + tan2 θ,

tan(2θ) =2 tan θ

1− tan2 θ.

(v) Triple-angle formula:

sin(3θ) = −4 sin3 θ+3 sin θ, cos(3θ) = 4 cos3 θ−4 cos θ, tan(3θ) =3 tan θ − tan3 θ

1− 3 tan2 θ.

1.1.5. Exponentials and logarithms. An exponential is an expression ofthe form

ar

where a is called the base and r the exponent. Unless r is an integer or unless ris a rational number of the form p/q where p is an integer and q is an odd integer,we will assume that a is positive. Some basic properties are

aras = ar+s, (ab)r = arbr,

ar

as= ar−s,

(ab

)r=

ar

br,

a−r =1

ar, (ar)s = ars.

Page 10: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10 1. NUMBERS AND FUNCTIONS

Figure 1.7. Complex numbers

If y = ax > 0 with a > 0 and a 6= 1, then we formally write x := loga y.Consequently,

loga(xy) = loga x+ loga y,

loga

(x

y

)= loga x− loga y,

loga(xr) = r loga x,

loga (ax) = x,

aloga x = x.

When a = e, we write loga as ln, where e is the constant and approximated equal2

to 2.7182818.

1.1.6. Complex numbers and quadratic equations. Observe that thesquare of a real number is always nonnegative. To extend the real numbers, weintroduce a symbol i satisfying

(1.1.9) i2 = −1.

Formally, the equation has two solutions√−1 and −

√−1. We usually set

(1.1.10) i :=√−1

and call i the imaginary unit.

Definition 1.1.2. A complex number is a number of the form

z = a+ b√−1, a, b ∈ R.

The real number a =: <(z) is the real part of z, and the real number b =: =(z) isthe imaginary part. (See Figure 1.7) The set of all complex numbers is denotedC. When a = 0 we call b

√−1 an purely imaginary number.

A complex number z = a + b√−1 corresponds to a point (a, b) in the plane,

conversely, a point (a, b) in the plane corresponds to a complex number z = a +b√−1. Consequently,

a+ b√−1 = c+ d

√−1⇐⇒ a = c and b = d.

2This number is an irrational number and can be defined as (see later) limn→∞(1 + 1n

)n.

Page 11: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

1.2. ELEMENTARY FUNCTIONS 11

Given two complex numbers a+ b√−1 and c+ d

√−1, we have

(a+ b√−1) + (c+ d

√−1) = (a+ c) + (b+ d)

√−1,

(a+ b√−1)(c+ d

√−1) = ac+ ad

√−1 + bc

√−1 + bd(

√−1)2

= (ac− bd) + (ad+ bc)√−1.

Definition 1.1.3. If z = a+ b√−1 is a complex number, its conjugate, denoted

by z, is defined as

(1.1.11) z := a− b√−1.

Proposition 1.1.4. For any z, w ∈ C we have

(1.1.12) (z) = z, z + w = z + w, zw = zw.

Furthermore, if z = a+ b√−1 then

(1.1.13) |z|2 := zz = a2 + b2.

We call |z| :=√|z|2 the norm of z.

If z = a+ b√−1, then

|z| = r, r :=√a2 + b2.

Thus z lies in the circle at the origin with radius r.

1.2. Elementary functions

A function f is a rule that assigns each element x in the set A exactly oneelement y in the set B. The element y is called the image (or value) of x underf and is denoted by f(x). The set A is called the domain of f , the set B is calledthe codomain of f , and the set f(A) = {y ∈ B : y = f(x) for some x ∈ A} iscalled the range of f .

Definition 1.2.1. Two functions f and g are equal if and only if

(1) f and g are defined on the same domain, and(2) f(x) = g(x) for all x in the domain.

By this definition, we see that two functions

f : R→ R, x 7→ x2, g : [0, 1]→ R, x 7→ x2,

do not coincide with each other.

Definition 1.2.2. A function f : A→ B is called

(1) even if f(x) = f(−x) for all x ∈ A, and(2) odd if f(x) = −f(−x) for all x ∈ A.

Page 12: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

12 1. NUMBERS AND FUNCTIONS

By the definition, if f is even or odd, the domain A must be symmetric.

Definition 1.2.3. The composite function f ◦ g (also called the compositionof f and g) is defined as

(f ◦ g)(x) := f [g(x)]

for each x in the domain of g for which g(x) is in the domain of f .

1.2.1. Polynomial functions. A polynomial function is a function of theform

f(x) = a0 + a1x+ a2x2 + · · ·+ anx

n,

where n is the nonnegative integer and a0, a1, · · · , an are real-valued constants withan 6= 0. The coefficient an is called the leading coefficient, and n is called thedegree of the polynomial function. The largest possible domain of f is R.

A polynomial function f(x) of degree n may not have n roots. For example,consider the polynomial function

f(x) = x2 + x+ 1 =

(x+

1

2

)2

+3

4;

this function is always strictly positive and hence has no roots. However

Theorem 1.2.4. Any nonconstant polynomial function with complex-valued coeffi-cients has, counted with multiplicity, exactly n complex roots, where n is the degreeof this polynomial function.

This is the fundamental theorem of algebra. For example, the polynomialfunction f(x) = x2 + x+ 1 has two complex roots

−1

2+

√3

4

√−1.

1.2.2. Rational functions. A rational function is the quotient of two poly-nomial functions p(x) and q(x):

f(x) =p(x)

q(x), q(x) 6= 0.

1.2.3. Power functions. A power function is of the form

f(x) = xr, r ∈ R.

1.2.4. Exponential functions. The function f is an exponential functionwith base a if

f(x) = ax

where a is a positive constant other than 1. The largest possible domain of f is R.When a = e, the exponential function is called the natural exponential

function

exp(x) := ex.

Page 13: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

1.2. ELEMENTARY FUNCTIONS 13

1.2.5. Inverse functions. A function f(x) is called one-to-one if f(x1) =f(x2) implies x1 = x2.

Definition 1.2.5. Let f : A→ B be a one-to-one function with range f(A). Theinverse function f−1 had domain f(A) and range A and is defined by

f−1(y) = x⇐⇒ y = f(x)

for all y ∈ f(x).

Note that if f : A→ B has an inverse f−1, then

f−1[f(x)] = x, x ∈ A,f [f−1(x)] = x, x ∈ f(A).

1.2.6. Logarithmic functions. The inverse of f(x) = ax is called the loga-rithm to base a and is written f−1(x) = loga x.

aloga x = x, x > 0,

loga(ax) = x, x ∈ R,

ax = exp[x ln a],

loga x =lnx

ln a, x > 0.

1.2.7. Trigonometric functions. A function f(x) is periodic if there is apositive constant a such that

f(x+ a) = f(x)

for all x in the domain of f . If a is the smallest number with this property, we callit the period of f .

The trigonometric functions are examples of periodic functions. Observe thatthe period of sin(x) or cos(x) is 2π.

Example 1.2.6. Consider the function

f(x) = a sin(kx), x ∈ R,

where a ∈ R and k 6= 0. Since f(x) takes on values between −a and a, we cal |a|the amplitude. Observe that the period of f(x) is 2π/|k|.

Remark 1.2.7. (Fourier series of periodic functions) suppose that f(x) is a periodicfunction of period 2π. Then we may assume that f(x) is defined on [−π, π]. If f(x)is integrable (for definition, see Chapter 6), we define

(1.2.1) an :=1

π

∫ π

−πf(x) cos(nx) dx, bn :=

1

π

∫ π

−πf(x) sin(nx) dx, n ∈ N≥0.

which are called the Fourier coefficients of f . The formal infinite sum

(1.2.2) (Sf)(x) :=a0

2+∑n∈N

an cos(nx) + bn sin(nx)

Page 14: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

14 1. NUMBERS AND FUNCTIONS

Figure 1.8. Graphs of the six basic trigonometric functions

is called the Fourier series of f . If f ∈ C1([−π, π]), then a theorem in Fouriertheory asserts that Sf = f for each x ∈ [−π, π]; that is,

(1.2.3) f(x) = (Sf)(x), x ∈ [−π, π], if f ∈ C1([−π, π]).

By choosing a suitable function f , we can prove

(1.2.4)π2

6=∑n∈N

1

n2=

1

12+

1

22+

1

32+ · · · .

Definition 1.2.8. A number is called algebraic if it is the solution of a polynomialequation with rational coefficients. For example,

√2 is algebraic, as it satisfies the

equation x2 − 2 = 0. Numbers that are not algebraic are called transcendental.

Example 1.2.9. (π is transcendental) Swiss scientist Johann Heinrich Lambert (26August 1728– 25 September 1777) in 1761 proved that π is irrational; French math-ematician Adrien-Marie Legendre (18 September 1752– 10 January 1833) proved in1794 that π is also irrational. In 1882, German mathematician Carl Louis Ferdinandvon Lindemann (12 April 1852– 6 March 1939) proved that π is transcendental, con-firming a conjecture made by both Adrien-Marie Legendre and Leonhard Euler (15April 1707– 18 September 1783).

Page 15: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

1.2. ELEMENTARY FUNCTIONS 15

Figure 1.9. Lambert, Legendre, and Euler

Figure 1.10. Lindemann and Gauss

Remark 1.2.10. (Gauss-Legendre algorithm) The Gauss-Legendre algorithm isan algorithm to compute the digits of π. It is notable for being rapidly convergent,with only 25 iterations producing 45 million correct digits of π.

(1) Choose a0 = 1, b0 = 1/√

2, t0 = 1/4, and p0 = 2.(2) Consider

an+1 =an + bn

2, bn+1 =

√anbn, tn+1 = tn − pn(an − an+1)2, pn+1 = 2pn.

(3) π is then approximated as

π = limn→∞

(an + bn)2

4tn.

The first three iterations give

3.140 · · · , 3.14159264 · · · , 3.14159265358979332382 · · · .

We call a function y = f(x) algebraic if it is the solution of an equation of theform

Pn(x)yn + · · ·+ P1(x)y + p0y = 0

in which the coefficients are polynomial functions in x with rational coefficients. Forexample, the function y = 1

1+x is algebraic, as it satisfies the equation (x+1)y−1 =

Page 16: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

16 1. NUMBERS AND FUNCTIONS

0. Functions that are not algebraic are called transcendental. All the trigonometric,exponential, and logarithmic functions are transcendental functions.

Remark 1.2.11. 3The name “transcendental” comes from Leibniz in his 1682paper where he proved sinx is not an algebraic function of x, and Euler was probablythe first person to define transcendental numbers in the modern sense.

(1) Joseph Liouville first proved the existence of transcendental numbers in1844, and in 1851 gave the first decimal examples such as the Liouvilleconstant ∑

k∈N

1

10k!.

(2) Johann Heinrich Lambert conjectured that e and π were both transcen-dental numbers in his 1761 paper proving the number π is irrational.

(3) Charles Hermit in 1873 proved that e is transcendental.(4) In 1874, Georg Cantor proved that the algebraic numbers are countable

and the real numbers are uncountable. In 1878, Cantor showed that thereare as many transcendental numbers as there are real numbers.

(5) In 1882, Ferdinand von Lindemann published a proof that the number πis transcendental. He first showed that e to any nonzero algebraic power

is transcendental, and since e√−1π = −1 is algebraic,

√−1π and therefore

π must be transcendental.(6) In 1900, David Hilbert posed the Hilbert’s seventh problem: if a is an

algebraic number which is not zero or one, and b is an irrational algebraicnumber, is ab necessarily transcendental? The affirmative answer wasprovided in 1934 by the Helfond-Schneider theorem.

1.2.8. Graphing. The graph of

y = f(x) + a

is a vertical translation of the graph of y = f(x). If a > 0, the graph of y = f(x)is shifted up a units; if a < 0, the graph of y = f(x) is shifted down |a| units.

The graph ofy = f(x− c)

is a horizontal translation of the graph y = f(x). If c > 0, the graph of y = f(x)is shifted c units to the right; if c < 0, the graph of y = f(x) is shifted |c| units tothe left.

Page 17: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 2

Sequences and difference equations

In his chapter, we discuss models for populations that reproduceat discrete times and we develop some of the theory needed toanalyze this type of model.

2.1. Sequences

A sequence if the function

f : N −→ R, n 7−→ f(n)

as a list of numbers a0, a1, a2, · · · where an = f(n). We will write {an : n ∈ N≥0}or {an}n∈N≥0

if we mean the entire sequence.

Example 2.1.1. (1) an = (−1)n, n = 0, 1, 2, · · · .(2) an = n2, n = 0, 1, 2, · · · .(3) an = (−1)n/(n+ 1)2, n = 0, 1, 2, · · · .

2.1.1. kth order recursion. From Example 2.1.1 (2), we see that

an+1 = (n+ 1)2 = n2 + 2n+ 1 = an + 2√an + 1;

thus an+1 depends only on an. In general, we have the following

Definition 2.1.2. We say a sequence {an}n∈N≥0is kth order recursive if

an+1 = g(an, an−1, · · · , an−k+1)

for some function g. In particular, the 1th order recursion is of the form

an+1 = g(an);

the 2th order recursion is of the form

an+1 = g(an, an−1).

2.1.2. Limits. Looking at Example 2.1.1, we see that, as n goes to infinity,

(1) an can not be determined;(2) an tends to infinity;(3) an tends to zero.

17

Page 18: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

18 2. SEQUENCES AND DIFFERENCE EQUATIONS

Figure 2.1. Limits

Definition 2.1.3. The sequence {an}n∈N or {an}n∈N≥0has limit a <∞, written

as limn∈∞ an = a, if, for every ε > 0, there exists an integer N (depending on ε)such that

|an − a| < ε

whenever n > N . If the limit exists, the sequence is called convergent and we saythat an converges to a as n tends to infinity. If the sequence has no limit, it iscalled divergent.

Proposition 2.1.4. If the sequence {an}n∈N or {an}n∈N≥0is convergent, then the

limit of this sequence is unique.

Proof. Suppose we have two limits a and a′. By the definition, for everyε > 0, there exist integers N and N ′ such that

|an − a| < ε n > N, and |an − a′| < ε n > N ′.

Consequently, for n > N +N ′, we have

|a− a′| = |(an − a) + (an − a′)| ≤ |an − a|+ |an − a′| < 2ε.

Since the left-hand side does not depend on n and ε, letting ε → 0, we obtaina = a′. �

Exercise 2.1.5. Show that limn→∞1n = 0.

Exercise 2.1.6. Show that the sequence {an}n∈N, where an = n, is divergent.

In order to calculus, we need the following fundamental results.

Page 19: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

2.1. SEQUENCES 19

Theorem 2.1.7. If limn→∞ an and limn→∞ bn exist and c is a constant, then

limn→∞

(an + bn) = limn→∞

an + limn→∞

bn,(2.1.1)

limn→∞

(can) = c limn→∞

an,(2.1.2)

limn→∞

(anbn) = limn→∞

an · limn→∞

bn,(2.1.3)

limn→∞

anbn

=limn→∞ anlimn→∞ bn

, provided limn→∞

bn 6= 0.(2.1.4)

For example,

limn→∞

n+ 1

n= limn→∞

(1 +

1

n

)= 1 + lim

n→∞

1

n= 1 + 0 = 1

by (2.1.1) and Exercise 2.1.5.

Remark 2.1.8. The assumption in Theorem 2.1.7 that limn→∞ an and limn→∞ bnexists is necessary. For example, consider an = n and bn = −n; then (2.1.1) doesnot hold.

2.1.3. Recursions. We consider the sequences of the 1th order recursion

an+1 = g(an), a0 is a given real number.

We start from several elementary special cases.1. an+1 = can for some nonzero constant c. In this case, it is easily to see that

(2.1.5) an = can−1 = c2an−2 = · · · = a0cn.

2. an+1 = an + c for some constant c. In this case, we have

(2.1.6) an = a0 + cn.

3. an+1 = c1an + c2 for sone constants c1 6= 1 and c2. When c1 = the resultfollows from 2. Consider the constant b such that

an+1 − ban − b

= c1;

then

an+1 = c1an + b(1− c1), c2 = b(1− c1).

So b = c21−c1 and

an+1 −c2

1− c1= c1

(an −

c21− c1

).

Applying (2.1.5) to this case, we arrive at

(2.1.7) an =c2

1− c1+

(a0 −

c21− c1

)cn1 .

Page 20: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

20 2. SEQUENCES AND DIFFERENCE EQUATIONS

Example 2.1.9. Let an+1 = 4− 2an with a0 = 43 . By (2.1.7) we have

an =4

1− (−2)+

(4

3− 4

1− (−2)

)(−2)n =

4

3.

In this case limn→∞ an = 43 .

In Example 2.1.9, we can give another short proof. Suppose the limit limn→∞ an =a exists, by taking the limit of n, we have

a = limn→∞

an+1 = 4− 2 limn→∞

an = 4− 2a

which gives us a = 4/3. Thus approach shows that if we know the limit exists,then we can take the limits on both-sides of an+1 = g(an) to get the desired limit.However, in order to applying this argument, we should know the existence at first.This can be seen from the following fundamental theorem.

Theorem 2.1.10. Any bounded increasing or decreasing sequence has finite limit.

We say that a sequence {an}n∈N≥0is bounded if |an| ≤M for all n, where M

is some positive constant. A sequence {an}n∈N≥0is increasing (or decreasing)

if an ≤ an+1 (or an ≥ an+1).

Example 2.1.11. Consider an+1 =√

3an with a0 = 2. If limn→∞ an = a exists,then

a =√

3a =⇒ a = 0 or a = 3.

We now prove that the limit of an exists. Since

a1 =√

6 < 3, a2 =√

3a1 <√

3× 3 = 3,

we claim that an ∈ (0, 3). If this claim holds for n, then

an+1 =√

3an <√

3× 3 = 3, an+1 > 0,

by inductive hypothesis. Hence an ∈ (0, 3) for all n. From

an+1

an=

√3

an> 1,

it follows that the sequence {an}n∈N≥0is bounded and increasing, and therefore

the limit limn→∞ an exists.

Returning to the 1th order recursion

an+1 = g(an).

We say that a is a fixed point of the sequence {an}n∈N≥0if

a0 = a =⇒ an = a for all n.

For example, 4/3 is a fixed point of the sequence {an}n∈N≥0. If a is a fixed point,

thena = an+1 = g(an) = g(a).

Page 21: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

2.1. SEQUENCES 21

Figure 2.2. Fixed points of f(x)

Figure 2.3. Rudolf Otto Sigismund Lipschitz (1832–1903)

Definition 2.1.12. Given a function f : A→ A. A number a ∈ A is called a fixedpoint of f if a = f(a). Thus a is an intersection point of the functions y = x andy = f(x). (see Figure 2.2)

Observe that if a is a fixed point of the sequence an+1 = g(an), then a is a fixedpoint of the function g : R → R. Conversely, if a is a fixed point of the functionf : R → R, then we can construct a sequence {an}n∈N≥0

of which a is a fixedpoint.

Definition 2.1.13. A function f : A→ B is called Lipschitz continuous if thereexists a nonnegative constant L such that

|f(x)− f(y)| ≤ L|x− y|whenever x, y ∈ A.

For example f(x) =√x2 + 5/2, x ∈ R, is a Lipschitz continuous function with

L ≤ 1/2.

Page 22: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

22 2. SEQUENCES AND DIFFERENCE EQUATIONS

Proposition 2.1.14. Let f : R → R be a Lipschitz continuous function withconstant L ∈ (0, 1). If a is a fixed point of f , then there exists a sequence {xn}n∈N≥0

of which a is a fixed point and limn→∞ an = a.

Proof. Given a point a0 ∈ R, consider

a1 := f(a0), a2 := f(a1) = f(f(a0)) := f [2](a0), an := f [n](a0).

Then

|a1 − a| = |f(a0)− f(a)| ≤ L|a0 − a|;in general, we have

|an − a| = f(an−1)− f(a)| ≤ L|an−1 − a| ≤ · · · ≤ Ln|a0 − a|for all n. Letting n → ∞ and noting that L ∈ (0, 1) imply limn→∞ an = a. Inparticular, when a0 = a, we have |an − a| ≤ Ln|a− a| = 0 so that an = a. �

2.2. Population models

We denote by the population size at time t by Nt, t = 0, 1, 2, · · · , and considerthe model

(2.2.1) Nt+1 = f(Nt),

where the function f describes the density dependence of the population dynamics.A simple model is

(2.2.2) Nt+1 = RNt orNtNt+1

=1

R.

When R > 1, the population size will grow indefinitely, provided that N0 > 0.

2.2.1. Beverton-Holt model. The Beverton-Holt model is a classic discrete-time population model which is a nonlinear version of (2.2.2)

(2.2.3)NtNt+1

=1

R+

1− 1R

KNt or Nt+1 =

RNt

1 + R−1K Nt

,

where R > 1 and K > 0 is the carrying capacity.If N0 > 0, then Nt > 0 for all n; moreover

Nt+1

KR=

NtK + (R− 1)Nt

=1

R− 1

(1− K

K + (R− 1)Nt

),

Nt+1 −Nt = NtR− 1 + R−1

K Nt

1 + R−1K Nt

= (R− 1)NtK +Nt

K + (R− 1)Nt,

which imply 0 < Nt+1 <RR−1K and Nt+1 ≥ Nt. Thus the sequence {Nt}t∈N≥0

isbounded and increasing. By Theorem 2.1.10, the limit

N := limt→∞

Nt

exists and is nonzero. Taking t→∞ in (2.2.3) yields

1 =1

R+

1− 1R

KN =⇒ N = K.

Page 23: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

2.2. POPULATION MODELS 23

2.2.2. Discrete logistic equation. The most popular discrete-time single-species model is the discrete logistic equation

(2.2.4) Nt+1 = Nt

[1 +R

(1− Nt

K

)],

where R and K are positive constants. R is called the growth parameter and Kis called the carrying capacity.

Defining

(2.2.5) xt :=R

K(1 +R)Nt,

we then obtain

(2.2.6) xt+1 = (1 +R)xt(1− xt).

Exercise 2.2.1. Prove (2.2.6).

The long-term behavior of the discrete logistic equation is very complicated,but, we can compute its fixed points. If x is a nonzero fixed point of (2.2.6), then

x = (1 +R)x(1− x) =⇒ x =R

1 +R;

If N is the fixed point corresponding to x, then

N =K(1 +R)

Rx =

K(1 +R)

R

R

1 +R= K.

2.2.3. Ricker’s curve. The Ricker’s curve is given by

(2.2.7) Nt+1 = Nt exp

[R

(1− Nt

K

)]where R and K are positive parameters. As in the discrete logistic model, R iscalled growth parameter and K is the carrying capacity. If N is a nonzero fixedpoint then

N = N exp

[R

(1− N

R

)]=⇒ N = K.

2.2.4. Harvesting model. The harvesting model is given by

(2.2.8) Nt+1 = (1− c)Nt exp

[R

(1− (1− c)Nt

K

)]where R and K are positive constant, and c ∈ (0, 1). If N is a nonzero fixed pointthen

N =K

1− c

[1 +

1

Rln(1− c)

].

Page 24: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

24 2. SEQUENCES AND DIFFERENCE EQUATIONS

Figure 2.4. Fibonacci sequences

Figure 2.5. Fibonacci (1175–1250) and a page of Fibonacci’sLiber Abaci from the Biblioteca Nazionale di Firenze showing (inbox on right) the Fibonacci sequence with the position in the se-quence labeled in Roman numerals and the value in Hindu-Arabicnumerals.

2.2.5. Fibonacci sequences. A famous example of the 2th order recursionsis the Fibonacci sequence:

(2.2.9) Nt+1 = Nt +Nt−1, N0 = 1 and N1 = 1.

The equation comes from the following problem posed in 1202 of his Liber Abaci(Book of Calculation) by Leonardo Pisano Bigollo (also known as Leonardo of Pisaor most commonly Fibonacci):

How many pairs of rabbits are produced if each pair reproducesone pair of rabbits at age one month and another pair of rabbitsat age two months and initially there is one pair of newbornrabbits?

The Fibonacci sequence (2.2.9) has a closed-form solution

(2.2.10) Nt =ϕt − ψt

ϕ− ψ,

Page 25: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

2.2. POPULATION MODELS 25

where

(2.2.11) ϕ :=1 +√

5

2≈ 1.6180339887 · · ·

is the golden ratio or golden mean, and

(2.2.12) ψ :=1−√

5

2= 1− ϕ = − 1

ϕ≈ −0.6180339887 · · · .

Exercise 2.2.2. Using (2.2.10) to show

(2.2.13) limt→∞

NtNt+1

= ϕ.

Page 26: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...
Page 27: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 3

Limits and continuity

In this chapter we give the formal definition of limits and thencontinuities. The key description is the “ε-δ” technique.

3.1. Limits

The statement

(3.1.1) limx→c

f(x) = L

where c, L are finite, means that, for every ε > 0, there exists a number δ > 0 suchthat

|f(x)− L| < ε

whenever 0 < |x − c| < δ. In this case, we say that f(x) converges to L. If thislimit does not exist, we say that f(x) diverges as x tends to c.

Remark 3.1.1. In the above definition, we exclude the value x = c from thestatement. (This is done in the inequality 0 < |x − c|.) A reason for that is thefunction f(x) may not be defined at x = c. For example,

f(x) =

{x, x 6= 0,1, x = 0.

In this case, we have limx→0 f(x) = 0 6= f(0).

According to our definition of limits, we may consider one-sided limits:

(1) limx→c+ f(x) = L means that for every ε > 0 there exists a number δ > 0such that

|f(x)− L| < ε whenever 0 < x− c < δ.

(2) limx→c− f(x) = L means that for every ε > 0 there exists a number δ > 0such that

|f(x)− L| < ε whenever 0 < c− x < δ.

Observe that

limx→c

f(x) = L⇐⇒ limx→c+

f(x) = L and limx→c−

f(x) = L.

27

Page 28: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

28 3. LIMITS AND CONTINUITY

Figure 3.1. The ε-δ definition of limits

Example 3.1.2. Consider

f(x) = |x|, x ∈ R.

Thenlimx→0+

f(x) = 1, limx→0−

f(x0 = −1,

however, the limit limx→0 f(x) does not exist.

The statement

(3.1.2) limx→c

f(x) =∞ (or −∞)

means that, for every M > 0, there exists a δ > 0 such that

f(x) > M (or < −M)

whenever 0 < |x− c| < δ. Similarly, we can define

limx→c+

f(x) =∞, limx→c+

f(x) = −∞, limx→c−

f(x) =∞, limx→c−

f(x) = −∞.

Example 3.1.3. limx→0+1x =∞ and limx→0−

1x = −∞.

The statement

(3.1.3) limx→∞

f(x) = L

means that, for every ε > 0, there exists an x0 > 0 such that

|f(x)− L| < ε

whenever x > x0. Similarly, we can define limx→−∞ f(x) = L.

Page 29: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

3.1. LIMITS 29

3.1.1. Limit laws. As Theorem 2.1.7, we have

Theorem 3.1.4. If limx→c f(x) (c can be infinity) and limx→c g(x) exist and a isa constant, then

limx→c

[af(x)] = a limx→c

f(x),(3.1.4)

limx→c

[f(x) + g(x)] = limx→c

f(x) + limx→c

g(x),(3.1.5)

limx→c

[f(x)g(x)] = limx→c

f(x) · limx→c

g(x),(3.1.6)

limx→c

f(x)

g(x)=

limx→c f(x)

limx→c g(x), provided lim

x→cg(x) 6= 0.(3.1.7)

Example 3.1.5. Using (3.1.7) we have

limx→∞

xn

xm=

∞, n > m,1, n = m,0, n < m.

Exercise 3.1.6. Show that

(3.1.8) limx→∞

p(x)

q(x)=

∞, deg(p) > deg(q),L 6= 0, deg(p) = deg(q),

0, deg(p) < deg(q).

Here p(x) and q(x) are two polynomials of degrees deg(p) and deg(q), respectively,and L is the ratio of the coefficients of the leading terms in the numerator anddenominator.

Another useful and simple fact is

(3.1.9) limx→∞

1

ex= 0.

3.1.2. Sandwich theorem. To calculate limits, we need the following

Theorem 3.1.7. If f(x) ≤ g(x) ≤ h(x) for all x in an open interval that containsc (except possibly at c) and

limx→c

f(x) = limx→c

h(x) = L,

thenlimx→c

g(x) = L.

Proof. Given an ε > 0. By the definition, we can find a positive number δ(depending on ε) such that

|f(x)− L| < ε, |h(x)− L| < ε

Page 30: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

30 3. LIMITS AND CONTINUITY

Figure 3.2. Sandwich theorem

Figure 3.3. sin xx and the inequality cosx ≤ sin x

x ≤ 1

whenever 0 < |x− c| < δ. Hence

g(x)− L ≤ h(x)− L < ε, g(x)− L > f(x)− L > −ε;thus |g(x)− L| < ε. Consequently, limx→c g(x) = L. �

Remark 3.1.8. If f(x) ≤ g(x) ≤ h(x) for all x > x0, where x0 is a positive fixednumber, and

limx→∞

f(x) = limx→∞

h(x) = L,

thenlimx→∞

g(x) = L.

Looking at the Figure 3.3, we have

area of the triangle OAP ≤ area of the sector OBP ≤ area of the triangle OBC;

therefore 12 sinx ≤ 1

2x ≤12

sin xcos x . Thus

(3.1.10) cosx ≤ sinx

x≤ 1, 0 < x <

π

2.

Theorem 3.1.9. We have

(3.1.11) limx→0

sinx

x= 1.

Page 31: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

3.2. CONTINUITY 31

Since 1− cosx = 2 sin2 x, it follows that

1− cosx

x=

2 sin2 x2

x=

sin x2

x2

· sin x2.

The first factor tends to 1 while the second factor tends to 0. So the limit of(1− cosx)/x should be 0. In general,

Proposition 3.1.10. If f(x) is bounded (i.e., |f(x)| ≤ M for some positive con-stant M) and limx→c g(x) = 0, then

limx→c

f(x)g(x) = 0.

Proof. Given ε > 0. There exists a positive number δ such that

|g(x)| < ε

M

whenever 0 < |x− c| < δ. Hence

|f(x)g(x)| ≤M |g(x)| < M · εM

= ε

whenever 0 < |x− c| < δ. Thus limx→c f(x)g(x) = 0. �

Exercise 3.1.11. Prove

limx→0

sinx(1− cosx)

x2= 0, lim

x→0

sin(πx)

x= π.

3.2. Continuity

A function f is said to be continuous at x = c if

(3.2.1) limx→c

f(x) = f(c).

To check whether a function is continuous at x = c, we need to check the followingthree conditions:

(1) f(x) is defined at x = c,(2) limx→c f(x) exists,(3) limx→c f(x) = f(c).

If any of these three conditions fails, the function is discontinuous at x = c.

Example 3.2.1. The function defined in Remark 3.1.1 is discontinuous.

A function f is said to be continuous from the right at x = c if

(3.2.2) limx→c+

f(x) = f(c)

and continuous from the left at x = c if

(3.2.3) limx→c−

f(x) = f(c).

Page 32: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

32 3. LIMITS AND CONTINUITY

Example 3.2.2. Consider the function

f(x) =

1, x > 0,0, x = 0,−1, x < 0.

Then limx→0+ f(x) = 1 and limx→0− f(x) = −1.

3.2.1. Properties of continuous functions. Using the limit law, Theorem3.1.4, we can prove

Theorem 3.2.3. Suppose that a is a constant and the functions f and g are con-tinuous at x = c. Then the following functions are continuous at x = c:

(1) a · f ,(2) f + g,(3) f · g,(4) f/g provided that g(c) 6= 0.

The following functions are continuous wherever they are defined:

(1) polynomial functions(2) rational functions(3) power functions(4) trigonometric functions(5) exponential functions of the form ax, a > 0 and a 6= 1(6) logarithmic functions of the form loga x, a > 0 and a 6= 1

Theorem 3.2.4. If g(x) is continuous at x = c with g(c) = L and f(x) is contin-uous at x = L, then (f ◦ g)(x) is continuous at x = c. In particular

(3.2.4) limx→c

(f ◦ g)(x) = limx→c

f [g(x)] = f[

limx→c

g(x)]

= f [g(c)] = (f ◦ g)(c).

Proof. Note that (f ◦ g)(c) = f [g(c)] exists. Given an ε > 0. There exists apositive number δ such that

|f(y)− f(L)| < ε

whenever |y−L| < δ. For such δ, we can find another positive number δ′ such that

|g(x)− g(c)| < δ

whenever |x− c| < δ′. In particular,

|(f ◦ g)(x)− (f ◦ g)(c)| < ε

whenever |x− c| < δ′. Thus limx→c(f ◦ g)(x) = (f ◦ g)(c). �

Page 33: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

3.2. CONTINUITY 33

3.2.2. Cauchy’s functional equations. Cauchy’s functional equationis given by

(3.2.5) f(x+ y) = f(x) + f(y), x, y ∈ R.

Observe that f(x) = cx satisfies this functional equation (3.2.5). Conversely, anycontinuous function f(x) satisfying (3.2.5) is of the form f(x) = cx for some con-stant c.

Suppose f(x) is a function (not necessarily continuous) satisfying (3.2.5).

(1) Letting x = y = 0, we have f(0) = 0.(2) Letting y = −x we have f(−x) = −f(x) for all x ∈ R.(3) For any integer n we have f(n) = f(1)n.(4) For any nonzero integer n we have f(1/n) = f(1)/n.(5) If p/q ∈ Q then f(p/q) = pf(1/q) = f(1) · pq .

Hence f(x) = f(1)x for any x ∈ Q.Now we in addition assume f is continuous. Recall that any irrational number

is the limit of a sequence of rational numbers. For example, for√

2 = 1.414 · · · ,

we can take a0 = 1, a1 = 1.4, a2 = 1.41, · · · and then limn→∞ an =√

2. If x ∈ R\Q,then x = limn→∞ xn for a sequence of rational numbers xn. Since f is continuous,we have

f(x) = f(

limn→∞

xn

)= limn→∞

f(xn) = limn→∞

f(1)xn = f(1)x;

thus f(x) = f(1)x still holds for x ∈ R \ Q. Consequently, f(x) = cx wherec := f(1).

Proposition 3.2.5. A continuous function f satisfying (3.2.5) must be of the formf(x) = f(1)x.

Exercise 3.2.6. Any continuous function f satisfying

(3.2.6) f(x+ y) = f(x)f(y), x, y ∈ R,

f(0) 6= 0 and f(1) > 0, must be of the form f(x) = ax where a = f(1).

3.2.3. Intermediate-value theorem. An important property of continuousfunctions is the intermediate-value theorem. (see Figure 3.4)

Theorem 3.2.7. Suppose that f is continuous on the closed interval [a, b]. If Mis any real number with f(a) < M < f(b) or f(b) < M < f(a), then there exists atleast one number c on the open interval (a, b) such that f(c) = M .

Page 34: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

34 3. LIMITS AND CONTINUITY

Figure 3.4. Intermediate-value theorem

Remark 3.2.8. Consider the function f(x) = x. Then for each M ∈ (a, b), wehave a unique M ∈ (a, b) with f(M) = M . Hence we can not weaken the openinterval (a, b) in Theorem 3.2.7 to the closed interval [a, b].

Remark 3.2.9. Suppose that f is continuous function defined on [a, b]. If f(a) <0 < f(b), then Theorem 3.2.7 shows that f(x) = 0 has at least one solution in (a, b).

Page 35: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 4

Differentiation

In this chapter, we introduce derivatives and chain rule.

4.1. Derivatives

The derivative of a function f at x, denoted f ′(x), is

(4.1.1) f ′(x) := limh→0

f(x+ h)− f(x)

h

provided that the limit exists. If the limit exists, then we say that f is differen-tiable at x. (see Figure 4.1) The quotient

f(x+ h)− f(x)

h

is called the difference quotient, and we denote it by ∆f∆x . We use the Leibniz

notation

(4.1.2) y′ =dy

dx= f ′(x) =

df

dx=

d

dxf(x).

For particular value c, w can write

(4.1.3)df

dx

∣∣∣∣x=c

= f ′(c).

4.1.1. Geometric interpretation. If the derivative of a function f exists atx = c, then the tangent line at x = c is the line going through the point (c, f(c))with slope f ′(c). The equation of the tangent line is given by

(4.1.4) y − f(c) = f ′(c)(x− c).

Figure 4.1. Derivative and tangent line

35

Page 36: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

36 4. DIFFERENTIATION

Remark 4.1.1. If the derivative of a function f exists at x = c, then

f ′(c) = limh→0

f(c+ h)− f(c)

h.

In particular,

limh→0

f(c+ h)− f(c− h)

2h=

1

2limh→0

[f(c+ h)− f(c)

h+f(c− h)− f(c)

−h

]= f ′(c).

However, the converse is not true. Consider

f(x) = |x|, c = 0.

Then

f ′(x) =

{1, x > 0,−1, x < 0.

Hence the derivative of f(x) does not exist. But

f(c+ h)− f(c− h)

2h= 0.

4.1.2. Differentiability and continuity. A continuous function may not bedifferentiable, see f(x) = |x|. Conversely, we have

Theorem 4.1.2. If f is differentiable at x = c, then f is also continuous at x = c.

Proof. From

f(x)− f(c) =f(x)− f(c)

x− c· (x− c),

we have

limx→c

[f(x)− f(c)] = limx→c

f(x)− f(c)

x− c· (x− c) = f ′(c) · 0 = 0

by Proposition 3.1.10. �

4.2. Basic rules and chain rule

If f(x) is the constant function f(x) ≡ a, then

d

dxf(x) = 0.

4.2.1. Power rule. In general, we have

(4.2.1)d

dx(xn) = nxn−1.

Page 37: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

4.2. BASIC RULES AND CHAIN RULE 37

Theorem 4.2.1. Suppose a is a constant and f(x) and g(x) are differentiable atx. Then

d

dx[af(x)] = a

d

dxf(x),(4.2.2)

d

dx[f(x) + g(x)] =

d

dxf(x) +

d

dxg(x).(4.2.3)

4.2.2. Product and quotient rules. From

d

dxx5 = 5x4 6= 6x3 =

(d

dxx3

)(d

dxx2

),

we see that (f(x)g(x))′ 6= f ′(x) · g′(x).

Theorem 4.2.2. If f(x) and g(x) are differentiable at x, then

(4.2.4)d

dx[f(x)g(x)] = f ′(x)g(x) + f(x)g′(x).

Theorem 4.2.3. If f(x) and g(x) are differentiable at x, and g(x) 6= 0, then

(4.2.5)d

dx

[f(x)

g(x)

]=f ′(x)g(x)− f(x)g′(x)

[g(x)]2.

By Theorem 4.2.3, we have

(4.2.6)d

dx(x−n) = −nx−n−1.

In general,

(4.2.7)d

dx(xr) = rxr−1.

4.2.3. Chain rule. To find the derivative of composite functions, we need thechain rule.

Theorem 4.2.4. (Chain rule) If g is differentiable at x and f is differentiable aty = g(x), then the composite function (f ◦ g)(x) = f [g(x)] is differentiable at x,and

(4.2.8) (f ◦ g)′(x) = f ′[g(x)]g′(x).

Page 38: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

38 4. DIFFERENTIATION

Example 4.2.5. We have

d

dxsinx = cosx,

d

dxcosx = − sinx,(4.2.9)

d

dxtanx = sec2 x,

d

dxcotx = − csc2 x,(4.2.10)

d

dxsecx = secx · tanx,

d

dxcscx = − cscx · cotx,(4.2.11)

d

dxex = ex,(4.2.12)

d

dxax = ax · ln a,(4.2.13)

d

dxlnx =

1

x,(4.2.14)

d

dxloga x =

1

(ln a)x.(4.2.15)

Theorem 4.2.6. (Derivative of the inverse function) If f(x) is one-to-one anddifferentiable with inverse function f−1(x) and f ′[f−1(x)] 6= 0, then

(4.2.16)d

dxf−1(x) =

1

f ′[f−1(x)].

For example,

d

dxarcsinx =

d

dxsin−1 x =

1√1− x2

,(4.2.17)

d

dxarctanx =

d

dxtan−1 x =

1

1 + x2.(4.2.18)

4.2.4. Linear approximation and error propagation. Assume that y =f(x) is differentiable at x = a; then

(4.2.19) L(x) := f(a) + f ′(a)(x− a)

is the tangent line approximation or the linearization of f at x = a. If |x− a|is sufficiently small, we have

(4.2.20) f(x) ≈ L(x) = f(a) + f ′(a)(x− a).

Page 39: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 5

Applications of differentiation

In this chapter, we discuss the behavior of functions by usingdifferentiations.

5.1. Extrema and the mean-value theorem

This section defines a extrema, gives conditions that guarantee extrema (viathe extreme-value theorem), and provides a characterization of extrema (Fermat’stheorem).

5.1.1. Extreme-value theorem. Let f be a function defined on the set Dthat contains the number c. Then f has a global (or absolute) maximum atx = c if

f(c) ≥ f(x)

for all x ∈ D, and f has a global (or absolute) minimum at x = c if

f(c) ≤ f(x)

for all x ∈ D. (see Figure 5.1)

Theorem 5.1.1. (Extreme-value theorem) If f is continuous on a closed interval[a, b], −∞ < a < b < ∞, then f has a global maximum and a global minimum in[a, b].

The proof of Theorem 5.1.1 is beyond the scope of this course and will beomitted.

Figure 5.1. Absolute maximum and minimim

39

Page 40: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

40 5. APPLICATIONS OF DIFFERENTIATION

Figure 5.2. Relative maximum and minimim

Remark 5.1.2. (1) Theorem 5.1.1 only tells the existence of global (or absolute)extrema (global maximum or global minimum). We can find functions that havemore than one global extrema; for example,

f(x) =

{1, 0 ≤ x ≤ 1,

2− x, 1 ≤ x ≤ 2.

(2) If f is continuous on an open interval (a, b), then f may not have a globalextrema. For example, f(x) = 1/x with x ∈ (0, 1).

5.1.2. Local extrema. A function f defined on a set D has a local (or rel-ative) maximum at a point c if there exists a δ > 0 such that

f(c) ≥ f(x)

for all x ∈ (c − δ, c + δ) ∩ D. A function f defined on a set D has a local (orrelative) minimum at a point c if there exists a δ > 0 such that

f(c) ≤ f(x)

for all x ∈ (c− δ, c+ δ)∩D. Local maxima and local minima are collectively calledlocal (or relative) extrema.

Theorem 5.1.3. (Fermat’s theorem) If f has a local extremum at an interiorpoint c and f ′(c) exists, then f ′(c) = 0.

Proof. We only prove the case that f has a local minimum at c. Then thereexists a δ > 0 such that

f(c) ≤ f(x)

for all x ∈ (c− δ, c+ δ) ∩D. For x ∈ (c, c+ δ) ∩D, we have

f(c)− f(x)

x− c≤ 0 or

f(x)− f(c)

x− c≥ 0;

thus

limx→c+

f(x)− f(c)

x− c≥ 0.

Similarly, we can show that

limx→c−

f(x)− f(c)

x− c≤ 0.

Page 41: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

5.1. EXTREMA AND THE MEAN-VALUE THEOREM 41

Figure 5.3. Rolle’s theorem

Since f ′(c) exists, we must have f ′(c) = 0. �

However, the converse of Theorem 5.1.3 is not true. For example, consider theefunction f(x) = x, x ∈ [−1, 1]; we see that f ′(0) = 0 but f has no local extremumsin (−1, 1).

5.1.3. Mean-value theorem. For the function f(x) = x2, x ∈ [−1, 1], weeasily see that f ′(0) = 0. This result also holds for general differentiable functions.

Theorem 5.1.4. (Rolle’s theorem) If f is continuous on the closed interval [a, b]and differentiable on the open interval (a, b), and if f(a) = f(b), then there existsa number c ∈ (a, b) such that f ′(c) = 0.

Proof. If f is a constant function, then the assertion is obvious. Now wesuppose that f is nonconstant. Since f is continuous on the closed interval [a, b],according to Theorem 5.1.1, f has a global maximum and a global minimum in[a, b]. For example, we assume that f has a global maximum at x0 ∈ [a, b]. Ifx0 = a, then

f(a) = f(x0) ≥ f(a) =⇒ f(x0) = f(a) = f(b).

Hence f has a global maximum at a and b. By Theorem 5.1.1 again, f has a globalminimum at c ∈ [a, b]. Since f is nonconstant, we must have c ∈ (a, b). By Theorem5.1.3, we get f ′(c) = 0. �

Theorem 5.1.5. (Mean-value theorem (MVT)) If f is continnuous on the closedinterval [a, b] and differentiable on the open interval (a, b), then there exists at leastone number c ∈ (a, b) such that

f(b)− f(a)

b− a= f ′(c).

Page 42: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

42 5. APPLICATIONS OF DIFFERENTIATION

Figure 5.4. Mean-value theorem

Proof. Define

F (x) := f(x)− f(b)− f(a)

b− a(x− a), x ∈ [a, b].

Then F is continuous on [a, b] and differentiable on (a, b); furthermore F (a) =f(a) = F (b). By Theorem 5.1.4, F ′(c) = 0 for some c ∈ (a, b). Since

F ′(x) = f ′(x)− f(b)− f(a)

b− a,

it follows that 0 = F ′(c) = f ′(c)− f(b)−f(a)b−a . �

Corollary 5.1.6. If f is continuous on the closed interval [a, b] and differentiableon the open interval (a, b) such that

m ≤ f ′(x) ≤Mfor all x ∈ (a, b), then

m(b− a) ≤ f(b)− f(a) ≤M(b− a).

Exercise 5.1.7. Prove Corollary 5.1.6.

If f is a constant, then f ′(x) = 0 for all x ∈ R. Conversely we have

Corollary 5.1.8. If f is continuous on the closed interval [a, b] and differentiableon the open interval (a, b), with f ′(x) = 0 for all x ∈ (a, b), then f is constant on[a, b].

Exercise 5.1.9. Prove Corollary 5.1.8.

Page 43: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

5.2. MONOTONICITY, CONCAVITY, AND INFLECTION POINTS 43

Exercise 5.1.10. If f is continuous on the closed interval [a, b] and differentiableon the open interval (a, b), then there exists a number c ∈ (a, b) such that

f ′(c) = 0 or f(c) =f(a) + f(b)

2.

(Hint: Consider the function F (x) = [f(x)− f(a)][f(x)− f(b)].)

5.2. Monotonicity, concavity, and inflection points

This section discusses the important concepts of monotonicity– whether a func-tion is decreasing or increasing–and concavity–whether a function bends upwardsor downward.

5.2.1. Monotonicity. A function f defined on an interval I is called (strictly)increasing on I if

f(x1) < f(x2)

whenever x1 < x2 in I, and is called (strictly) decreasing on I if

f(x1) > f(x2)

whenever x1 < x2 in I. An increasing or decreasing function is called monotonic.

Remark 5.2.1. The monotonicity of a function f defined on the interval I. Forexample, consider the function f(x) = |x|, x ∈ [−1, 1]. Then f is increasing on[0, 1] while is decreasing on [−1, 0].

Proposition 5.2.2. (First-derivative test for monotonicity) Suppose f is continu-ous on [a, b] and differentiable on (a, b).

(a) If f ′(x) > 0 for all x ∈ (a, b), then f is increasing on [a, b].(b) If f ′(x) < 0 for all x ∈ (a, b), then f is decreasing on [a, b].

Proof. We only prove part (a). Fixed x1 < x2 in (a, b). By Theorem 5.1.5,we have

f(x2)− f(x1)

x2 − x1= f ′(c)

for some c ∈ (x1, x2). Since f ′(x) > 0 for all x ∈ (a, b), we get f(x2) > f(x1). �

5.2.2. Concavity. A differentiable function f(x) is concave up on an inter-val I if the first derivative f ′(x) is an increasing function on I. f(x) is concavedown on an interval I if the first derivative f ′(x) os a decreasing function on I.

Theorem 5.2.3. (Second-derivative test for concavity) Suppose f is rwice differ-entiable on an open interval I.

(a) If f ′′(x) > 0 for all x ∈ I, then f is concave up on I.

Page 44: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

44 5. APPLICATIONS OF DIFFERENTIATION

Figure 5.5. Inflection points

(b) If f ′′(x) < 0 for all x ∈ I, then f is concave down on I.

Exercise 5.2.4. Prove Theorem 5.2.3.

5.2.3. Extrema. A continuous function has a local minimum at c if the func-tion is decreasing to the left of c and increasing to the right of c. A continuousfunction has a local maximum at c if the function is increasing to the left of c anddecreasing to the right of c.

Theorem 5.2.5. (Second-derivative test for local extrema) Suppose f is twicedifferentiable on an open interval containing c.

(a) If f ′(c) = 0 and f ′′(c) < 0, then f has a local maximum at x = c.(b) If f ′(c) = 0 and f ′′(c) > 0, then f has a local minimum at x = c.

5.2.4. Inflection points. Inflection points are points where the concav-ity of a function changes–that is, where the function changes from concave up toconcave down or from concave down to concave up.

Example 5.2.6. 0 is the only one inflection point of f(x) = x3, x ∈ R.

If f(x) is twice differentiable and has an inflection point at x = c, then f ′′(c) =0. (see Figure 5.5)

5.2.5. Asymptotes. A line y = b is a horizontal asymptote if either

limx→−∞

f(x) = b or limx→∞

f(x) = b.

Page 45: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

5.3. L’HOSPITAL’S RULE 45

Figure 5.6. Guillaume Francois Antoine, Marquis de l’Hopital(1661–1704)

A line x = c is a vertical asymptote if

limx→c+

f(x) = +∞ or limx→c+

f(x) = −∞

or

limx→c−

f(x) = +∞ or limx→c−

f(x) = −∞.

5.3. L’Hospital’s rule

The rule is named after 17th-century French mathematician Guillaume del’Hopital, who published the rule in his book Analyse des Infiniment Petits pourl’Intelligence des Lignes Courbes (literal translation: Analysis of the Infinitely Smallfor the Understanding of Curved Lines) (1696), the first textbook on differentialcalculus. However, it is believed that the rule was discovered by the Swiss mathe-matician Johann Bernoulli.

Theorem 5.3.1. (L’Hoospital’s rule) Suppose that f and g are differentiable func-tions and that

limx→a

f(x) = limx→a

g(x) = 0

orlimx→a

f(x) = limx→a

g(x) =∞.If

limx→a

f ′(x)

g′(x)= L

then

limx→a

f(x)

g(x)= L.

Page 46: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

46 5. APPLICATIONS OF DIFFERENTIATION

Proof. We treat with the first case. Define

f(a) := limx→a

f(x), g(a) := limx→a

g(x).

Then f(x) and g(x) are continuous at a. Fixed x > a. From Theorem 5.1.5, thereexist x1, x2 ∈ (a, x) such that

f(x)− f(a)

x− a= f ′(x1),

g(x)− g(a)

x− a= g′(x2).

Observe that x1, x2 → a+ as x→ a+. Hence

limx→a+

f(x)

g(x)= limx→a+

f ′(x1)(x− a)

g′(x2)(x− a)= limx→a+

f ′(x1)

g′(x2)= L.

Similarly, we can show limx→a− f(x)/g(x) = L. �

Example 5.3.2. (1)(∞/∞) Evaluate

limx→∞

lnx

x.

(2) (0 · ∞) Evaluatelimx→0+

x lnx.

(3) (0/0) Evaluate

limx→0

sinx

x.

(4) (∞−∞) Evaluate

limx→∞

(x−√x2 + x).

(5) (00) Evaluatelimx→0+

xx.

Proof. For (1),

limx→∞

lnx

x= limx→∞

1/x

1= 0.

For (2), where y = 1/x,

limx→0+

x lnx = limy→∞

− ln y

y= 0.

For (3),

limx→0

sinx

x= limx→0

cosx

1= 1.

For (4),

limx→∞

(x−√x2 + x) = lim

x→∞

−xx+√x2 + x

= limx→∞

−1

1 +√

1 + 1x

= −1

2.

For (5),limx→0+

xx = limx→0+

ex ln x = limx→0+

e0 = 1

by (2). �

Page 47: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

5.4. ANTIDERIVATIVE 47

Figure 5.7. Antiderivatives

5.4. Antiderivative

A function F is called an antiderivative of f on an interval I if F ′(x) = f(x)for all x ∈ I. (see Figure 5.7)

Corollary 5.4.1. If F (x) and G(x) are antiderivatives of the continuous functionf(x) on an interval I, then there exists a constant C such that

G(x) = F (x) + C

for all x ∈ I.

Proof. By definition, we have (G − F )′(x) = f(x) − f(x) = 0 for all x ∈ I.According to Corollary 5.1.8, G(x)− F (x) =constant. �

Page 48: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...
Page 49: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 6

Integrations

In this chapter, we give the definition on integrals and introducethe fundamental theorem of calculus.

6.1. Definite integrals

Let f be a function on the interval [a, b]. We partition [a, b] into n subintervalby choosing n− 1 numbers x1, · · · , xn−1 in (a, b) such that

a = x0 < x1 < x2 < · · · < xn−1 < xn = b.

The n subintervals

[x0, x1], [x1, x2], · · · , [xn−1, xn]

form a partition of [a, b], which we denote by P = [x0, x1, x2, · · · , xn]. The par-tition P depends on the number of subintervals n and on the choice of pointsx0, x1, · · · , xn. The length of the kth subinterval [xk−1, xk] is denoted by ∆xk.The length of the longest subinterval is called the norm of P and is denoted by||P||; thus

||P|| = max{∆x1,∆x2, · · · ,∆xn}.In each subinterval [xk−1, xk]. we choose a point ck and construct a rectangle withbase ∆xk and height |f(ck)|. (see Figure 6.1) The sum of these products is denotedby SP ; that is,

(6.1.1) SP :=

n∑k=1

f(ck)∆xk.

The value of the sum depends on the choice of the partition P and the choice ofthe points ck ∈ [xk−1, xk] and is called a Riemann sum for f on [a, b].

Figure 6.1. Riemann sum

49

Page 50: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

50 6. INTEGRATIONS

6.1.1. Riemann integrals. Let f be a function on [a, b].

Definition 6.1.1. Let P = [x0, x1, x2, · · · , xn], n = 1, 2, · · · , be a sequence ofpartition of [a, b] with ||P|| → 0. Set ∆xk = xk − xk−1 and ck ∈ [xk−1, xk]. Thedefinite integral of f from a to b is

(6.1.2)

∫ b

a

f(x) dx := lim||P||→0

n∑k=1

f(ck)∆xk

if the limit exists, in which case f is said to be (Riemann) integrable on theinterval [a, b]. Moreover, f(x) is called the integrand.

The phase “if the limit exists” means, in particular, that the value of lim||P||→0 SPdoes nor depend on how we choose the partitions and the points ck ∈ [xk−1, xk] aswe rake the limit.

Theorem 6.1.2. All continuous functions are Riemann integrals; that is, if f(x)is continuous on [a, b] then ∫ b

a

f(x) dx

exists.

Remark 6.1.3. (1) We can find a function that is Riemann integral but not con-tinuous. For example,

f(x) =

{|x|, x ∈ [−1, 0) ∪ (0, 1],1, x = 0.

(2) Consider the function

f(x) =

{x, x ∈ Q ∩ [0, 1],0, x ∈ (R/Q) ∩ [0, 1].

It can be showed that the function f(x) is not Riemann integrable.(3) Another important concept is Lebesgue integrals, which can be think of

the Riemann integral in terms of the partition of y-axis. A Lebesgue integrablefunction is Riemann integrable, but the converse is not true. For example, theLebesgue integral of f(x) defined in (2) equals 0.

6.1.2. Properties of the Riemann integrals. In this subsection, we collectimportant properties that will help us to evaluate definite integrals.

Proposition 6.1.4. If f is integrable over [a, b], then

(6.1.3)

∫ a

a

f(x) dx = 0,

∫ a

b

f(x) dx = −∫ b

a

f(x) dx.

Page 51: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

6.2. THE FUNDAMENTAL THEOREM OF CALCULUS 51

Figure 6.2. Riemann integrals and Lebesgue integrals

Proposition 6.1.5. Assume that f and g are integrable over [a, b].∫ b

a

kf(x) dx = k

∫ b

a

f(x) dx, k is constant,(6.1.4) ∫ b

a

[f(x) + g(x)] dx =

∫ b

a

f(x) dx+

∫ b

a

g(x) dx,(6.1.5) ∫ b

a

f(x) dx =

∫ c

a

f(x) dx+

∫ b

c

f(x) dx,(6.1.6)

where c is any interior point of [a, b]. Moreover

(i) If f(x) ≥ 0 on [a, b], then

(6.1.7)

∫ b

a

f(x) dx ≥ 0.

(ii) If f(x) ≤ g(x) on [a, b], then

(6.1.8)

∫ b

a

f(x) dx ≤∫ b

a

g(x) dx.

(iii) If m ≤ f(x) ≤M on [a, b], then

(6.1.9) m(b− a) ≤∫ b

a

f(x) dx ≤M(b− a).

6.2. The fundamental theorem of calculus

Let f(x) be a continuous function on [a, b] and let

F (x) :=

∫ x

a

f(u) du.

Then

F ′(x) = limh→0

F (x+ h)− F (x)

h= lim

h→0

1

h

[∫ x+h

a

f(u) du−∫ x

a

f(u) du

]

= limh→0

1

h

∫ x+h

x

f(u) du.

Page 52: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

52 6. INTEGRATIONS

6.2.1. The fundamental theorem of calculus I. The fundamental theoremfor calculus tells that F ′(x) = f(x).

Theorem 6.2.1. (The fundamental theorem of calculus I) If f is continuous on[a, b], then the function F defined by

(6.2.1) F (x) =

∫ x

a

f(u) du, a ≤ x ≤ b

is continuous on [a, b] and differentiable on (a, b) with

(6.2.2) F ′(x) = f(x).

Proof. Since f is continuous on [a, b], by Theorem 5.1.1, m ≤ f(x) ≤ M on[a, b] for some constants m and M . Consequently, by (6.1.9),

m ≤ 1

h

∫ x+h

x

f(u) du ≤M.

Define

I :=1

h

∫ x+h

x

f(u) du, h ∈ [0, b− a].

Then m ≤ I ≤M . By Theorem 3.2.7, we have

f(ch) = I =1

h

∫ x+h

h

f(u) du

for some ch ∈ [x, x+ h]. Hence

f(x) = f

(limh→0

ch

)= limh→0

f(ch) = limh→0

1

h

∫ x+h

x

f(u) du.

Thus F ′(x) = limh→0 I = f(x). �

Proposition 6.2.2. If g(x) and h(x) are differentiable functions and f(u) is con-tinuous for u between g(x) and h(x), then

(6.2.3)d

dx

∫ h(x)

g(x)

f(u) du = f [h(x)]h′(x)− f [g(x)]g′(x).

Proof. By Propositions 6.1.4 and 6.1.5, it suffices to prove

d

dx

∫ h(x)

f(u) du = f [h(x)]h′(x).

Introduce a new variable

v := h(x).

Thend

dx

∫ h(x)

0

f(u) du =d

dv

∫ v

0

f(u) du · dvdx

= h′(x)f [h(x)]

by Theorem 6.2.1. �

Page 53: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

6.2. THE FUNDAMENTAL THEOREM OF CALCULUS 53

6.2.2. Antiderivatives and indefinite integrals. Let f be a continuousfunction on an interval I and choose two fixed numbers a, b ∈ I. Consider

F (x) :=

∫ x

a

f(u) du, G(x) :=

∫ x

b

f(u) du.

Then F ′(x) = f(x) = G′(x) by Theorem 6.2.1. According to Corollary 5.4, we have

F (x) = G(x) + C

for some constant C; in particular,

C = F (x)−G(x) =

∫ x

a

f(u) du−∫ x

b

f(u) du =

∫ b

a

f(u) du.

The above discussion tells us that any antiderivative can be obtained from aspecial one by adding a constant. We denote by∫

f(x) dx

any antiderivative of f , called an indefinite integral. Note that∫f(x) dx = C +

∫ x

a

f(u) du

for some constant C.For example ∫

x3 dx =1

4x4 + C.

A collection of indefinite integrals:∫xa dx =

xa+1

a+ 1+ C, a 6= −1,(6.2.4) ∫

1

xdx = ln |x|+ C,(6.2.5) ∫

ex dx = ex + C,

∫ax dx =

ax

ln a+ C,(6.2.6) ∫

cosx dx = sinx+ C,

∫sinx dx = − cosx+ C,(6.2.7) ∫

sec2 x dx = tanx+ C,

∫csc2 x dx = − cotx+ C,(6.2.8)∫

secx tanx dx = tanx+ C,

∫cscx cotx dx = − cscx+ C,(6.2.9) ∫

tanx dx = ln | secx|+ C,

∫cotx dx = − ln | cscx|+ C,(6.2.10) ∫

1

1 + x2dx = tan−1 x+ C,

∫1√

1− x2dx = sin−1 x+ C.(6.2.11)

Page 54: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

54 6. INTEGRATIONS

Figure 6.3. Area

6.2.3. The fundamental theorem of claculus II. Let f be a continuouson [a, b] and set

G(x) =

∫ x

a

f(u) du, x ∈ [a, b].

Then G′(x) = f(x) and G(x) is an antiderivative of f(x). If F (x) is any antideriv-ative of f(x), then

G(x) = F (x) + C, x ∈ [a, b],

by Theorem 6.2.1. In particular,∫ b

a

f(u) du = G(b) = F (b) + C = F (b) + [G(a)− F (a)] = F (b)− F (a).

Theorem 6.2.3. (The fundamental theorem of calculus II) If f is continuous on[a, b], then

(6.2.12)

∫ b

a

f(x) dx = F (b)− F (a),

where F (x) is an antiderivative of f(x).

6.3. Applications of integration

If f is a nonnegative, continuous function on [a, b], then

(6.3.1) A :=

∫ b

a

f(x) dx

represents the area of the region bounded by the graph of f(x) between a and b,the vertical lines x = a and x = b, and the x-axis between a and b. (see Figure 6.3)

6.3.1. Areas. From Figure 6.4, we have

Page 55: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

6.3. APPLICATIONS OF INTEGRATION 55

Figure 6.4. Area of curves

If f and g are continuous on [a, b], with f(x) ≥ g(x) for all x ∈ [a, b], then thearea of the region between the curves y = f(x) and y = g(x) from a to b is equal to

(6.3.2) Area =

∫ b

a

[f(x)− g(x)] dx.

Suppose that a region is bounded by x = f(y) and x = g(y), with g(y) ≤ f(y)for x ≤ y ≤ d; that is, f(y) is to the right of g(y) for all y ∈ [c, d]. Then the areaof the shaded region is given by

(6.3.3) Area =

∫ d

c

[f(y)− g(y)] dy.

6.3.2. Average values. If f(x) is a continuous function on [a, b]. The aver-age value of f on [a, b] is

(6.3.4) favg :=1

b− a

∫ b

a

f(x) dx.

Theorem 6.3.1. (Mean-value theorem for definite integrals) If f(x) is a continu-ous function on [a, b], then

(6.3.5) f(c) = favg

for some number c ∈ (a, b).

Proof. Since f is continuous on [a, b], by Theorem 5.1.1, m ≤ f(x) ≤ M on[a, b] for some constants m and M . Consequently, by (6.1.9),

m ≤ 1

b− a

∫ b

a

f(x) dx ≤M.

By theorem 3.2.7, the number c ∈ (a, b) is obtained. �

Page 56: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

56 6. INTEGRATIONS

Figure 6.5. The length of a curve

6.3.3. Rectification of curves. Let y = f(x), a ≤ x ≤ b, be a differentiablefunction whose derivative is continuous on [a, b]. (see Figure 6.5) We partition theinterval [a, b] into subintervals by using the partition P = [x0, x1, x2, · · · , xn], wherea = x0 < x1 < x2 < · · · < xn = b, and approximate the curve by a polygon thatconsists of the straight-line segments connecting neighboring points on the curve.Set

∆xk := xk − xk−1, ∆yk := yk − yk−1.

Then the length of the line segment is given by√(∆xk)2 + (∆yk)2.

Using the partition P, we fins that the length of the polygon is

LP =

n∑i=1

√(∆xk)2 + (∆yk)2.

By Theorem 5.1.5,

f ′(ck) =f(xk)− f(xk−1)

xk − xk−1=

∆yk∆xk

for some number ck ∈ (xk−1, xk). Consequently,

LP =

n∑i=1

√1 + [f ′(ck)]2∆xk

and the length of the curve y = f(x) is

L := lim||P||→0

LP =

∫ b

a

√1 + [f ′(x)]2 dx.

If f(x) is differentiable on (a, b) and f ′(x) is continuous on [a, b], then the lengthof the curve y = f(x) from a to b is given by

(6.3.6) L =

∫ b

a

√1 + [f ′(x)]2 dx.

Page 57: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

6.3. APPLICATIONS OF INTEGRATION 57

Since

dy

dx= f ′(x),

it follows from (6.3.6) that

(6.3.7) L =

∫ b

a

√1 +

(dy

dx

)2

dx =

∫ b

a

√(dx)2 + (dy)2.

We call the expression√

(dx)2 + (dy)2 the arc length differential and denote itby ds.

6.3.4. Integral inequalities. For any real numbers a1, · · · , an and b1, · · · , bn,a basic inequality is

(6.3.8)

(n∑i=1

aibi

)2

(n∑i=1

a2i

)(n∑i=1

b2i

)

called the Cauchy-Schwarz inequality.

Exercise 6.3.2. Verify (6.3.8) for n = 2.

Another basic inequality is the arithmetic-geometric inequality

(6.3.9)1

1a + 1

b

≤√ab ≤ a+ b

2≤√a2 + b2

2, a, b > 0.

Exercise 6.3.3. Use (6.3.9) to prove

(6.3.10) ab ≤ |ab| ≤ εa2 +1

4εb2

for any a, b ≥ 0 and ε > 0.

An integral version of (6.3.8) is the following

Theorem 6.3.4. (Holder’s inequality) Suppose that p and q are two real numbers,1 ≤ p, q ≤ ∞ with 1

p + 1q = 1, and f and g are two Riemann integrable functions

on [a, b]. Then the functions |f(x)|p and |g(x)|q are also Riemann integrable and

(6.3.11)

∣∣∣∣∣∫ b

a

f(x)g(x) dx

∣∣∣∣∣ ≤(∫ b

a

|f(x)|p dx

)1/p(∫ b

a

|g(x)|q dx

)1/q

.

An integral version of (6.3.9) is the following

Page 58: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

58 6. INTEGRATIONS

Figure 6.6. Young’s inequality

Theorem 6.3.5. (Minkowski inequality) Suppose that p ≥ 1 is a real numberand f(x), g(x) are Riemann integrable functions on [a, b]. Then |f(x)|p, |g(x)|p and|f + g|p are also Riemann integrable and

(6.3.12)

(∫ b

a

|f(x) + g(x)|p dx

) 1p

(∫ b

a

|f(x)|p dx

) 1p

+

(∫ b

a

|g(x)|p dx

) 1p

.

The third basic inequality is Young’s inequality

(6.3.13) ab ≤ ap

p+bq

q, a, b ≥ 0,

1

p+

1

q= 1, p, q > 1.

Proof. We may assume that b ≤ ap−1. Consider the function f(x) := xp−1

with x ∈ [0, a]. Then the inverse function g(x) of f(x) is equal to g(x) = x1

p−1 . ByFigure 6.6, we see that the area of the red region is given by∫ a

0

f(x) dx =

∫ a

0

xp−1 dx =ap

p,

while the area of the yellow region is given by∫ b

0

f−1(y) dy =

∫ b

0

g(x) dx =

∫ b

0

x1

p−1 dx =p− 1

pb

pp−1 =

bq

q.

Since we assume that b ≤ ap−1, from Figure 6.6 we have

ab ≤ area of the red region + area of the yellow region =ap

p+bq

q.

Similarly, we can deal with the case that b ≥ ap−1. �

Exercise 6.3.6. Verify (6.3.13) when b ≥ ap−1.

Page 59: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 7

Integration techniques

In this chapter we introduce and discuss several techniques oncomputing (indefinite, definite, improper) integrals. Most meth-ods are presented in the textbook, however, other approaches willbe illustrated by considering practical examples which mainlycome from mathematics research.

An elementary rule or axiom is that an indefinite integraldoes not depend on the variables. For example, the followingtwo indefinite integrals ∫

u du,

∫y dy

are the same. The above rule is the original stage of the followingseveral methods.

7.1. Basic rules

If we consider the function y = x2, then

dy

dx= 2x, dy = 2x dx,

and hence ∫2x3 dx =

∫x2 2x dx =

∫y dy.

If we consider another function u = x2, then the same argument shows that∫u du =

∫x2 2x dx =

∫2x3 dx.

Hence ∫u du =

∫2x3 dx =

∫y dy.

7.1.1. Substitution rule for indefinite integrals. In general, we can prove

Proposition 7.1.1. If u = g(x) for some C1-function g, then

(7.1.1)

∫f [g(x)]g′(x) dx =

∫f(u) du.

We say a function g(x) is C1, if the derivative of g(x) exists and is continuous.

59

Page 60: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

60 7. INTEGRATION TECHNIQUES

Proof. Let F (x) be an anti-derivative of f(x), i.e., F ′(x) = f(x). Then

d

dxF [g(x)] = F ′[g(x)]g′(x) = f [g(x)]g′(x)

by the chain rule. Thus F [g(x)] is an anti-derivative of f [g(x)]g′(x) and hence∫f [g(x)]g′(x) dx = F [g(x)] + C = F (u) + C =

∫f(u)du

showing the formula (7.1.1). �

Example 7.1.2. Evaluate∫4x√x2 + 1 dx,

∫4(x3 + x)

√x2 + 1 dx,

∫x√

2x− 1 dx.

Proof. For the first indefinite integral, we set u = x2 + 1 and hence∫2√x2 + 1 d(x2 + 1) =

∫2u1/2 du =

4

3u3/2 + C =

4

3(x2 + 1)3/2 + C.

Similarly,∫4(x3 + x)

√x2 + 1 dx =

∫2(x2 + 1)

√x2 + 1 d(x2 + 1) =

∫2u3/2 du

=4

5u5/2 + C =

4

5(x2 + 1)5/2 + C.

To evaluate the third one, we let u := 2x− 1. Then∫x√

2x− 1 dx =

∫u+ 1

2

√udu

2=

1

4

∫ (u3/2 + u1/2

)du

=1

10u5/2 +

1

6u3/2 + C =

1

10(2x− 1)5/2 +

1

6(2x− 1)3/2 + C.

7.1.2. Substitution rule for definite integrals. Proposition 7.1.1 can betransformed to definite integrals.

Proposition 7.1.3. If u = g(x) for some C1-function g, then

(7.1.2)

∫ b

a

f [g(x)]g′(x) dx =

∫ g(b)

g(a)

f(u) du.

Proof. The proof is essentially similar as that of Proposition 7.1.1 Let F (x)be an anti-derivative of f(x). Then F [g(x)] is an anti-derivative of f [g(x)]g′(x) andhence, by the fundamental theorem of calculus, we have∫ b

a

f [g(x)]g′(x) dx = F [g(b)]− F [g(a)] =

∫ g(b)

g(a)

f(u) du,

where we use the definition of F . �

Page 61: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.1. BASIC RULES 61

Example 7.1.4. Evaluate limk→∞ Ik, where

Ik :=

∫ π/2

0

sink x cosx dx, k ∈ N.

Proof. Letting u = sinx we have

Ik =

∫ 1

0

ukdu =1

k + 1uk+1

∣∣∣10

=1

k + 1.

Hence limk→∞ Ik = 0. �

7.1.3. Trigonomtric functions method. Recall trigonometric functions for-mulas

sinx =2 tan x

2

1 + tan2 x2

, cosx =1− tan2 x

2

1 + tan2 x2

, tanx =2 tan x

2

1− tan2 x2

.

Since

d

dxtanx =

d

dx

sinx

cosx=

1

cos2 x=

sin2 x+ cos2 x

cos2 x= 1 + tan2 x,

it follows that

2d tanx

2=(

1 + tan2 x

2

)dx

and hence

dx

1 + ε cosx=

dx

1 + ε1−tan2 x

2

1+tan2 x2

=1 + tan2 x

2

1 + ε+ (1− ε) tan2 x2

dx

Example 7.1.5. Evaluate∫ π

0

1

1 + ε cosxdx =

π√1− ε2

, ε ∈ (−1, 1).

Proof. Letting u = tan x2 we have∫

1

1 + ε cosxdx =

2

1− ε

∫du

1+ε1−ε + u2

=2√

1− ε2

∫1

1 +(√

1−ε1+εu

)2 d

(√1− ε1 + ε

u

).

Evaluating at π and 0 implies∫ π

0

dx

1 + ε cosx=

2√1− ε2

tan−1

(√1− ε1 + ε

tanx

2

)∣∣∣π0

=π√

1− ε2,

because tan−1(∞) = π/2. �

Page 62: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

62 7. INTEGRATION TECHNIQUES

7.2. Integration by parts

Let u = u(x) and v = v(x) be differentiable functions. Then

(uv)′ = u′v + uv′

or

(7.2.1) uv′ = (uv)′ − u′v.Integrating both sides with respect to x, we obtain

Proposition 7.2.1. If u(x) and v(x) are C1-functions, then

(7.2.2)

∫u(x)v′(x) dx = u(x)v(x)−

∫u′(x)v(x) dx

or, in short form,

(7.2.3)

∫u dv = uv −

∫v du.

7.2.1. Recursion method. This method reduces the “power” of functionsby 1 each time.

Example 7.2.2. Evaluate

Ik =

∫sink x dx, Jk =

∫cosk x dx.

Proof. By Proposition 7.2.1 for any k ≥ 2, we have

Ik = −∫

sink−1 x d cosx = − sink−1 x cosx+ (k − 1)

∫cos2 x sink−2 x dx

= − cosx sink−1 x+ (k − 1)

∫sink−2 x(1− sin2 x) dx

= − cosx sink−1 x+ (k − 1)Ik−2 − (k − 1)Ik;

thus

Ik =k − 1

kIk−2 −

1

kcosx sink−1 x.

Example 7.2.3. Evaluate

Ik =

∫ π/2

0

sink x dx.

Proof. From Example 7.2.2 we have

Ik =k − 1

kIk−2, k ≥ 2.

Page 63: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.2. INTEGRATION BY PARTS 63

On the other hand,

I0 =

∫ π/2

0

dx =π

2, I1 =

∫ π/2

0

sinx dx = − cosx∣∣∣π/20

= 1.

When k = 2m is even, we have

I2m =2m− 1

2mI2m−2 =

2m− 1

2m

2m− 3

2m− 2I2m−4 = · · · = (2m− 1)!!

(2m)!!

π

2.

When k = 2m+ 1 is odd, we have

I2m+1 =2m

2m+ 1I2m−1 =

2m

2m+ 1

2m− 2

2m− 1I2m−3 = · · · = (2m)!!

(2m+ 1)!!.

Example 7.2.4. Evaluate, for k ∈ N,

Ik =

∫xkex dx, Ik(a) =

∫xkeax dx (a 6= 0).

Proof. The basic idea to deal with Ik and Ik(a) is an observation that ddxe

ax =aeax. In other words,

deax = aeaxdx.

Since Ik = Ik(1), we suffice to consider the second integral Ik(a). Letting u = xk/aand v = eax in (7.2.3), we have, for k ≥ 1,

Ik(a) =

∫xkeax dx =

1

a

∫xkaeax dx =

∫1

axk deax

=1

axkeax − 1

a

∫eax dxk =

1

axkeax − 1

a

∫kxk−1eax dx

=1

axkeax − k

aIk−1(a).

Note that

I0(a) =

∫eaxdx =

1

aeax + C.

for example,

I1(a) =1

axeax − 1

aI0(a) =

x

aeax − 1

a2eax + C,

I2(a) =1

ax2eax − 2

aI1(a) =

(x2

a− 2x

a2+

2

a3

)eax + C.

It is a good excise for you to find the general formula for Ik(a). �

Example 7.2.5. Evaluate, for k ∈ N,

Ik =

∫(lnx)k dx.

Page 64: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

64 7. INTEGRATION TECHNIQUES

Proof. Taking u = (lnx)k and v = x in (7.2.3) implies

Ik = x(lnx)k −∫k(lnx)k−1 dx = x(lnx)k − kIk−1.

Since

I1 =

∫lnx dx = x lnx−

∫dx = x lnx− x+ C,

we can calculate all Ik’s by the above recursion formula and the initial value. �

7.2.2. Gamma function and Beta function. The gamma function Γ(x)is defined by

(7.2.4) Γ(x) :=

∫ ∞0

tx−1e−t dt, x > 0.

This is an improper integral which is well-defined (see later). By (7.2.3), we have∫tx−1e−t dt =

1

x

∫ ∞0

e−t dtx =tx

xet+

1

x

∫txe−t dt.

Since

limt→∞

tx

xet= 0 = lim

t→0

tx

xet,

it follows that

(7.2.5) Γ(1 + x) = xΓ(x).

Using the recursion formula (7.2.5), we have

(7.2.6) Γ(n+ 1) = n!, n ∈ N.

There are some fundamental properties of Γ(x):

(1) Euler’s reflection formula: for any 0 < x < 1, we have

(7.2.7) Γ(x)Γ(1− x) =π

sin(πx).

In particular,

(7.2.8) Γ

(1

2

)=

√π

sin(π/2)=√π.

(2) Duplication formula: for any x > 0, we have

(7.2.9) Γ(x)Γ

(x+

1

2

)= 21−2x

√πΓ(2x).

Another important and useful integral is the Beta function defined by

(7.2.10) B(x, y) :=

∫ 1

0

tx−1(1− t)y−1dt, x, y > 0.

This is also an improper integral. The beta function was studied by Euler andLegendre and was given its name by Jscques Binet.

(3) B(x, y) = B(y, x).(4) For any x, y > 0 we have

(7.2.11) B(x, y) =Γ(x)Γ(y)

Γ(x+ y).

Page 65: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.3. RATIONAL FUNCTIONS AND PARTIAL FRACTIONS 65

Example 7.2.6. (Example 7.2.3 revisited) We now use gamma/beta functions togive another way to evaluate Ik defined in Example 7.2.3. Writing t = sin2 u in(7.2.10) with u ∈ [0, π/2], we arrive at

B(x, y) =

∫ π/2

0

(sinu)2x−2(cosu)2y−22 sinu · cosu du

= 2

∫ π/2

0

(sinu)2x−1(cosu)2y−1du;

in particular,

B

(k + 1

2,

1

2

)= 2

∫ π/2

0

(sinu)kdu = 2Ik.

Using (7.2.11), we have

Ik =1

2

Γ(k+12 )Γ( 1

2 )

Γ(k+22 )

=

√π

2

Γ(k+12 )

Γ(k2 + 1).

If k = 2m is even, then

I2m =

√π

2

Γ(m+ 12 )

Γ(m+ 1)=

√π

2

1

m!Γ

(m+

1

2

)by (7.2.6); from (7.2.5), we see that

Γ

(m+

1

2

)= Γ

(1 +m− 1 +

1

2

)=

(m− 1 +

1

2

(m− 1 +

1

2

)=

2m− 1

(m− 1 +

1

2

)=

2m− 1

2

2m− 3

(m− 2 +

1

2

)= · · · =

(2m− 1)!!

2mΓ

(1

2

)=

(2m− 1)!!

2m√π.

Hence

I2m =π

2

(2m− 1)!!

2mm!=π

2

(2m− 1)!!

(2m)!!.

The odd case is left to readers.

7.3. Rational functions and partial fractions

A rational function f is the quotient of two polynomials. That is

(7.3.1) f(x) =P (x)

Q(x),

where P (x) and Q(x) are polynomials. A basic idea to treat with rational functionsis to write f(x) as a sum of a polynomial and simpler rational functions. Such a sumis called a partial-fraction decomposition. These simpler rational functions areof the form

(7.3.2)A

(ax+ b)n,

Bx+ C

(ax2 + bx+ c)n,

where A,B,C, a, b, and c are constants and n is a positive integer.

Page 66: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

66 7. INTEGRATION TECHNIQUES

If the degree of P (x) in (7.3.1) is greater than or equal to the degree of Q(x),then the first step in the partial-fraction decomposition is to use long division towrite f(x) as a sum of a polynomial and a rational function, where the rationalfunction is such that the degree of the polynomial in the numerator is less than thedegree of the polynomial in the denominator. (Such rational functions are calledproper.)

7.3.1. Partial-fraction decomposition I. We discuss the cases of distinctand repeated linear factors.

If the linear factor ax + b is contained n times in the factorization of thedenominator of a proper rational function, then the partial-fraction decompositioncontains terms of the form

A1

ax+ b+

A2

(ax+ b)2+ · · ·+ An

(ax+ b)n,

where A1, · · · , An are constants.Case 1a: Q(x) is a product of m distinct linear factors. Q(x) is thus of the

formQ(x) = a(x− x1) · · · (x− xm)

where x1, · · · , xm are the m distinct roots of Q(x). The rational function can thenbe written as

P (x)

Q(x)=

1

a

[A1

x− x1+ · · ·+ Am

x− xm

].

Case 1b: Q(x) is a product of repeated linear factors. Q(x) is thus of the form

Q(x) = a(x− x1)n1 · · · (x− xm)nmm

where x1, · · · , xm are the m distinct roots of Q(x), and n1, · · · , nm are positiveintegers. Then

P (x)

Q(x)=

1

a

[A1,1

x− x1+ · · ·+ A1,n1

(x− x1)n1+ · · ·+ Am,1

x− xm+ · · ·+ Am,nm

(x− x1)nm

].

For example,∫1

x(x− 1)dx =

∫ (−1

x+

1

x− 1

)dx = ln |x− 1| − ln |x|+ C,

and ∫x

(x+ 1)2dx =

∫ [1

x+ 1+

−1

(x+ 1)2

]dx = ln |x+ 1|+ 1

x+ 1+ C.

7.3.2. Irreducible quadratic factors. We discuss the cases of distinct andrepeated irreducible quadratic factors.

If the irreducible quadratic factor ax2 + bx + c is contained n times in thefactorization denominator of a proper rational function, then the partial-fractiondecomposition contains temrs of the form

B1x+ C1

ax2 + bx+ c+

B2x+ C2

(ax2 + bx+ c)2+ · · ·+ Bnx+ Cn

(ax2 + bx+ c)n,

Page 67: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.3. RATIONAL FUNCTIONS AND PARTIAL FRACTIONS 67

where B1, C1, · · · , Bn, Cn are constants.Case 1a: Q(x) is a product of m distinct irreducible quadratic factors. Q(x)

is thus of the form

Q(x) = (a1x2 + b1x+ c1) · · · (amx2 + bmx+ cm)

where a1, b1, c1, · · · , am, bm, cm are constants. Then

P (x)

Q(x)=

B1x+ C1

a1x2 + b1x+ c1+ · · ·+ Bmx+ Cm

amx2 + bmx+ cm.

Case 2a: Q(x) is a product of m repeated irreducible quadratic factors. Q(x)is thus of the form

Q(x) = (a1x2 + b1x+ c1)n1 · · · (amx2 + bmx+ cm)nm ,

where a1, b1, c1, · · · , am, bm, cm are constants, and n1, · · · , nm are positive integers.Then

P (x)

Q(x)=

n1∑i=1

B1,ix+ C1,i

(a1x2 + b1x+ c1)i+ · · ·+

nm∑i=1

Bm,ix+ Cm,i(amx2 + bmx+ cm)nm

.

For example,∫2x3 − x2 + 2x− 2

(x2 + 2)(x2 + 1)dx =

∫ [2x

x2 + 2+−1

x2 + 1

]dx = ln(x2 + 2)− tan−1 x+ C,

and∫x2 + x+ 1

(x2 + 1)2dx =

∫ [1

x2 + 1+

x

(x2 + 1)2

]dx = tan−1 x− 1

2(x2 + 1)+ C.

Example 7.3.1. Evaluate∫ 1

0

x4(1− x)4

1 + x2dx =

22

7− π.

Proof. Since

x4(1− x)4

1 + x2= x6 − 4x5 + 5x4 − 4x2 + 4− 4

1 + x2,

it follows that ∫ 1

0

x4(1− x)4

1 + x2dx =

22

7− π.

Since 1 ≤ 1 + x2 ≤ 2 for any x ∈ [0, 1], we have∫ 1

0

1

2x4(1− x)4 dx ≤

∫ 1

0

x4(1− x)4

1 + x2dx ≤

∫ 1

0

x4(1− x)4 dx.

Recall the Beta function (7.2.10). Hence∫ 1

0

x4(1− x)4 dx = B(5, 5) =Γ(5)Γ(5)

Γ(10)=

4!4!

9!=

1

630

Page 68: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

68 7. INTEGRATION TECHNIQUES

Figure 7.1. An improper integral

by (7.2.11) and (7.2.6). Consequently

1

1260<

22

7− π ≤ 1

630

which gives 3.140 ≤ π ≤ 3.142. �

7.4. Improper integrals

Look at the gamma function defined in (7.2.4). At fist glance, the integration

interval is unbounded and the function t12−1e−t is infinity as t→ 0+.

Exercise 7.4.1. Show that

limt→0+

tx−1e−t =

0, x > 1,1, x = 1,∞, x < 1.

We call an integral is improper if

(1) one or both limits of integration are infinite (that is, the integration in-terval is unbounded), or

(2) the integrand becomes infinite at one or more points of the interval ofintegration.

7.4.1. Unbounded intervals. By cutting off the interval, we can define

Definition 7.4.2. If f(x) is a continuous function on [a,∞) or (−∞, a], then wedefine

(7.4.1)

∫ ∞a

f(x) dx := limz→∞

∫ z

a

f(x) dx,

and

(7.4.2)

∫ a

−∞f(x) dx := lim

z→−∞

∫ a

z

f(x) dx.

Page 69: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.4. IMPROPER INTEGRALS 69

From the definition above, we know that for each z, the integrals∫ z

a

f(x) dx,

∫ a

z

f(x) dx

are finite, however, after taking the limits, the improper integrals may be infinity.

Example 7.4.3. A typical example is

(7.4.3)

∫ ∞1

1

xpdx, p > 0.

For example,∫ ∞1

1

x2dx = lim

z→∞

∫ z

1

1

xpdx = lim

z→∞

(1− 1

z

)= 1,∫ ∞

1

1√xdx = lim

z→∞

∫ z

1

1√xdx = lim

z→∞

(2√z − 2

)= ∞.

In general, since ∫ z

1

1

xpdx =

{ 11−p (z1−p − 1), p 6= 1,

ln z, p = 1,

we arrive at

(7.4.4)

∫ ∞1

1

xpdx =

{ 1p−1 , p > 1,

∞, 0 < p ≤ 1.

As in the case of sequences, we can define

Definition 7.4.4. Let f(x) be continuous on the interval [a,∞). If

limz→∞

∫ z

a

f(x) dx

exists and has a finite value, we say that the improper integral∫ ∞a

f(x) dx

converges and define ∫ ∞0

f(x) dx := limz→∞

∫ z

a

f(x) dx.

Otherwise we say that the improper integral diverge.

From Example 7.4.3 and Definition 7.4.4, we see that the integral∫ ∞1

1

xpdx

is convergent if p > while is divergent if 0 < p ≤ 1.

Page 70: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

70 7. INTEGRATION TECHNIQUES

Example 7.4.5. Consider the integral∫ ∞0

1

1 + x2dx.

According to (6.2.11), we have∫ z

0

1

1 + x2dx = tan−1 x

∣∣∣z0

= tan−1 z

and then ∫ ∞0

1

1 + x2dx = lim

z→∞tan−1 z =

π

2.

Definition 7.4.4 can be extend to the integrals∫ a

−∞f(x) dx.

For example ∫ 0

−∞

1

1 + x2dx = lim

z→−∞(− tan−1 z) =

π

2.

If f(x) is continuous on (−∞,∞), we define

(7.4.5)

∫ ∞−∞

f(x) dx :=

∫ a

−∞f(x) dx+

∫ ∞a

f(x) dx,

where a is a real number. If both improper integrals on the right-hand side of(7.4.5) are convergent, then the value of the impropert integral on the left-handside of (7.4.5) is the sum of the two limiting values on the right-hand side.

I give some remarks on the above definition.

Remark 7.4.6. (1) More precisely, if for any given a ∈ R, the integrals∫ a

−∞f(x) dx,

∫ ∞a

f(x) dx

are convergent, then we define the integral∫∞−∞ f(x)dx via (7.4.5). In this case, we

can show that the definition (7.4.5) does not depend on the particular choice of a.Indeed, for any given two real numbers a and b, say a < b, we have∫ ∞

a

f(x) dx = limz→∞

∫ z

a

f(x) dx = limz→∞

[∫ z

b

f(x) dx+

∫ b

a

f(x) dx

]

=

∫ ∞b

f(x) dx+

∫ b

a

f(x) dx.

Similarly, we can show∫ b

−∞f(x) dx =

∫ b

a

f(x) dx+

∫ a

−∞f(x) dx.

Page 71: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.4. IMPROPER INTEGRALS 71

Since all integrals are finite, it follows that∫ ∞a

f(x) dx+

∫ a

−∞f(x) dx =

∫ ∞b

f(x) dx+

∫ b

−∞f(x) dx.

Thus the definition (7.4.5) does not depend on the choice of a.(2) Another important way to define the integral

∫∞−∞ f(x)dx is the Cauchy’s

principal-value integral

(7.4.6) p.v.

∫ ∞−∞

f(x) dx := limz→∞

∫ z

−zf(x) dx.

(3) If∫∞−∞ f(x) dx exists in the sense of (7.4.5), then∫ ∞

−∞f(x) dx = lim

z→∞

[∫ a

−zf(x) dx+

∫ z

a

f(x) dx

]= p.v.

∫ ∞−∞

f(x) dx.

However, the converse is not true. Thus, we can find a continuous function f(x)defined on (−∞,∞), which has finite integral in the sense of (7.4.6) but not of(7.4.5). For example,

f(x) := sinx, x ∈ (−∞,∞).

Then

p.v.

∫ ∞−∞

sinx dx = limz→∞

∫ z

−∞sinx dx = lim

z→∞0 = 0,∫ ∞

−∞sinx dx = ∞.

Let

f(x) := ex − x, x ∈ [0,∞).

Since f ′(x) = ex − 1 ≥ e0 − 1 = 0, it follows from Proposition 5.2.2 that f(x) isincreasing on [0, b] for each fixed b and then on [0,∞). Hence

(7.4.7) ex − x = f(x) ≥ f(0) = e0 − 0 = 1 =⇒ ex ≥ 1 + x, x ∈ [0,∞).

Exercise 7.4.7. Show that

ex ≥ 1 + x+x2

2, x ∈ [0,∞).

(Hint: Consider the function f(x) = ex − 1− x− x2

2 and use (7.4.7).)

In general, we have, for any given positive integer n,

(7.4.8) ex ≥n∑i=0

xi

i!= 1 + x+

x2

2!+ · · ·+ xn

n!≥ 1

n!xn, x ∈ [0,∞).

Actually, we can show that (beyond the scope of this course)

(7.4.9) ex = limn→∞

n∑i=0

xi

i!=:

∞∑i=0

xi

i!, x ∈ (−∞,∞).

We call (7.4.9) the Taylor series of ex.

Page 72: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

72 7. INTEGRATION TECHNIQUES

Exercise 7.4.8. Verify (7.4.8) for n = 3, 4.

We now use the inequality (7.4.8) to show that the improper integral (7.2.4) isconvergent at least for x ≥ 1.

Example 7.4.9. Recall the gamma function

Γ(x) :=

∫ ∞0

tx−1e−t dt.

We now show that Γ(x) is convergent whenever x ≥ 1.Case 1: x = 1. Then

Γ(1) =

∫ ∞0

e−t dt = −e−t∣∣∣∣∞0

= 1.

Case 2: x > 1. Divide Γ(x) into two terms

Γ(x) =

∫ 1

0

tx−1e−t dt+

∫ ∞1

tx−1e−t dt;

since x− 1 > 0 and 0 ≤ t ≤ 1, we have tx−1 ≤ 1 and∫ 1

0

tx−1e−t dt ≤∫ 1

0

e−t dt = −e−t∣∣∣∣10

= 1− 1

e.

Choose an integer n such that x − 1 ≤ n; for t ≥ 1, we then get tx−1 ≤ tn. Using(7.4.8) implies

1

n!

(t

2

)n≤ et/2 =⇒ tx−1 ≤ tn ≤ 2nn!et/2

and hence∫ ∞1

tx−1e−t dt ≤∫ ∞

1

2nn!et/2e−t dt = 2nn!

∫ ∞1

e−t/2dt =2n+1n!√

e.

Therefore Γ(x) is convergent for x ≥ 1.

7.4.2. Unbounded integrands. A typical example is the integral∫ 1

0

1√xdx.

The integrand f(x) = 1/√x is unbounded as x → 0+. By cutting off the point 0,

we can study

I(c) :=

∫ 1

c

1√xdx, 0 < c < 1.

Now the function f(x) is well-defined and continuous on [c, 1]; moreover

Ic = 2√x

∣∣∣∣1c

= 2(1−√c)

and

limc→0+

Ic = limc→0

(2− 2√c) = 2.

Page 73: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.4. IMPROPER INTEGRALS 73

This example suggests us the following

Definition 7.4.10. If f is continuous on (a, b] and limx→a+ f(x) = ±∞, we define

(7.4.10)

∫ b

a

f(x) dx := limc→a+

∫ b

c

f(x) dx,

provided that this limit exists. If the limit exists, we say that the improper integralon the left-hand side of (7.4.10) converges; if the limit does not exist, we say thatthe improper integral diverges.

Similarly, if f is continuous on [a, b) and limx→b− f(x) = ±∞, we define

(7.4.11)

∫ b

a

f(x) dx := limc→b−

∫ c

a

f(x) dx,

provided that this limit exists.If f is continuous on (a, b) and limx→a+ f(x) = ±∞ and limx→b− f(x) = ±∞,

we define

(7.4.12)

∫ b

a

f(x) dx := limε,η→0

∫ b−ε

a+η

f(x) dx,

provided that this limit exits. Note that the limit in (7.4.12) is the limit of multi-variable which will be treat with in later.

For example∫ 1

0

dx

(x− 1)2/3= 3(x− 1)1/3

∣∣∣∣10

= 3,∫ 1

0

lnx dx = (x lnx− x)

∣∣∣∣10

= −1− limx→0+

x lnx = −1.

If f(x) is discontinuous at a point c ∈ (a, b), then we define

(7.4.13)

∫ b

a

f(x) dx := limε→0+

∫ b

c+ε

f(x) dx+ limη→0+

∫ c−η

a

f(x) dx.

By this definition, we have ∫ 1

−1

1

x3dx =∞.

We can also define Cauchy’s principal-value integral

(7.4.14) p.v.

∫ b

a

f(x) dx := limε→0+

[∫ b

c+ε

f(x) dx+

∫ c−ε

a

f(x) dx

].

For example,

p.v.

∫ 1

−1

1

x3dx = lim

ε→0+

[∫ 1

ε

dx

x3+

∫ −ε−1

dx

x3

]= 0.

7.4.3. A comparison result for improper integrals. The inequality (6.1.8)can be generalized to improper integrals.

Page 74: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

74 7. INTEGRATION TECHNIQUES

Proposition 7.4.11. Suppose that f(x) and g(x) are continuous on [a,∞).(1) If f(x) ≤ g(x) on [a,∞ and

∫∞ag(x) dx is convergent, then

∫∞af(x) dx is

also convergent and

(7.4.15)

∫ ∞a

f(x) dx ≤∫ ∞a

g(x) dx.

(2) If f(x) ≥ g(x) on [a,∞) and∫∞ag(x) dx is divergent, then

∫∞af(x) dx is

also divergent.

Proof. (1) In this case, for any fixed number z > a, we have∫ z

a

f(x) dx ≤∫ z

a

g(x) dx;

letting z →∞ implies (7.4.15).(2) If

∫∞af(x)dx is convergent, by (1), we must have that the improper integral∫∞

ag(x) dx is convergent, a contradiction. �

Example 7.4.12. Evaluate

I :=

∫ ∞0

e−x2

dx.

Note that

I =

∫ 1

0

e−x2

dx+

∫ ∞1

e−x2

dx.

For any 0 ≤ x ≤ 1, we have 0 ≤ e−x2 ≤ 1 and then∫ 1

0

e−x2

dx ≤∫ 1

0

dx = 1.

When x > 1, we have then −x2 ≤ −x so that∫ ∞1

e−x2

dx ≤∫ ∞

1

e−x dx = −e−x∣∣∣∣∞1

=1

e.

Sett = x2, x ≥ 0.

Then

I =

∫ ∞0

e−t d√t =

1

2

∫ ∞0

t−1/2e−t dt =1

(1

2

)=

√π

2

by (7.2.8).

7.5. Taylor approximation

The Taylor polynomial of degree n about x = 0 for the function f(x) is givenby

(7.5.1) P (x) := f(0) + f ′(0)x+f ′′(0)

2!x2 + · · ·+ f (n)(0)

n!xn,

Page 75: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.5. TAYLOR APPROXIMATION 75

provided all derivatives f ′(0), f ′′(0), · · · , f (n)(0) exist.For example,

∑ni=0 x

i/i! in (7.4.8) is the Taylor polynomial of degree n aboutx = 0 for ex.

More general, the Taylor polynomial of degree n about x = a for the functionf(x) is given by

(7.5.2) Pn(x) = f(a) + f ′(a)(x− a) +f ′′(a)

2!(x− a)2 + · · ·+ f (n)(a)

n!(x− a)n.

Exercise 7.5.1. Compute the Taylor polynomial of degree 3 about x = 0 for sinxand cosx.

7.5.1. Taylor’s formula. Let f be a continuous function whose continuouslyderivatives exist up to second order. By Theorem 6.2.3, we have

f(x) = f(a) +

∫ x

a

f ′(t) dt.

Applying Proposition 7.2.1 to u = −(x− t) and v = f ′(t), we get∫ x

a

f ′(t) dt =

∫ x

a

f ′(t)d[−(x− t)] = −(x− t)f ′(t)∣∣∣∣xa

+

∫ x

a

(x− t)f ′′(t) dt

= (x− a)f ′(a) +

∫ x

a

(x− t)f ′′(t) dt.

That is

f(x) = f(a) + f ′(a)(x− a) +

∫ x

a

(x− t)f ′′(t) dt.

In general

Theorem 7.5.2. (Taylor’s formula) Suppose that f : I → R where I is an interval,a ∈ I, and f and its first n+1 derivatives are continuous at a ∈ I. Then, for x ∈ I,

(7.5.3) f(x) = f(a) +

n∑i=1

f (i)(a)

i!(x− a)i +Rn+1(x),

where

(7.5.4) Rn+1(x) =1

n!

∫ x

a

(x− t)nf (n+1)(t) dt.

By Theorem 6.3.1, we have

f(x) = f(a) +

∫ x

a

f ′(t) dt = f(a) + (x− a)f ′(c)

for some c between a and x.

Page 76: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

76 7. INTEGRATION TECHNIQUES

Corollary 7.5.3. Suppose that f : I → R where I is an interval, a ∈ I, and f andits first n+ 1 derivatives are continuous at a ∈ I. Then, for x ∈ I, there exists a cbetween a and x such that the error term Rn+1(x) is of the form

(7.5.5) Rn+1(x) =f (n+1)(c)

(n+ 1)!(x− a)n+1.

Proof. Since f (n+1)(t) is continuous, it follows that m ≤ f (n+1)(t) ≤ M forall t ∈ I. In particular,

m

n!

∫ x

a

(x− t)n dt ≤ Rn+1(x) ≤ M

n!

∫ x

a

(x− t)n dt,

which gives us m(n+1)! (x − a)n+1 ≤ Rn+1(x) ≤ M

(n+1)! (x − a)n+1. Thus m ≤(n+1)!Rn+1(x)

(x−a)m+1 ≤ M. By Theorem 3.2.7, (n + 1)!Rn+1(x)/(x − a)n+1 = f (n+1)(c)

for some c between a and x. �

For example,

ex =

n∑i=0

xi

i!+Rn+1(x), x ∈ (−∞,∞),(7.5.6)

sinx =

n∑i=0

(−1)ix2i+1

(2i+ 1)!+Rn+1(x), x ∈ (−∞,∞),(7.5.7)

cosx =

n∑i=0

(−1)ix2i

(2i)!+Rn+1(x), x ∈ (−∞,∞),(7.5.8)

ln(1 + x) =

n∑i=1

(−1)i+1xi

i+Rn+1(x), x ∈ (−1, 1],(7.5.9)

1

1− x=

n∑i=0

xi +Rn(x), x ∈ (−1, 1).(7.5.10)

7.5.2. Taylor’s series. Indeed, we can show that (7.5.6)–(7.5.10) become

ex =

∞∑i=0

xi

i!, x ∈ (−∞,∞),(7.5.11)

sinx =

∞∑i=0

(−1)ix2i+1

(2i+ 1)!, x ∈ (−∞,∞),(7.5.12)

cosx =

∞∑i=0

(−1)ix2i

(2i)!, x ∈ (−∞,∞),(7.5.13)

ln(1 + x) =

∞∑i=1

(−1)i+1xi

i, x ∈ (−1, 1),(7.5.14)

1

1− x=

∞∑i=0

xi, x ∈ (−1, 1).(7.5.15)

Page 77: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.5. TAYLOR APPROXIMATION 77

A function f(x) defined on an open interval I is called smooth if all its higherorder derivatives are continuous. For example ex, sinx, cosx are smooth functionson (−∞,∞). The set of all smooth functions defined on I is denoted by C∞(I).We say f ∈ Ck(I) if all higher order derivative up to kth order are continuous.Observe that

(7.5.16) Ck(I) ⊂ C∞(I) for all k.

A function f(x) defined on an open interval I is called analytic if for any a ∈ I,there exists an open interval Ia such that a ∈ Ia ⊂ I and

f(x) =

∞∑n=0

cn(x− a)n, x ∈ Ia.

The set of all analytic functions defined on I is denoted by Cω(I).

Example 7.5.4. ex ∈ Cω((−∞,∞)). For any a ∈ (−∞,∞), we have

ex = ea · ex−a = ea∞∑i=0

(x− a)i

i!

by (7.5.11).

Since dn

dxn ex = ex, it follows that ex is a smooth function. In general, we have

Proposition 7.5.5. For any open interval I, we have Cω(I) ⊂ C∞(I) and Cω(I) 6=C∞(I). If f ∈ Cω(I), then, for any a ∈ I,

(7.5.17) f(x) =

∞∑n=0

f (n)(a)

n!(x− a)n

for any x near a.

I only give a smooth function on (−∞,∞) which is not analytic.

Example 7.5.6. Consider

(7.5.18) f(x) =

{e−1/x, x > 0,

0, x ≤ 0.

Since

limx→0+

e−1/x = limx→0+

1

e1/x= limy→∞

1

ey= 0,

where y = 1/x. This shows that f(x) is continuous on (−∞,∞). To prove f ∈C∞((−∞,∞)), we suffice to check that limx→0+ f

(n)(x) = f(0) = 0 for all n ∈ N.

Page 78: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

78 7. INTEGRATION TECHNIQUES

Calculate

f ′(x) =1

x2e−1/x,

f ′′(x) =−2x

x4e−1/x +

1

x4

−1/x

=

(1

x4− 2

x3

)e−1/x,

f ′′′(x) =

(−4x3

x8+

6x2

x6+

1

x6− 2

x5

)e−1/x =

(1

x6− 6

x5+

6

x4

)e−1/x.

By induction on n, we can show that

f (n)(x) = P2n

(1

x

)e−1/x

where P2n(t) denotes the polynomial (without constant term) of degree 2n in termsof t. Hence

limx→0+

f (n)(x) = limy→∞

P2n(y)

ey;

by (7.4.8), we have ey ≥ 1(2n+1)!y

2n+1 and then

limx→0+

f (n)(x) ≤ limy→∞

(2n+ 1)!P2n(y)

y2n+1= 0

by (3.1.8). Thus f(x) is smooth.We now show that f(x) is not analytic. Otherwise,

f(x) =

∞∑n=0

cnxn

around 0. By (7.5.17), we must have f(x) ≡ 0 near 0. But, for any ε > 0, by thedefinition, we get f(x) > 0, a contradiction. Therefore, f(x) ∈ C∞((−∞,∞)) butf(x) /∈ Cω((−∞,∞)).

For any real number α and any positive integer n, define

(7.5.19)

(αn

)=α(α− 1) · · · (α− n+ 1)

n!.

When α is a positive integer greater than n, the definition (7.5.19) coincides withthe usual binomial coefficients.

For all |x| < 1 and all α ∈ R, we have

(7.5.20) (1 + x)α = 1 +

∞∑n=1

(αn

)xn.

Other important Taylor’s series are

Page 79: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

7.5. TAYLOR APPROXIMATION 79

We have

sin−1 x =

∞∑n=0

(2n)!

4n(n!)2(2n+ 1)x2n+1, |x| ≤ 1,(7.5.21)

cos−1 x =π

2− sin−1 x, |x| ≤ 1,(7.5.22)

tan−1 x =

∞∑n=0

(−1)n

2n+ 1x2n+1, |x| ≤ 1.(7.5.23)

In particular, taking x = 1 in (7.5.23) yields

(7.5.24)π

4=

∞∑n=0

(−1)n

2n+ 1= 1− 1

3+

1

5− 1

7+ · · · .

Exercise 7.5.7. Verify

ex

cosx= 1 + x+ x2 +

2

3x3 +

1

2x4 + · · · ,

(1 + x)ex =

∞∑n=0

n+ 1

n!xn.

The hyperbolic functions are

sinhx =ex − e−x

2, coshx

ex + e−x

2,(7.5.25)

tanhx =sinhx

coshx, cothx =

coshx

sinhx.(7.5.26)

Exercise 7.5.8. Prove

sinh(−x) = − sinhx, cosh(−x) = coshx,

tanh(−x) = − tanhx, coth(−x) = − cothx,

1 = cosh2 x− sinh2 x,

sinh−1 x = ln(x+

√1 + x2

), cosh−1 x = ln

(x+

√x2 − 1

)(x ≥ 1),

tanh−1 x =1

2ln

(1 + x

1− x

)(|x| < 1), coth−1 x =

1

2ln

(x+ 1

x− 1

)(|x| > 1),

d

dxsinhx = coshx,

d

dxcoshx = sinhx,

d

dxtanhx = 1− tanh2 x,

d

dxcothx = 1− coth2 x,

d

dxsinh−1 x =

1√1 + x2

,d

dxcosh1 x =

1√x2 − 1

,

d

dxtanh−1 x =

1

1− x2,

d

dxcoth−1 x =

1

1− x2

Page 80: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

80 7. INTEGRATION TECHNIQUES

Figure 7.2. Hyperbolic functions

Figure 7.3. Geometric interpretation

The Taylor’s series of hyperbolic functions are

sinhx =

∞∑n=0

1

(2n+ 1)!x2n+1,(7.5.27)

coshx =

∞∑n=0

1

(2n)!x2n.(7.5.28)

Exercise 7.5.9. Evaluate the first two terms of their Taylor polynomials:

tanhx = x− 1

3x3 + · · · ,

cothx− 1

x=

1

3x− 1

45x3 + · · · .

Page 81: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 8

Differential equations

A differential equation about y(x) is an equation containing func-tion y and its higher-order derivatives. For example,

y′(x) = y(x).

In this chapter we give methods to solve differential equations.

8.1. Solving differential equations

If a differential equation contains only the first derivative, it is called a first-order differential equation. For example,

y′(x) = y(x), y′(x) =√x+ y(x).

In this chapter, we focus only on first-order differential equations of the form

(8.1.1)dy

dx= f(x)g(y).

The right-hand side of (8.1.1) is the product of two functions, one depending onlyon x, the other only on y.

8.1.1. Separable differential equations. Look at the following differentialequation

dy

dx=

1

y.

Multiplying by ydx on both sides implies

ydy = dx;

so ∫y dy =

∫dx =⇒ 1

2y2 = x+ C =⇒ y2 = 2x+ C.

The above discussion suggests a way to solve (8.1.1). From (8.1.1) we have

dy

g(y)= f(x)dx

which implies

(8.1.2)

∫dy

g(y)=

∫f(x) dx.

81

Page 82: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

82 8. DIFFERENTIAL EQUATIONS

Figure 8.1. Cells

8.1.2. Pure-time differential equations. If g(y) ≡ 1, then we say (8.1.1)is a pure-time differential equation:

(8.1.3)dy

dx= f(x), x ∈ I,

for some interval I. In this case, according to (8.1.2), we have

(8.1.4) y(x) = y =

∫f(x) dx+ C.

In particular, for any x0 ∈ I, we have

(8.1.5) y(x) =

∫ x

x0

f(x) dx+ y0,

where y0 := y(x0).

Example 8.1.1. Suppose that the volume V (t) of a cell at time t changes accordingto

V ′(t) = cos t, with V (0) = 3.

Proof. Using (8.1.5), we have

V (t) =

∫ t

0

cos s ds+ V (0) = sin s

∣∣∣∣t0

+ 3 = sin t− sin 0 + 3 = 3 + sin t

for any t ≥ 0. �

8.1.3. Autonomous differential equations. Many biological models havethe form

(8.1.6)dy

dx= g(y)

called an autonomous differential equation. For example,

N ′(t) = 2N(t),

Page 83: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

8.1. SOLVING DIFFERENTIAL EQUATIONS 83

where N(t) denotes the size of the population at time t. By (8.1.2), we have

(8.1.7)

∫dy

g(y)=

∫dx.

The solutions now depend on the form of g(y).

Case 1: g(y) = k(y − a), where k 6= 0. In this case, (8.1.7) becomes∫dy

y − a=

∫k dx =⇒ ln |y − a| = kx+ C.

Consequently,

(8.1.8) y(x) = y = C ′ekx + a, C ′ := ±eC .

Example 8.1.2. Solve

dy

dx= 2− 3y, where y(1) = 1.

Proof. Note that 2− 3y = −3(y − 23 ). By (8.1.8) we have

y(x) = C ′e−3x +2

3.

But y(1) = 1, we get

1 = y(1) = C ′e−3 +2

3=⇒ C ′ =

1

3e3

and hence y(x) = 23 + 1

3e3−3x. Letting x→∞ yields limx→∞ y(x) = 2/3. �

Case 2: g(y) = k(y − a)(y − b), where k 6= 0. In this case, (8.1.7) becomes∫dy

(y − a)(y − b)=

∫k dx.

When a = b, we immediately have∫dy

(y − a)2=

∫k dx =⇒ −1

y − a= kx+ C

and hence

(8.1.9) y = a− 1

kx+ C, if a = b.

When a 6= b, the rational function 1/(y − a)(y − b) can be decomposed as

1

(y − a)(y − b)=

A

y − a+

B

y − baccording to 7.3.1. Since

A

y − a+

B

y − b=

(A+B)y − (Ab+Ba)

(y − a)(y − b)we must have

A+B = 0 and Ab+Ba = −1.

Thus

A =1

a− b, B =

1

b− a

Page 84: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

84 8. DIFFERENTIAL EQUATIONS

and

1

(y − a)(y − b)=

1

a− b

(1

y − a− 1

y − b

)since a 6= b. Consequently,

1

a− bln

∣∣∣∣y − ay − b

∣∣∣∣ = kx+ C1

for some constant C1, and

y − ay − b

= Ce(a−b)kx, C := ±eC1(a−b).

We now arrive at

(8.1.10) y(x) = y =a− bCe(a−b)kx

1− Ce(a−b)kx , if a 6= b.

Example 8.1.3. Solvedy

dx= (y − 2)2, y(0) = 1.

Proof. From (8.1.9), we obtain

y(x) = 2− 1

x+ C.

Since y(0) = 1, it follows that

1 = 2− 1

0 + C=⇒ C = 1.

Hence y(x) = 2− 1x+1 = 2x+1

x+1 . �

Example 8.1.4. Solve

dy

dx= 2(y − 1)(y + 2), y(0) = 2.

Proof. By (8.1.10) we have

y(x) =1 + 2Ce6x

1− Ce6x.

Since y(0) = 2, it follows that

2 =1 + 2C

1− C=⇒ C =

1

4.

Thus

y(x) =4 + 2e6x

4− e6x.

Page 85: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

8.2. EQUILIBRIA AND STABILITY 85

8.2. Equilibria and stability

We revisit Example 8.1.2:

dy

dx= 2− 3y, y(x) =

2

3+ Ce−3x.

Letting x→∞, we have

limx→∞

y(x) =2

3.

Observe that 2/3 is the solution of 2− 3y = 0.

8.2.1. Equilibria. Consider the differential equations

dy

dx= g(y).

Definition 8.2.1. If y satisfies g(y) = 0, then y is called an equilibrium of

dy

dx= g(y).

For example, 2/3 is an equilibrium of dydx = 2− 3y.

Example 8.2.2. Consider the differential equation

dy

dx= 2− 3y.

The equilibrium 2/3 is also a solution. We now consider a new function

y(x) :=2

3+ z(x)

for some differential function z(x); we may think of z(x) being a small perturbationof 2/3. If y(x) satisfies the above differential equation, then

dz

dx=dy

dx= 2− 3

(2

3+ z

)= −3z.

Hencez(x) = z = C ′e−3x

for some constant C ′, and y(x) = 23 + C ′e−3x. Note that

limx→∞

y(x) = limx→∞

(2

3+ C ′e−3x

)=

2

3.

Thus, any small perturbation of 2/3 returns back to 2/3. Such an equilibrium iscalled locally stable.

Example 8.2.3. Look at the differential equation

dy

dx= 1 + y.

Page 86: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

86 8. DIFFERENTIAL EQUATIONS

Figure 8.2. Stabilities

The equilibrium is y = −1. Consider a new function

y(x) := −1 + z(x)

for some differential function z(x). If y(x) satisfies the above differential equation,then

dz

dx=dy

dx= 1 + (−1 + z) = z =⇒ z(x) = z(0)ex

andy(x) = z(0)ex − 1.

However, in this case limz→∞ y(x) = ∞ or −∞. Such an equilibrium −1 is calledunstable.

We now give a precise definition of stabilities. Let y be an equilibrium ofdydx = g(y). Then

(8.2.1) g(y) = 0

by the definition. Consider a small perturbation

(8.2.2) y(x) = y + z(x)

for some differential function z(x).

Definition 8.2.4. We say an equilibrium y of dy/dx = g(y) is locally stable ifany small perturbation (8.2.2) returns back to y. Otherwise, we say y is unstable.

If y(x) defined by (8.2.2) satisfies dydx = g(y), then

(8.2.3)dz

dx=dy

dx= g (y + z) .

Since z is very small, by the linear approximation, we have

g(y + z)− g(y) ≈ g′(y)z;

Page 87: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

8.2. EQUILIBRIA AND STABILITY 87

Figure 8.3. Geometric interpretation

using (8.2.1), we may thinkg(y + z) = g′(y)z.

Define

(8.2.4) λ := g′(y).

Then (8.2.3) becomes

(8.2.5)dz

dx= λz =⇒ z(x) = z = Ceλx;

thus

(8.2.6) y(x) = y + Ceλx.

8.2.2. Stabilities. From (8.2.6), we arrive at

Theorem 8.2.5. Consider the differential equation

dy

dx= g(y)

where g(y) is a differentiable function. Assume that y is an equilibrium; that is,g(y) = 0. Then

• y is locally stable if g′(y) < 0, and• y is unstable if g′(y) > 0.

When g′(y) = 0, we can not make any conclusions about the behavior of z(x),since higher-order terms then become important. We will not discuss this case inthe note.

Page 88: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...
Page 89: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 9

Linear algebra

In this chapter, we introduce an important concept, matrix, insolving linear equations, and also discuss its basic properties.

9.1. Linear systems

The standard form of a linear equation in two variables is

(9.1.1) Ax+By = C

where A,B,C are constants, A,B are not both equal to 0, and x, y are the twovariables. We now consider two linear equations in two variables, i.e., the systemof two linear equations in two variables,

(9.1.2) Ax+By = C, Dx+ Ey = F,

where A,B,C,D,E, F are constants and x, y are the two variables. (We requirethat A,B and that D,E are not both equal to 0.) An example arising from rationalfunctions is

1

(y − a)(y − b)=

A

y − a+

B

y − b.

when we say that we “solve” (9.1.2) for x and y, we mean that we find anordered pair (x, y) that satisfies each equation of the system (9.1.2). Equivalently,a solution of (9.1.2) is the point of intersection of these two lines.

(1) The two lines have exactly one point of intersection. In this case, thesystem (9.1.2) has exactly one solution (Figure 9.1).

(2) The two lines are parallel and do not intersect. In this case, the system(9.1.2) has no solution (Figure 9.1).

Figure 9.1. Linear system of two linear equations in two vari-ables. The first figure indicates the two lines have exactly onepoint of intersection; the second figure indicates the two lines areparallel but not intersect; the third figure indicates the two linesare identical.

89

Page 90: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

90 9. LINEAR ALGEBRA

(3) The two lines are parallel and intersect. In this case, the system (9.1.2)has no solution (Figure 9.1).

Example 9.1.1. (Exactly one solution) Find the solution of

x+ y = 5, −1

2x+ y = 2.

Proof. From the first linear equation, we have y = 5− x and then

2 = y − 1

2x = (5− x)− 1

2x = 5− 3

2x;

hence x = 2 and y = 3. �

Example 9.1.2. (No solution) Find the solution of

3x− 2y = 2, 3x− 2y = −2.

Proof. From Figure 9.1, we have already known that there are no solutions.It can also be seen from the following:

2 = 3x− 2y = −2,

impossible!. �

Example 9.1.3. (Infinitely many solutions) Find the solution of

3x+ 4y = 12, 6x+ 8y = 24.

Proof. If (x, y) is a solution of the first equation, then

3x+ 4y = 12 =⇒ 2(3x+ 4y) = 2× 12 = 24;

thus (x, y) is a solution of the second equation. Conversely, if (x, y) is a solution ofthe second equation, then

6x+ 8y = 24 =⇒ 1

2(6x = 8y) =

1

2× 24 = 12;

thus (x, y) is a solution of the first equation. Hence the system has infinitely manysolutions {(t, 4− 2t) : t ∈ R}. �

A basic idea to solve system of two linear equations is

∗x+ ∗y = ∗∗x+ ∗y = ∗ =⇒ ∗x+ ∗y = ∗

∗y = ∗from which we can solve y by the second linear equation and then x by the firstlinear equation.

Example 9.1.4. Solve3x+ 2y = 8 (R1)2x+ 4y = 5 (R2)

Page 91: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.1. LINEAR SYSTEMS 91

Proof. By the above idea we have, eliminating x in the second equation,

(R1) 3x+ 2y = 8 (R3)2(R1)− 3(R2) − 8y = 1 (R4)

Hence y = −1/8 and

3x+ 2

(−1

8

)= 8 =⇒ 3x = 8 +

1

4=

33

4=⇒ x =

11

4.

Thus the solution is (11/4,−1/8). �

A 2× 2 matrix is a rectangular array of numbers

A =

(a11 a12

a21 a22

)The elements aij of the matrix A are called entries. In Example 9.1.4, we canform a 2× 2 matrix

A =

(3 22 4

)from (R1) and (R2), and another 2× 2 matrix

B =

(3 20 −8

).

We call B an upper triangular matrix. Our basic idea in solving linear system is totransform a 2× 2 matrix into an upper triangular 2× 2 matrix.

9.1.1. Solving systems of linear equations. We now consider system ofthree linear equations

a11x+ a12y + a13z = b1a21x+ a22y + a23z = b2a31x+ a32y + a33z = b3

A basic idea is

∗x+ ∗y + ∗z = ∗∗x+ ∗y + ∗z = ∗∗x+ ∗y + ∗z = ∗

=⇒∗x+ ∗y + ∗z = ∗

∗y + ∗z = ∗∗z = ∗

Example 9.1.5. Solve3x+ 5y − z = 10 (R1)2x− y + 3z = 9 (R2)4x+ 2y − 3z = −1 (R3)

Proof. We first eliminate x

(R1)2(R1)− 3(R2)2(R2)− (R3)

3x+ 5y − z = 10 (R4)13y − 11z = −7 (R5)−4y + 9z = 19 (R6)

and next eliminate y

(R4)(R5)

4(R5) + 13(R6)

3x+ 5y − z = 10 (R7)13y − 11z = −7 (R8)

73z = 219 (R9)

Page 92: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

92 9. LINEAR ALGEBRA

Solving equation (R0) for z yields z = 3; solving (R8) for y and substituting thevalue of z gives

y =1

13(−7 + 11z) =

1

13(−7 + 11× 3) = 2.

Finally, from (R7), we get x = 1. �

Example 9.1.6. (No solution) Solve

2x− y + z = 3 (R1)4x− 4y + 3z = 2 (R2)2x− 3y + 2z = 1 (R3)

Proof. We first eliminate x

(R1)2(R1)− (R2)(R1)− (R3)

2x− y + z = 3 (R4)2y − z = 4 (R5)2y − z = 2 (R6)

Equations (R5) and (R6) give us a contradiction. Hence the system has no solutions.�

Example 9.1.7. (Infinitely many solutions) Solve

x− 3y + z = 4 (R1)x− 2y + 3z = 6 (R2)

2x− 6y + 2z = 8 (R3)

Proof. We first eliminate x

(R1)(R2)− (R1)

(R1)− 12 (R3)

x− 3y + z = 4 (R4)y + 2z = 2 (R5)

0z = 0 (R6)

Thus we can take z to be any number t. Solving (R5) for y yields

y = 2− 2z = 2− 2t;

solving (R4) gives us

x = 4 + 3y − z = 4 + 3(2− 2t)− t = 10− 7t.

Hence the solution is the set {(x, y, z) : x = 10− 7t, y = 2− 2t, z = t, t ∈ R}. �

9.1.2. Matrices. We now introduce matrices in general forms.

Definition 9.1.8. A matrix is a rectangular array of numbers

(9.1.3) A =

a11 a12 · · · a1n

a21 a22 · · · a2n

......

. . ....

am1 am2 · · · amn

= (aij)1≤i≤m, 1≤j≤n

Page 93: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.1. LINEAR SYSTEMS 93

The elements aij of the matrix A are called entries. If the matrix has m rows andn columns, it is called m× n matrix.

If a matric has the same number of rows as columns, it is called a squarematrix. An m× 1 matrix is called a column vector and a 1× n matrix is calleda row vector. For example1 3 0

0 1 −15 4 3

,

274

,(1 3 0 5

)are 3 × 3 square matrix, 3 × 1 column vector, and 1 × 3 row vector, respectively.If A is a square matrix, then the diagonal line of A consists of the elementsa11, · · · , ann.

The matrix A in (9.1.3) can be thought of the coefficient matrix of the linearsystem

(9.1.4)

a11x1 + a12x2 + · · ·+ a1nxn = b1a21x1 + a22x2 + · · ·+ a2nxn = b2

· · ·am1x1 + am2x2 + · · ·+ amnxn = bm

To solve systems of linear equations with the use of matrices, we introduce the aug-mented matrix—the coefficient matrix of the linear system (9.1.4), augmented byan additional column representing the right-hand side of (9.1.4). The augmentedmatrix representing the linear system (9.1.4) is therefore

(9.1.5)

a11 a12 · · · a1n b1a21 a22 · · · a2n b2· · · · · · · · · · · · · · ·am1 am2 · · · amn bm

Example 9.1.9. Consider Example 9.1.5. The augmented matric is given by 3 5 −1 102 −1 3 94 2 −3 −1

(R1)(R2)(R3)

Then(R1)

2(R1)− 3(R2)2(R2)− (R3)

3 5 −1 100 13 −11 −70 −4 9 19

(R4)(R5)(R6)

and(R4)(R5)

4(R5) + 13(R6)

3 5 −1 100 13 −11 −70 0 73 219

(R7)(R8)(R9)

When a system has fewer equations than variables, we say that it is under-determined; when a system has more equations than variables, we say that it isoverdetermined.

Page 94: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

94 9. LINEAR ALGEBRA

Example 9.1.10. Solve the underdetermined system

2x+ 2y − z = 1 (R1)2x− y + z = 2 (R2)

Proof. [2 2 −1 12 −1 1 2

](R1)(R2)

We first eliminate x

(R1)(R1)− (R2)

[2 2 −1 10 3 −2 −1

]Translating this matrix block into a system of equations, we obtain

2x+ 2y − z = 13y − 2z = −1

It then follows that

y = −1

3+

2

3z

x =1

2(1− 2y + z) =

5

6− 1

6z.

By a dummy variable t, we get {(x, y, z) : x = 56 −

16 t, y = − 1

3 + 23 t, z = t, t ∈

R}. �

Example 9.1.11. Solve the following overdetermined system

2x− y = 1 (R1)x+ y = 2 (R2)x− y = 3 (R3)

Proof. We eliminate x

(R1)2(R2)− (R1)(R2)− (R3)

2x− y = 1 (R4)3y = 3 (R5)

2y = −1 (R6)

The equations (R5) and (R6) give us a contradiction. Hence this system has nosolutions. �

9.2. Matrices

Recall that an m× n matrix A is a rectangular array of numbers with m rowsand n columns:

A =

a11 a12 · · · a1n

a21 a22 · · · a2n

......

. . ....

am1 am2 · · · amn

= (aij)

Page 95: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.2. MATRICES 95

Definition 9.2.1. Suppose that A = (aij) and B = (bij) are two matrices. ThenA = B if and only if, aij = bij for all 1 ≤ i ≤ m and 1 ≤ j ≤ n.

9.2.1. Matrix operations. Suppose we have two m × n matrices A = (aij)and B = (bij).

Definition 9.2.2. We defineC := A+B

the sum of A and B, whose entries are

cij = aij + bij

for 1 ≤ i ≤ m and 1 ≤ j ≤ m.If c is a scalar, then cA is an m× n matrix with entries caij for 1 ≤ i ≤ m and

1 ≤ j ≤ n.

Clearly

(1) A+B = B +A,(2) (A+B) + C = A+ (B + C),(3) A+ 0 = A, where 0 is the zero matrix with entries 0.

Example 9.2.3. If

A =

(2 31 0

)B =

(0 1−1 −3

)C =

(1 00 3

)then

A+ 2B − 3C =

(−1 5−1 −15

)

Definition 9.2.4. Suppose that A = (aij) is an m×n matrix. Then the transposeof A, denoted by A′, is an n×m matrix with entries

a′ij := aji.

For example, if

A =

(1 2 34 5 6

)B =

(12

)C =

(3 4

)then

A′ =

1 42 53 6

B′ =(1 2

)C ′ =

(34

)Clearly

(4) (A+B)′ = A′ +B′,

Page 96: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

96 9. LINEAR ALGEBRA

(5) (A′)′ = A,(6) (kA)′ = kA′.

9.2.2. Matrix multiplication. We now give the definition of matrix multi-plication.

Definition 9.2.5. Suppose that A = (aij) is an m× ` matrix and B = (bij) is an`× n matrix. Then

C := AB

is an m× n matrix with

cij :=∑k=1

aikbkj = ai1b1j + ai2b2j + · · ·+ ai`b`j

for 1 ≤ i ≤ m and 1 ≤ j ≤ n.

For example, if

A =

(1 2 34 5 6

)B =

1 2 34 5 67 8 9

then C = AB is a 2× 3 matrix and

C =

(30 36 4266 81 96

)If A and B are 1× 1 matrix, then

A = (a), B = (b);

thus A and B can be viewed as two numbers. Note that

AB = (ab) = (ba) = BA.

However, AB = BA is not true for general matrices.

Example 9.2.6. Suppose

A =(2 1 −1

), B =

1−10

Then

AB = 1 6= BA =

2 1 −1−2 −1 10 0 0

Clearly

(7) (A+B)C = AC +BC,(8) A(B + C) = AB +AC,(9) (AB)C = A(BC),

(10) A0 = 0A = 0,(11) (AB)′ = B′A′.

Page 97: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.2. MATRICES 97

If A is a square matrix, we define

(9.2.1) Ak := Ak−1A = AAk−1 = A · · ·A︸ ︷︷ ︸k

.

For instance, A2 = AA, A3 = AAA, and so on.The identity matrix, denoted by In, is an n×n matrix with 1’s on its diagonal

line and 0’s elsewhere; that is,

(9.2.2) Im =

1 0 0 · · · 00 1 0 · · · 00 0 1 · · · 0...

......

. . ....

0 0 0 · · · 1

For example,

I1 = (1), I2 =

(1 00 1

), I3 =

1 0 00 1 00 0 1

Note that

(12) Ikn = In for any positive integer k.(13) AIn = ImA = A for any m× n matrix.

9.2.3. Matrix equations. The linear system (9.1.4) has the matrix (9.1.3).If we introduce

B =

b1b2...bm

, X =

x1

x2

...xn

then (9.1.4) can be written as

(9.2.3) AX = B.

If A,X,B are 1 × 1 matrices, then X = A−1B by (9.2.3). In general, we canalso obtain X = A−1B from (9.2.3), provided we can give a definition of A−1—theinverse matrix of A.

9.2.4. Inverse matrices. Suppose that A = (aij) is an n× n square matrix.If there exists an n× n square matrix B such that

(9.2.4) AB = BA = In,

then B is called the inverse matrix of A and is denoted by A−1. If A has an inversematrix, A is called invertible or nonsingular; if A does not have an inversematrix, A is called singular.

Example 9.2.7. Show that the 2× 2 matrix

A =

(1 20 −1

)is nonsingular.

Page 98: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

98 9. LINEAR ALGEBRA

Proof. We shall find a 2× 2 matrix B such that AB = BA = I2. Write

B =

(b11 b12

b21 b22

)and then(

1 00 1

)= I2 = AB =

(1 20 −1

)(b11 b12

b21 b22

)=

(b11 + 2b21 b12 + 2b22

−b21 −b22

).

Consequently,

b21 = 0, b22 = −1, b11 + 2b21 = 1, b12 + 2b22 = 0,

and we have

B =

(1 20 −1

).

Finally, we check that BA = I2:

BA =

(1 20 −1

)(1 20 −1

)=

(1 00 1

).

In this case, we have A−1 = B = A. However, A−1 is in general not equal to A. �

From Example 9.2.7, we see that for any given nonsingular matrix its inversematrix has the exact form.

Remark 9.2.8. (1) If A is invertible, then its inverse matrix is unique.

Proof. Suppose B and C are two inverse matrices of A. By the definition, wehave BA = In and AC = In. Hence

B = BIn = B(AC) = (BA)C = InC = C.

Thus B = C. �

(2) If A is a nonsingular 2× 2 matrix and A = A−1, then(1 00 1

)=

(a11 a12

a21 a22

)(a11 a12

a21 a22

)=

(a2

11 + a12a21 (a11 + a22)a12

a21(a11 + a22) a21a12 + a222

).

(a) If a11 + a22 = 0, then(1 00 1

)=

(−(a11a22 − a12a21) 0

0 −(a11a22 − a12a21)

)and a11a22 − a12a21 = −1. We call the number a11a22 − a12a21 the determinantof A:

(9.2.5) det(A) := a11a22 − a12a21, if A =

(a11 a12

a21 a22

).

(b) If a11 + a22 6= 0, then a12 = a21 = 0 and(1 00 1

)=

(a2

11 00 a2

22

);

Page 99: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.2. MATRICES 99

consequently, (a11, a22) = (1, 1) or (−1,−1). Hence

A =

(1 00 1

)= I2, or A =

(−1 00 −1

)= −I2.

In summary, if A is a nonsingular 2× 2 matrix and A = A−1, then

A = I2 or − I2 or

(a11 a12

a21 −a11

)with 1 = a2

11 + a12a21.

There are basic properties for inverse matrices.

Proposition 9.2.9. (1) If A is an inverse n× n matrix, then A−1 is also nonsin-gular and

(9.2.6) (A−1)−1 = A.

(2) If A and B are invertible n× n matrices, then

(9.2.7) (AB)−1 = B−1A−1.

Proof. (1) Since A is invertible, it follows that

AA−1 = A−1A = In.

This equation also says that A is the inverse matrix of A−1; that is A = (A−1)−1.(2) Let C = AB. We shall check that (B−1A−1)C = C(B−1A−1) = In. For

example,

(B−1A−1)C = (B−1A−1)(AB) = B−1(A−1A)B = B−1InB = B−1B = In.

Similarly we can check the second identity. �

We now try to find the inverse matrix of general 2× 2 matrices. Recall that if

A =

(a11 a12

a21 a22

)is a 2× 2 matrix, then its determinant is given by

det(A) := a11a22 − a21a12.

For any λ ∈ R we consider the matrix

A− λI2 =

(a11 − λ a12

a21 a22 − λ

);

then its determinant is given by

det(A− λI2) = (a11 − λ)(a22 − λ)− a12a21

= λ2 − (a11 + a22)λ+ (a11a22 − a12a21).

Define the trace of A by

(9.2.8) tr(A) := a11 + a22

the sum of diagonal line of A. Then

(9.2.9) det(A− λI2) = λ2 − tr(A)λ+ det(A).

Page 100: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

100 9. LINEAR ALGEBRA

If λ1, λ2 are two (possibly complex value) eigenvalues of the polynomial fA(λ) :=det(A− λI2), then

(λ− λ1)(λ− λ2) = det(A− λI2) = λ2 − tr(A)I + det(A).

Consequently,

(9.2.10) λ1 + λ2 = tr(A), λ1λ2 = det(A).

Proposition 9.2.10. (1) If A and B are two 2× 2 matrices, then

(9.2.11) tr(A+B) = tr(A) + tr(B), det(AB) = det(A) · det(B).

(2) If A is an invertible 2× 2 matrix, then det(A) 6= 0 and

(9.2.12) det(A−1) =1

det(A).

Proof. (1) Write

A =

(a11 a12

a21 a22

), B =

(b11 b12

b21 b22

).

Hence

A+B =

(a11 + b11 a12 + b12

a21 + a22 a22 + b22

), AB =

(a11b11 + a12b21 a11b12 + a12b22

a21b11 + a22b21 a21b12 + a22b22

);

we then get

tr(A+B) = (a11 + b11) + (a22 + b22) = (a11 + a22) + (b11 + b22) = tr(A) + tr(B).

On the other hand,

det(AB) = (a11b11 + a12b21)(a21b12 + a22b22)

− (a11b12 + a12b22)(a21b11 + a22b21)

= a11a21b11b12 + a12a21b21b12 + a11a22b11b22 + a12a22b21b22

− a11a21b12b11 − a12a21b22b11 − a11a22b12b21 − a12a22b22b21

= a12a21(b21b12 − b22b11) + a11a22(b11b22 − b12b21)

= (a11a22 − a12a21)(b11b22 − b12b21)

= det(A) · det(B).

(2) By AA−1 = I2 and (1) we have

det(A) · det(A−1) = det(I2) = 1

and hence det(A−1) = 1/ det(A). �

Write

A =

(a11 a12

a21 a22

), A−1 = B =

(b11 b12

b21 b22

)By Proposition 9.2.10, det(A) 6= 0. From AB = I2 we have(

1 00 1

)= I2 = AB =

(a11b11 + a12b21 a11b12 + a12b22

a21b11 + a22b21 a21b12 + a22b22

).

Page 101: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.2. MATRICES 101

We get four equations:

a11b11 + a12b21 = 1, (R1)a21b11 + a22b21 = 0, (R2)

anda11b12 + a12b22 = 0, (R3)a21b12 + a22b22 = 1. (R4)

From a11(R2)− a21(R1) we find that

det(A)b21 = −a21;

since det(A) 6= 0, it follows that

b21 = − a21

det(A).

Substituting b21 into (R1) and solving for b11, we obtain

b11 =a22

det(A).

Similarly, using (R3) and (R4), we arrive at

b12 = − a12

det(A), b22 =

a11

det(A).

Theorem 9.2.11. If

A =

(a11 a12

a21 a22

)is invertible, then

(9.2.13) A−1 =1

det(A)

(a22 −a12

−a21 a11

)Consequently, a 2× 2 matrix A is invertible if and only if det(A) 6= 0.

Example 9.2.12. Find the inverse of

A =

(2 51 3

)Proof. By Theorem 9.2.11, since det(A) = 2× 3− 1× 5 = 1, A is invertible.

Using (9.2.13) we have

A−1 =1

1

(3 −5−1 2

)=

(3 −5−1 2

)�

Example 9.2.13. Check whether

A =

(2 61 3

)is invertible.

Page 102: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

102 9. LINEAR ALGEBRA

Proof. Since det(A) = 2× 3− 1× 6 = 0, A is not invertible. �

Any system of linear equations can be written as

(9.2.14) AX = B.

In a linear system of n equations in n unknowns, A is an n × n matrix. If A isinvertible, then

(9.2.15) A−1B = A−1(AX) = (A−1A)X = InX = X

by (9.2.14).

Example 9.2.14. (Example 9.1.4 revisited) Solve

3x+ 2y = 82x+ 4y = 5

Proof. Let

A =

(3 22 4

), X =

(xy

), B =

(85

).

Then AX = B. Since det(A) = 12− 4 = 8 6= 0, it follows that A is invertible and

A−1 =1

det(A)

(4 −2−2 3

)=

(12 − 1

4− 1

438

)Using (9.2.15) implies

X = A−1B =

(12 − 1

4− 1

438

)(85

)=

(4− 5

4−2 + 15

8

)=

(114− 1

8

).

Consider a special case of (9.2.14):

(9.2.16) AX = 0 =

(00

), A =

(a11 a12

a21 a22

), X =

(xy

).

Clearly that X = 0 is a solution of (9.2.16), called the trivial solution. If AX = 0has a solution X 6= 0, then X is called a nontrivial solution.

Theorem 9.2.15. Suppose that A is a 2×2 matrix, and X is a 2×1 matrix. Thenthe equation AX = 0 has a nontrivial solution if and only if det(A) = 0.

Proof. If A is invertible, then det(A) 6= 0 and X = A−10 = 0. Hence X 6= 0if and only if det(A) = 0. �

Example 9.2.16. Let

A =

(a 32 1

).

Page 103: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.3. LINEAR MAPS, EIGENVECTORS, AND EIGENVALUES 103

Figure 9.2. Vector

Determine a so that AX = 0 has at least one nontrivial solution and find thenontrivial solution(s).

Proof. Since det(A) = a−6, it follows that AX = 0 has at least one nontrivialsolution if and only if a = 6. In this case,(

6 32 1

)(xy

)=

(00

);

thus6x+ 3y = 0, 2x+ y = 0,

or y = −2x. Hence the system has infinitely many solutions, namely

{(x, y) : x = t, y = −2t, t ∈ R}.�

9.3. Linear maps, eigenvectors, and eigenvalues

Let V be the space of all 2×1 vectors. Then any 2×2 matrix A can be viewedas a map on V :

x 7−→ Ax,

where x is a 2× 1 matrix or 2× 1 column vector. We can compute A2x = A(Ax),etc. Note that

(1) A(x + y) = Ax +Ay, and(2) A(λx) = λ(Ax) for any scalar λ.

We then call the map x 7→ Ax is linear.

9.3.1. Graphical representation of vectors. A vector x is a 2×1 matrix,

x =

(x1

x2

).

A vector can be viewed as a point (x1, x2) in the x1x2-plane. For example the

vector x =

(23

)is represented in Figure 9.2.

Page 104: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

104 9. LINEAR ALGEBRA

Figure 9.3. Parallelogram law

The length of x is defined by

(9.3.1) r := |x| :=√x2

1 + x22,

and the angle α counterclockwise formed by the vector x is

(9.3.2) tanα :=x2

x1.

We call (r, α) the polar coordinate system of x:

(9.3.3) x1 = r cosα, x2 = r sinα.

Example 9.3.1. Consider the vector x =

(23

)in Figure 9.2. Then

r = |x| =√

22 + 32 =√

13, α = tan−1 2

3.

Consider two vectors

a =

(12

), b =

(4−1

)in Figure 9.3. Then

a + b =

(51

)= b + a.

Proposition 9.3.2. Let x =

(x1

x2

)and y =

(y1

y2

). Then

x + y =

(x1 + y1

x2 + y2

).

If a is a scalar, then

ax =

(ax1

ax2

).

The length of ax is equal to |a||x|.

Page 105: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.3. LINEAR MAPS, EIGENVECTORS, AND EIGENVALUES 105

9.3.2. Linear maps. A linear map on plane has the form

x =

(x1

x2

)7−→ Ax =

(a11 a12

a21 a22

)(x1

x2

).

(1) The identity map is represented by I2:

(9.3.4)

(x1

x2

)7−→

(1 00 1

)(x1

x2

)=

(x1

x2

).

Thus the identity map leaves the vector x unchanged.

(2) Given a vector x =

(x1

x2

). The vector reflecting the x1-axis is(

x1

−x2

)=

(1 00 −1

)(x1

x2

).

Hence the linear map

(9.3.5)

(x1

x2

)7−→

(1 00 −1

)(x1

x2

)=

(ax1

bx2

)reflects vectors about x1-axis.

(3) Given a vector x =

(x1

x2

). The vector reflecting the x2-axis is(

−x1

x2

)=

(−1 00 1

)(x1

x2

).

Hence the linear map

(9.3.6)

(x1

x2

)7−→

(−1 00 1

)(x1

x2

)=

(ax1

bx2

)reflects vectors about x2-axis.

(3) A diagonal map is given by

(9.3.7)

(x1

x2

)7−→

(a 00 b

)(x1

x2

)=

(ax1

bx2

).

For example, (2 00 − 1

2

)(12

)=

(2−1

).

This map stretches the first coordinate by a factor of 2 and contracts the secondcoordinates by a factor of 1/2. The minus sign in front of 1/2 corresponds toreflecting the second coordinate about the x1-axis. This can be seen as follows:(

2 00 − 1

2

)=

(2 00 1

2

)(1 00 −1

).

(3) Rotation. Given a vector x =

(x1

x2

). Then

x =

(r cosαr sinα

).

If we rotate x by an angle θ (θ > 0, the rotation is counterclockwise; if θ < 0, therotation is clockwise by the angle |θ|), then we get a new vector(

r cos(θ + α)r sin(θ + α)

)=

(r(cos θ cosα− sin θ sinα)r(sin θ cosα+ cos θ sinα)

)=

(cos θ − sin θsin θ cos θ

)(r cosαr sinα

);

Page 106: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

106 9. LINEAR ALGEBRA

thus

(9.3.8)

(x1

x2

)7−→

(cos θ − sin θsin θ cos θ

)(x1

x2

)=: Rθ

(x1

x2

).

Clearly

(9.3.9) det(Rθ) = cos2 θ + sin2 θ = 1

and

(9.3.10) R−1θ =

(cos θ sin θ− sin θ cos θ

)= R−θ.

9.3.3. Eigenvalues and eigenvectors. Recall that given a 2× 2 matrix X,for any vector x, we get a new vector Ax. The simplest relation between those twovectors is

(9.3.11) Ax = λx

for some λ ∈ R. For example, (1 00 1

)x = x.

Definition 9.3.3. Assume that A is a 2 × 2 matrix. A nonzero vector x thatsatisfies the equation (9.3.11),

Ax = λx

is an eigenvector of A, and the number λ is an eigenvalue of A.

Note that

(i) We assume that the vector x in Definition 9.3.3 is different from the zerovector. The zero vector x = 0 always satisfies the equation Ax = λx andthus would not be special.

(ii) The eigenvalue λ can be zero and however can be even be a complexnumber.

(iii) The action of A on eigenvectors produces a particularly simple form: Ifwe apply A to an eigenvector x (i.e., if we compute Ax), the result is aconstant multiple of x.

(iv) If x is an eigenvector of A with an eigenvalue λ,then

Ax = λx;

for any nonzero number a we see that ax is also an eigenvector of A withthe same eigenvalue λ. Hence, we have infinitely many eigenvectors to agiven eigenvalue.

(v) If x is an eigenvector of A, then from (9.3.11) we have

0 = Ax− λx = (A− λI2)x;

by Theorem 9.2.15, since x is nonzero, we have det(A − λI2) = 0. By(9.2.9) we get

(9.3.12) λ2 − tr(A)λ+ det(A) = 0.

Page 107: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.3. LINEAR MAPS, EIGENVECTORS, AND EIGENVALUES 107

Corollary 9.3.4. If x is an eigenvector of A with an eigenvalue λ, then λ satisfiesthe quadratic equation

λ2 − tr(A)λ+ det(A) = 0.

We now discuss some examples.

Example 9.3.5. Find all eigenvalues and eigenvectors of

A =

(1 23 2

)Proof. Let λ be an eigenvector of A. Then

λ2 − tr(A)λ+ det(A) = 0.

Sincetr(A) = 1 + 2 = 3, det(A) = 1× 2− 3× 2 = −4,

it follows thatλ2 − 3λ− 4 = 0 =⇒ (λ+ 1)(λ− 4) = 0.

Hence λ1 = −1 and λ2 = 4.(1) λ1 = −1. In this case we have

0 = (A+ I2)x =

(2 23 3

)(x1

x2

);

thusx1 + x2 = 0

and the eigenvectors associated to λ1 = −1 are of the forms

span

(1−1

):=

{(t−t

): t ∈ R

}=

{t

(1−1

): t ∈ R

}.

Define a line l1 represented or spanned by the vector x1 =

(1−1

)by

l1 = {(x1, x2) ∈ R2 : x1 + x2 = 0} = span

(1−1

).

We say a line l is invariant under the matrix A, if Ax ∈ l whenever x ∈ l. Then l1is invariant under the matrix A: for any point (x1, x2) ∈ l1, the associated vector

x =

(x1

x2

)satisfies Ax = −1x, and hence Ax ∈ l1.

(2) λ2 = 4. In this case we have

0 = (A− 4I2)x =

(−3 23 −2

)(x1

x2

);

thus3x1 − 2x2 = 0

and the eigenvectors associated to λ2 = 4 are of the forms

span

(23

):=

{(t

3t/2

): t ∈ R

}=

{(2s3s

): s ∈ R

}=

{s

(23

): s ∈ R

}.

Page 108: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

108 9. LINEAR ALGEBRA

Define a line l2 represented or spanned by the vector x2 =

(23

)by

l2 = {(x1, x2) ∈ R2 : 3x1 − 2x2 = 0} = span

(23

).

As in (1), l2 is invariant under the matrix A. �

The second example is about λ1 = λ2.

Example 9.3.6. Find eigenvalues and eigenvectors of

A =

(1 −11 3

).

Proof. Let λ be an eigenvalue of A. Then

λ2 − tr(A)λ+ det(A) = 0.

Since tr(A) = 1 + 3 = 4 and det(A) = 1× 3− 1× (−1) = 4, it follows that

0 = λ2 − 4λ+ 4 = (λ− 2)2.

Hence λ = λ1 = λ2 = 2 and

0 = (A− λI2)x =

(−1 −11 1

)(x1

x2

).

Thusx1 + x2 = 0;

the eigenvectors associated to λ = 2 are of the forms

span

(1−1

)=

{(t−t

): t ∈ R

}=

{t

(1−1

): t ∈ R

}.

If we define l = {(x1, x2) ∈ R2 : x1 + x2 = 0}, then l is invariant under the matrixA. �

The third example is about zero eigenvalue.

Example 9.3.7. Find the eigenvalues and eigenvectors of

A =

(1 11 1

).

Proof. If λ is an eigenvalue of A, then

λ2 − 2λ+ 0 = 0 =⇒ λ(λ− 2) = 0, .

Hence λ1 = 0 and λ2 = 2.(1) λ1 = 0. In this case, we have

0 = (A− λ1I2)x =

(1 11 1

)(x1

x2

);

Page 109: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.3. LINEAR MAPS, EIGENVECTORS, AND EIGENVALUES 109

thus x1 + x2 = 0 and the eigenvectors associated to λ1 = 0 are of the forms

span

(1−1

)=

{(t−t

): t ∈ R

}=

{t

(1−1

): t ∈ R

}.

(2) λ2 = 2. In this case we have

0 = (A− 2I2)x =

(−1 1−1 1

)(x1

x2

);

thus x1 = x2, and the eigenvectors associated to λ2 = 2 are of the forms

span

(11

)=

{(tt

): t ∈ R

}=

{t

(11

): t ∈ R

}.

The fourth example is about complex eigenvalues.

Example 9.3.8. Find eigenvalues of

A =

(−2 −13 1

).

Proof. Since tr(A) = −2 + 1 = −1 and det(A) = −2 × 1 − 3 × (−1) = 1, itfollows that the eigenvalue λ satisfies

λ2 + λ+ 1 = 0.

Hence

λ1 =−1− i

√3

2, λ2 =

−1 + i√

3

2.

This example suggests

tr(A) < 0 and det(A) > 0⇐⇒ the real parts of λ1 and λ2 are negative.

Actually, this result holds in general. �

Suppose λ1 = a1 + ib1 and λ2 = a2 + ib2 are two complex eigenvalues of a 2× 2matrix A. Then

tr(A) = λ1 + λ2 = (a1 + a2) + i(b1 + b2),

det(A) = λ1λ2 = (a1a2 − b1b2) + i(a1b2 + a2b1).

Since det(A) and tr(A) are real, it follows that

a1b2 + a2b1 = 0, b1 + b2 = 0.

Hence

b2 = −b1, b1(a2 − a1) = 0.

(1) If b1 6= 0, then a1 = a2. Write

b := b1, a := a1;

we obtain

λ1 = a+ ib, λ2 = a− ib,

Page 110: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

110 9. LINEAR ALGEBRA

so that

tr(A) = 2a, det(A) = a2 + b2 ≥ a2.

(2) If b1 = 0, then b2 = 0 and

λ1 = a1, λ2 = a2.

Hence

tr(A) = a1 + a2, det(A) = a1a2.

Theorem 9.3.9. Let A be a 2 × 2 matrix with eigenvalues λ1 and λ2. Then thereal parts of λ1 and λ2 are negative if and only if

tr(A) < 0 and det(A) > 0.

Example 9.3.10. Show that both of eigenvalues of

A =

(−1 −31 −2

)have negative real part.

Proof. Since tr(A) = −1−2 = −3 and det(A) = −1×(−2)−1×(−3) = 5 > 0,it follows from Theorem 9.3.9 that the real parts of λ1 and λ2 are negative. �

Example 9.3.11. Let

A =

(−2 52 3

)Without explicitly computing the eigenvalues of A, decide whether the real partsof both eigenvalues are negative.

Proof. Since tr(A) = −2+3 = 1 > 0 and det(A) = −2×3−2×5 = −16 < 0,we conclude that the real parts of both eigenvalues are not negative. Actually,λ1 = (1−

√65)/2 and λ2 = (1 +

√65)/2. �

9.4. Analytic geometry

The plane can be thought of the set of all points (x1, x2) with x1 ∈ R andx2 ∈ R. Define

R2 := {(x1, x2) : x1 ∈ R2, x2 ∈ R}.

Thus the notion R2 represents the plane. Similarly, we formally define

(9.4.1) Rn := {(x1, x2, · · · , xn) : x1 ∈ R, x2 ∈ R, · · · , xn ∈ R}.

For example, R3 is three-dimensional space, and R4 is the space and time.

Page 111: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.4. ANALYTIC GEOMETRY 111

Figure 9.4. Vectors in R3

Definition 9.4.1. A vector in Rn is an ordered n-tuple

x =

x1

x2

...xn

of real numbers. The numbers x1, x2, · · · , xm are called the components of x.

The vector x in Rn can be represented by directed segments with initial point(0, 0, · · · , 0) and end point (x1, x2, · · · , xn).

Definition 9.4.2. If

x =

x1

x2

...xn

, y =

y1

y2

...yn

,

and a ∈ R, we define

x + y =

x1 + y1

x2 + y2

...xn + yn

, ax =

ax1

ax2

...axn

.

Given two points A = (a1, · · · , an) and B = (b1, · · · , bn) in Rn. Then we canform two vectors

−→OA =

a1

a2

...an

,−−→OB =

b1b2...bn

.

Page 112: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

112 9. LINEAR ALGEBRA

Using parallelogram law, we have−→OA+

−−→AB =

−−→OB.

Hence

(9.4.2)−−→AB =

−−→OB −

−→OA =

b1 − a1

b2 − a2

...bn − an

.

We call (9.4.2) the vector representation of−−→AB.

Example 9.4.3. Find the vector representation of−−→AB when A = (2,−1) and

B = (1, 3).

Proof. The vector representation of−−→AB is given by

−−→AB =

(1− 2

3− (−1)

)=

(−14

).

If we shift the vector−−→AB to the origin, its tip ends at (−1, 4), which confirms that

the vector representation of−−→AB is

(−14

). �

9.4.1. Length of vector. The length of a vector

x =

x1

x2

...xn

is

(9.4.3) |x| :=√x2

1 + x22 + · · ·+ x2

n.

Example 9.4.4. Find the length of

x =

1−34

.

Proof. The length of x is

|x| =√

12 + (−3)2 + 42 =√

26.

If we define

x :=1

|x|x,

then

x =1√26

1−34

=

1√26

− 3√26

4√26

Page 113: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.4. ANALYTIC GEOMETRY 113

and |x| =√

126 + 9

26 + 1626 = 1. �

If x is a nonzero vector, then we call

(9.4.4) x :=1

|x|x

the normalization of x; since |x| = 1, we also call x the unit vector in thedirection of x.

Example 9.4.5. Normalize the vector

x =

3−66

.

Proof. Since |x| =√

32 + (−6)2 + 62 =√

81 = 9, we get

x =1

|x|x =

1

9

3−66

=

1/3−2/32/3

.

9.4.2. Dot product. Given two vectors

x =

x1

x2

...xn

, y =

y1

y2

...yn

.

The scalar product or dot product is defined by

(9.4.5) x · y = x′y =

n∑i=1

xiyi = x1y1 + x2y2 + · · ·+ xnyn.

Example 9.4.6. Find the dot product of

x =

231

, y =

−120

.

Proof. x · y = 2× (−1) + 3× 2 + 1× 0 = −2 + 6 = 4. �

When y = x, we have

(9.4.6) x · x =

n∑i=1

x2i = |x|2 =⇒ |x| =

√x · x.

Page 114: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

114 9. LINEAR ALGEBRA

Figure 9.5. The angle between x and y

Theorem 9.4.7. For any three vectors x,y, z, we have

x · y = y · x,x · (y + z) = x · y + x · z.

We now discuss the angle between two vectors x and y. Using the law ofcosines, we find that

(9.4.7) |x− y|2 = |x|2 + |y|2 − 2|x||y| cos θ,

where θ is the angle between x and y. Since

|x− y|2 = (x− y) · (x− y)

= x · x− x · y − y · x + y · y= |x|2 − 2x · y + |y|2,

it follows from (9.4.7) that

|x|2 + |y|2 − 2|x||y| cos θ = |x|2 − 2x · y + |y|2

and hence

(9.4.8) x · y = |x||y| cos θ =⇒ θ = cos−1

(x · y|x||y|

).

Example 9.4.8. Find the angle between

x =

(11

), y =

(−11

).

Proof. Since |x| = |y| =√

2 and x · y = 0, we get

θ = cos−1

(x · y|x||y|

)= cos−1(0) = 90◦.

Thus x is perpendicular to y. �

Page 115: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.4. ANALYTIC GEOMETRY 115

Figure 9.6. Vector equation of a line in plane

In general, we have

Theorem 9.4.9. x and y are perpendicular if and only if x · y = 0.

The coordinate axes of R2 are

(9.4.9) e1 =

(10

), e2 =

(01

).

These vectors are unit, i.e., |e1| = |e2 = 1, and

e1 · e2 = 0 =⇒ e1 ⊥ e2.

For any vector

x =

(x1

x2

)we have

x =

(x1

x2

)= x1

(10

)+ x2

(01

)= x1e1 + x2e2.

Example 9.4.10. Find y =

(y1

y2

)so that y is perpendicular to x =

(12

).

Proof. From x · y = 0, we have

y1 + 2y2 = 0.

Hence y is of the form{(−2tt

): t ∈ R

}=

{t

(−21

): t ∈ R

}.

Page 116: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

116 9. LINEAR ALGEBRA

Figure 9.7. Vector equation of a plane in space

9.4.3. Lines in planes. Given a vector n =

(ab

)and a point P0 = (x0, y0),

we want to a line l passing P0 and perpendicular to n. Let

r0 =

(x0

y0

)and choose a point P = (x, y) on this line l. Write

r =

(xy

);

then

(9.4.10) n · (r − r0) = 0

which is called the vector equation of a line in the plane. Consequently,

(9.4.11) 0 =(a b

)(x− x0

y − y0

)= a(x− x0) + b(y − y0)

which is called the scalar equation of this line.

The line through (x0, y0) and perpendicular to

(ab

)has the equation

(9.4.12) a(x− x0) + b(y − y0) = 0.

Example 9.4.11. Find the equation of the line through (4, 3) and perpendicular

to

(12

).

Proof. 0 = 1(x− 4) + 2(y − 3) = x+ 2y − 10. �

Page 117: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.4. ANALYTIC GEOMETRY 117

9.4.4. Planes in space. Given a point (x0, y0, z0) and a vector n =

abc

,

we want to find a plane that passes through (x0, y0, z0) and is perpendicular to n.Take a point (x, y, z) on this plane; write

r0 =

x0

y0

z0

, r =

xyz

.

Then

(9.4.13) n · (r − r0) = 0

which is called the vector equation of a plane. Consequently,

(9.4.14) 0 =(a b c

)x− x0

y − y0

z − z0

= a(x− x0) + b(y − y0) + c(z − z0)

which is called the scalar equation of a plane.

The plane through (x0, y0, z0) and perpendicular to n =

abc

has the equation

(9.4.15) a(x− x0) + b(y − y0) + c(z − z0) = 0.

Example 9.4.12. Find the equation of the plane in R3 through (2, 0, 3) and per-

pendicular to

−141

.

Proof. 0 = −1(x− 2) + 4(y − 0) + 1(z − 3) = −x+ 4y + z − 1. �

9.4.5. Parametric equations of lines. Given a point P0 = (x0, y0) and a

vector u =

(u1

u2

), we want to find the line that goes through P0 in the direction of

u. For a point P = (x, y), we have−−→OP =

−−→OP0 +

−−→P0P and

−−→PP0 = tu, t ∈ R.

Hence (x− x0

y − y0

)= t

(u1

u2

)which is called the parametric equation of a line.

The line through (x0, y0) in the direction of

(u1

u2

)has the equation

(9.4.16) x = x0 + tu1, y = y0 + tu2.

Page 118: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

118 9. LINEAR ALGEBRA

Figure 9.8. Parametric equation of a line in plane

Example 9.4.13. Find the parametric equation of the line in the xy-plane thatgoes through the points (−1, 2) and (3, 5).

Proof. Since

u =

(3− (−1)

5− 2

)=

(43

),

it follows thatx = −1 + 4t, y = 2 + 3t.

Example 9.4.14. Find a parametric form of the line in standard form 2x−3y+1 =0.

Proof. From y = (2x+ 1)/3, we have

x = t, y =2

3t+

1

3.

Another way is

x = 3t+ 1, y =2

3(3t+ 1) +

1

3= 2t+ 1.

Given a point P0 = (x0, y0, z0) and a vector n =

u1

u2

u3

, we want to find the

line in R3 that goes through P0 in the direction of u. As before, we have

Page 119: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

9.4. ANALYTIC GEOMETRY 119

Figure 9.9. Parametric equation of a line in space

The line through (x0, y0, z0) in the direction of

u1

u2

u3

has the equation

(9.4.17)

xyz

=

x0

y0

z0

+ t

u1

u2

u3

which is called the parametric equation of a line.

Example 9.4.15. Find the parametric equation of the line in xyz-space that goesthrough the points (1,−1, 3) and (2, 4,−1).

Proof. Since

u =

2− 14− (−1)−1− 3

=

15−4

,

it follows thatx = 2 + t, y = 4 + 5t, z = −1− 4t

for t ∈ R, orx = 1 + t, y = −1 + 5t, z = 3− 4t

for t ∈ R. �

Page 120: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...
Page 121: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 10

Multi-variable calculus

In this chapter, we discuss differential calculus or functions ofmore than one variable.

10.1. Limits and continuity

Recall an example of functions of one variable:

f : [0, 4]→ R, x 7→√x.

In differential equations, we have met with functions of two variable:

dy

dx= e3xy.

If we define g(x, y) := e3xy, then g(x, y) is a function of two variable. However, inthis example, y depends on x, since y = y(x) is a function of x. Hence, g(x, y) =g(x, y(x)) is a function of one variable.

10.1.1. Functions of more independent variables. In general, a functionof two or more variables can be defined as follows.

Definition 10.1.1. Suppose D ⊂ Rn. Then a real-value function f on D assignsa real number to each element in D, and we write

f : D → R, (x1, · · · , xn) 7→ f(x1, · · · , xn).

The set D is the domain of the function f , and the set

{w ∈ R : f(x1, · · · , xn) = w for some (x1, · · · , xn) ∈ D}is the range of the function f .

If a function f depends on just two independent variables, we will often denotethe independent variables by x and y, and write f(x, y). In the case of threevariables, we will often write f(x, y, z).

Example 10.1.2. Evaluate the function

f(x, y, z) =xy

z2

at the points (2, 3,−1) and (−1, 2, 3).

121

Page 122: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

122 10. MULTI-VARIABLE CALCULUS

Figure 10.1. f(x, y) = x2 + y2

Proof. Since f(x, y, z) lists the independent variables in the order x, y, z, wejust substitute the points into f(x, y, z). For example

f(2, 3,−1) =2× 3

(−1)2= 6.

Similarly, f(−1, 2, 3) = (−1)× 2/32 = −2/9. �

Example 10.1.3. Evaluate the function

f(x, y, z) =√x2 − 6y + z

at (3,−1, 1).

Proof. f(3,−1, 1) =√

32 − 6× (−1) + 1 =√

16 = 4. �

Let D = {(x, y) : |x| ≤ 5, |y| ≤ 5} and

f : D → R, (x, y) 7→ x2 + y2.

The domain and the range of f is graphed in Figure 10.1.

Example 10.1.4. Find the largest possible domain of the function

f(x, y) =√y2 − x.

Proof. Since y2 − x ≥ 0, we must have that the domain is D = {(x, y) :y2 − x ≥ 0}. �

Page 123: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.1. LIMITS AND CONTINUITY 123

Definition 10.1.5. If f is a function of two independent variables with domainD, then the graph of f is the set of all points (x, y, z) such that z = f(x, y) for(x, y) ∈ D. That is, the graph of f is the set

(10.1.1) graph(f) = {(x, y, z) : z = f(x, y), (x, y) ∈ D}.

For example, the graph of f(x, y) in Example 10.1.4 is

graph(f) ={

(x, y,√y2 − x) : (x, y) ∈ D

}where D = {(x, y) : y2 − x ≥ 0}.

Definition 10.1.6. Suppose that f : D → R, D ⊂ R2. Then the level curvesof f comprise the set of points (x, y) in the xy-plane where the function f has aconstant value; that is, f(x, y) = c.

The level curves of f are graphs in R2.

Example 10.1.7. Set D = {(x, y) : x2 + y2 ≤ 4}. Compare the level curves of

f(x, y) = 4− x2 − y2, (x, y) ∈ Dand

g(x, y) =√

4− x2 − y2, (x, y) ∈ D.

Proof. The level curves of f and g are

x2 + y2 = 4− c, x2 + y2 = 4− c2.If c = 2, then the level curves of f and g are

x2 + y2 = 2, x2 + y2 = 0.

10.1.2. Limits. We say that the “limit of f(x, y) as (x, y) approaches (x0, y0)is equal to L” if f(x, y) can be made arbitrarily close to L whenever the point (x, y)is sufficiently close (but not equal) to the point (x0, y0). We denote this by

(10.1.2) lim(x,y)→(x0,y0)

f(x, y) = L.

We now give the formal definition of limits. An open disk with radius rcentered at (x0, y0) ∈ R2 is the set

(10.1.3) Br(x0, y0) :={

(x, y) ∈ R2 :√

(x− x0)2 + (y − y0)2 < r}.

A closed disk with radius r centered at (x0, y0) ∈ R2 is the set

(10.1.4) Br(x0, y0) :={

(x, y) ∈ R2 :√

(x− x0)2 + (y − y0)2 ≤ r}.

Page 124: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

124 10. MULTI-VARIABLE CALCULUS

Definition 10.1.8. The limit of f(x, y) as (x, y) approaches (x0, y0), denoted by

lim(x,y)→(x0,y0)

f(x, y)

is the number L such that, for every ε > 0, there exists a δ > 0 so that

|f(x, y)− L| < ε whenever (x, y) ∈ Bδ(x0, y0)− {(x0, y0)}.

Example 10.1.9. Let f(x, y) = x2 + y2. Prove

lim(x,y)→(0,0)

f(x, y) = 0.

Proof. Fix a number ε > 0. We want to find a δ > 0 so that

|f(x, y)− 0| < ε

whenever (x, y) ∈ Bδ(0, 0)− {(0, 0)}. Define δ =√ε. In this situation,

0 <√x2 + y2 < δ =

√ε =⇒ 0 < x2 + y2 < ε

and hence |f(x, y)| < ε. �

We can extend the limit laws to the two-dimensional case.

Theorem 10.1.10. If a is a constant and if

lim(x,y)→(x0,y0)

f(x, y) = L, lim(x,y)→(x0,y0)

g(x, y) = L2

where L1 and L2 are real numbers, then

(1) (Addition rule)

lim(x,y)→(x0,y0)

[f(x, y) + g(x, y)] = lim(x,y)→(x0,y0)

f(x, y) + lim(x,y)→(x0,y0)

g(x, y).

(2) (Constant-factor rule)

lim(x,y)→(x0,y0)

af(x, y) = a lim(x,y)→(x0,y0)

f(x, y).

(3) (Multiplication rule)

lim(x,y)→(x0,y0)

f(x, y)g(x, y) =

[lim

(x,y)→(x0,y0)f(x, y)

] [lim

(x,y)→(x0,y0)g(x, y)

].

(4) (Quotient rule)

lim(x,y)→(x0,y0)

f(x, y)

g(x, y)=

lim(x,y)→(x0,y0) f(x, y)

lim(x,y)→(x0,y0) g(x, y)

provided that L2 6= 0.

Page 125: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.1. LIMITS AND CONTINUITY 125

Example 10.1.11. Compute

lim(x,y)→(0,0)

(x2 + y2), lim(x,y)→(−1,2)

x2y, lim(x,y)→(1,2)

(x2y+ 3x), lim(x,y)→(2,0)

4y + 2x

x2 + 2xy − 3.

Proof. The answers are 0, 2, 5, 4. �

We now consider the limits that do not exist. In the one-dimensional case,there were only two ways in which we could approach a number: from the left orfrom the right. If the two limits were different, we said that the limit did not exist.

In two dimensions, there are many more ways that we can approach the point(x0, y0), namely, by any curve in the xy-plane that ends up at the point (x0, y0).We call such curve paths.

Proposition 10.1.12. If f(x, y) approaches L1 as (x, y)→ (x0, y0) along path C1

and f(x, y) approaches L2 as (x, y)→ (x0, y0) along path C2, and if L1 6= L2, thenlim(x,y)→(x0,y0) f(x, y) does not exist.

A typical path is a line or a parabola.

Example 10.1.13. Show that

lim(x,y)→(0,0)

x2 − y2

x2 + y2

does not exist.

Proof. Consider the line Lm : y = mx. Then

limx→0

f(x,mx) = limx→0

x2 −m2x2

x2 +m2x2=

1−m2

1 +m2.

If m = 0, then the above limit is 1; if m = 1, then the above limit is 0. Since 1 6= 0,it follows that lim(x,y)→(0,0) f(x, y) does not exist. �

Example 10.1.14. Show that

lim(x,y)→(0,0)

4xy

xy + y3

does not exist.

Proof. For any line y = mx, we have

limx→0

f(x,mx) = limx→0

4mx2

mx2 +m3x3= limx→0

4

1 +m2x= 0.

We now consider a parabola x = y2. Then

limy→0

f(y2, y) = limy→0

4y3

y3 + y3= 2 6= 4.

Page 126: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

126 10. MULTI-VARIABLE CALCULUS

Hence lim(x,y)→(0,0) f(x, y) does not exist. �

10.1.3. Continuity. The definition of continuity is also analogous to that inthe one-dimensional case.

Definition 10.1.15. A function f(x, y) is continuous at (x0, y0) if the followingholds:

(1) f(x, y) is defined at (x0, y0),(2) the limit

lim(x,y)→(x0,y0)

f(x, y)

exists, and(3) we have

lim(x,y)→(x0,y0)

f(x, y) = f(x0, y0).

For example, the function f(x, y) = 2 + x2 + y2 is continuous at (0, 0).

Example 10.1.16. Show that

f(x, y) =

{x2−y2x2+y2 , (x, y) 6= (0, 0),

0, (x, y) = (0, 0)

is discontinuous at (0, 0).

Proof. By Example 10.1.13, the limit lim(x,y)→(0,0)x2−y2x2+y2 does not exist,

hence the function is discontinuous at (0, 0). �

Consider the function

h(x, y) = ex2+y2 .

If we define z = f(x, y) = x2 + y2 and g(z) = ez, then

h(x, y) = (g ◦ f)(x, y) = g[f(x, y)] = ex2+y2 .

In general, if

f : D → R, D ⊂ R2

and

g : I → R, I ⊂ R

then the composition (g ◦ f)(x, y) is defined as

(10.1.5) h(x, y) := (g ◦ f)(x, y) = g[f(x, y)].

For example,

h(x, y) =√x2 + y2 = (g ◦ f)(x, y),

where f(x, y) = x2 + y2 with (x, y) ∈ R2 and g(z) =√z with z ≥ 0.

Page 127: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.2. PARTIAL DERIVATIVES 127

10.2. Partial derivatives

Look at a function of two variables

f(x, y) = x2y.

Fix y = y0 and consider the function

g(x) := f(x, y0)

as a function of one variable. Then

d

dxg(x) =

d

dxf(x, y0) =

d

dx(x2y0) = 2xxy0.

Such a derivative is called a partial derivative.

10.2.1. Partial derivatives. We first consider partial derivatives of a func-tion of two variables.

Definition 10.2.1. Suppose that f is a function of two independent variables xand y. The partial derivative of f with respect to x is defined by

(10.2.1) fx(x, y) ≡ ∂

∂xf(x, y) := lim

h→0

f(x+ h, y)− f(x, y)

h.

The partial derivative of f with respect to y is defined by

(10.2.2) fy(x, y) ≡ ∂

∂yf(x, y) := lim

h→0

f(x, y + h)− f(x, y)

h.

To compute fx(x, y) = ∂f(x, y)/∂x, we differentiate f with respect to x whiletreating y as a constant. When we read ∂f(x, y)/∂x, we can say “the partialderivative of f of x and y with respect to x.” To read fx(x, y), we say “f sub x ofx and y.”

Example 10.2.2. Find ∂f/∂x and ∂f/∂y when

f(x, y) = yexy.

Proof. To compute ∂f/∂x, we treat y as a constant and use the chain rule:

fx(x, y) =∂

∂x(yexy) = yexyy = y2exy.

Similarly,

fy(x, y) =∂

∂y(exy) = 1 · exy + yexyx = exy(1 + xy).

10.2.2. Geometric interpretation. We give the following geometric inter-pretation of ∂f/∂x. We fix y = b; then g(x) := f(x, b) as a function of x isobtained by intersecting the surface z = f(x, y) with a vertical plane that is par-allel to xx-plane and goes through y = b. The curve of intersection is the graph

Page 128: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

128 10. MULTI-VARIABLE CALCULUS

Figure 10.2. The surface of f(x, y) intersected with the plane y = b

Figure 10.3. The surfaces of f(x, y) intersected with the planey = b and x = a

of z = g(x) = f(x, b), as illustrated in Figure 10.3. We project this curve onto xz-plane; the curve is the graph of a function that depends only on x. Consequently,we can find the slope of the tangent line at any point (a, g(a)) = (a, f(a, b)).

The partial derivative ∂f/∂x evaluated at (x0, y0) is the slope of the tangentline to the curve z = f(x, y0) at the point (x0, y0, z0) with z0 = f(x0, y0).

Similarly,

The partial derivative ∂f/∂y evaluated at (x0, y0) is the slope of the tangentline to the curve z = f(x0, y) at the point (x0, y0, z0) with z0 = f(x0, y0).

Example 10.2.3. Let f(x, y) = 3−x3−y2. Find fx(1, 1) and fy(1, 1), and interpretthe results geometrically.

Proof. We have

fx(x, y) = −3x2, fy(x, y) = −2y.

Hence fx(1, 1) = −3 and fy(x, y) = −2. �

Page 129: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.2. PARTIAL DERIVATIVES 129

The definition of partial derivative extends in a straightforward way to functionsof more than two variables.

Example 10.2.4. Let f(x, y, z) = eyz(x2 + z3). Find fx, fy, fz.

Proof. By the same way, we have fx = 2xeyz, fy = zeyz(x2 + z3), andfz = yeyz(x2 + z3) + 3z2eyz = eyz(x2y + yz3 + 2z2). �

10.2.3. Holling’s disk equation. Holling (1959) derived an expression forthe number of prey items Pe eaten by a predator during an interval T as a functionof prey density N and the handling time Th of each prey item:

(10.2.3) Pe =aNT

1 + aThN,

where a is a positive constant called the predator attack rate. Equation (10.2.3)is called Holling’s disk equation.

(i) We can consider Pe as a function of N and Th.– How handling time influences the number of prey eaten:

∂ThPe = − a2N2T

(1 + aThN)2< 0,

hence the number of prey items eaten decreases with increasing han-dling time.

– How Pe change with N :

∂NPe =

aT

(1 + aThN)2> 0,

hence the number of prey items eaten increases with increasing preydensity.

(ii) We can consider Pe as a function of a and T .– How the predator attack rate a influences the number of prey eaten

per predator:

∂aPe =

NT

(1 + aThN)2> 0,

hence the number of prey eaten per predator increases with increasingpredator attack rate.

– How the length T of the interval influences the number of prey eatenper predator:

∂TPe =

aN

1 + aThN> 0,

hence the number of prey eaten per predator increases with increasinglength.

Page 130: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

130 10. MULTI-VARIABLE CALCULUS

10.2.4. Higher-order partial derivatives. As in the case of functions ofone variables, we can define higher-order partial derivatives for functions of morethan one variable. For instance,

fxx =∂2f

∂x2=

∂x

(∂f

∂x

),(10.2.4)

fyx =∂2f

∂x∂y=

∂x

(∂f

∂y

),(10.2.5)

fxy =∂2f

∂y∂x=

∂y

(∂f

∂x

),(10.2.6)

fyy =∂2f

∂y2=

∂y

(∂f

∂y

).(10.2.7)

Example 10.2.5. Let f(x, y) = sinx+ xey. Find fxx, fyx, fxy.

Proof. By definitions, fxx = − sinx, fyx = ey = fxy. �

Example 10.2.5 implies that fxy = fyx. Although, this is not always the case.

Theorem 10.2.6. (Mixed-derivative theorem) If f(x, y) and its partial derivativesfx, fy, fxy, and fyx are continuous on an open disk centered at the point (x0, y0),then

fxy(x0, y0) = fyx(x0, y0).

We can similarly define partial derivatives of higher order. For instance,

(10.2.8) fyx2 =∂3f

∂x2∂y=

∂x

∂x

∂f

∂y, fy2x =

∂x

∂y

∂f

∂y.

Example 10.2.7. Let f(x, y) = y2 sinx. Find fyx2 , fy2x, fxy2 .

Proof. We have

fyx2 =∂2

∂x2(2y sinx) =

∂x(2y cosx) = −2y sinx,

fy2x =∂2

∂y2(y2 cosx) =

∂y(2y cosx) = 2 cosx.

Similarly, fxy2 = 2 cosx. �

Theorem 10.2.6 can be extended to higher-order derivatives. The order differ-entiation does not matter, as long as the function and all of its derivatives throughthe order in question are continuous on an open disk centered at the point at whichwe want to compute the derivative.

Page 131: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.3. TANGENT PLANES, DIFFERENTIABILITY, AND LINEARIZATION 131

Figure 10.4. Tangent plane

Example 10.2.8. Let f(x, y) = ln(x2 + 3xy). Find fy2 and fx3 .

Proof. We have

fx =2x+ 3y

x2 + 3xy, fy =

3x

x2 + 3xy,

and

fx2 =−2x2 − 6xy − 9y2

(x2 + 3xy)2, fx3 =

4x3 + 12x2y + 54xy2 + 54y3

(x2 + 3xy)3.

Similarly, fy2 = −9x2/(x2 + 3xy)2. �

Example 10.2.9. Let f(x, y) = x3 cos y. Find fyx2 and fxy2 .

Proof. As in Example 10.2.9, we can show that fyx2 = −6x sin y and fxy2 =−3x2 cos y. �

10.3. Tangent planes, differentiability, and linearization

Suppose that z = f(x) is differentiable at x = x0. Then the equation of thetangent line of z = f(x) at (x0, z0) with z0 = f(x0) is given by

(10.3.1) z − z0 = f ′(x0)(x− x0).

We now generalize the concept of tangent lines to functions of two variables. Theanalogue of a tangent line is called a tangent plane (see Figure 10.4). Recall thegeneral equation of a plane

(10.3.2) z − z0 = A(x− x0) +B(y − y0)

by (9.4.15).

10.3.1. Tangent planes. Let z = f(x, y) be a function of two variables andconsider a point P = (x0, y0, z0) with z0 = f(x0, z0). We take the curve C1 thatis obtained as the intersection of the surface z = f(x, y) with the plane that isparallel to the yz-plane and contains the point P . Likewise, we take the curve C2

Page 132: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

132 10. MULTI-VARIABLE CALCULUS

Figure 10.5. The surfaces z = f(x, y) and its tangent plane atP = (x0, y0, z0)

that is obtained as the intersection of the surface z = f(x, y) with the plane thatis parallel to the xz-plane and contains the point P . The tangent lines associatedto C1 and C2 determine the tangent plane at P .

By (10.3.2), this tangent plane takes the form

(10.3.3) z − z0 = A(x− x0) +B(y − y0);

we will use curves C1 and C2 to determine the constants A and B. C1 satisfies theequation

z = f(x0, y).

The tangent line to C1 at P satisfies

(10.3.4) z − z0 =∂f(x0, y0)

∂y(y − y0).

Since the tangent line of C1 at P is contained in the tangent plane, letting x = x0

in (10.3.3), we obtainz − z0 = B(y − y0)

compared with (10.3.4) that yields

(10.3.5) B =∂f(x0, y0)

∂y= fy(x0, y0).

Similarly,

(10.3.6) A =∂f(x0, y0)

∂x= fx(x0, y0).

If the tangent plant to the surface z = f(x, y) at the point (x0, y0, z0) exists,then that tangent plane had the equation

(10.3.7) z − z0 = fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0).

Page 133: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.3. TANGENT PLANES, DIFFERENTIABILITY, AND LINEARIZATION 133

Example 10.3.1. Find the tangent plane to the surface

z = f(x, y) = 4x2 + y2

at the point (1, 2, 8).

Proof. Since fx(x, y) = 8x and fy(x, y) = 2y, it follows that

fx(1, 2) = 8, fy(1, 2) = 4.

Then the tangent plane given by (10.3.7) is

z − 8 = 8(x− 1) + 4(y − 2) = 8x+ 4y − 16

or 8x+ 4y − z = 8. �

10.3.2. Differentiability. Recall that the linear approximation of a differen-tiable function f(x) at x = x0 is given by (see (4.2.19))

(10.3.8) L(x) = f(x0) + f ′(x0)(x− x0).

The distance between f(x) and L(x) is

|f(x)− L(x)| = |f(x)− f(x0)− f ′(x0)(x− x0)|and then

|f(x)− L(x))||x− x0|

=

∣∣∣∣f(x)− f(x0)

x− x0− f ′(x0)

∣∣∣∣ ;taking the limit x→ x0, we obtain

(10.3.9) limx→x0

∣∣∣∣f(x)− L(x)

x− x0

∣∣∣∣ = 0.

We say that f(x) is differentiable at x = x0 if (10.3.9) holds.

Definition 10.3.2. Suppose that f(x, y) is a function of two independent variablesand that both ∂f/∂x and ∂f/∂y are defined throughout an open disk containing(x0, y0). Set

L(x, y) = f(x0, y0) + fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0).

Then f(x, y) is differentiable at (x0, y0) if

lim(x,y)→(x0,y0)

∣∣∣∣∣ f(x, y)− L(x, y)√(x− x0)2 + (y − y0)2

∣∣∣∣∣ = 0.

Furthermore, if f(x, y) is differentiable at (x0, y0), then z = L(x, y) defines thetangent plane to the graph of f at (x0, y0, f(x0, y0)). We say that f(x, y) is differ-entiable if it is differentiable at every point of its domain.

As in Theorem 4.1.2, the following theorem holds.

Theorem 10.3.3. If f(x, y) is differentiable at (x0, y0), then f is continuous at(x0, y0).

Page 134: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

134 10. MULTI-VARIABLE CALCULUS

That f(x, y) is differentiable at (x0, y0) means that the function f(x, y) is closeto the tangent plane at (x0, y0) for all (x, y) close to (x0, y0). The mere existenceof the partial derivatives ∂f/∂x and ∂f/∂y at (x0, y0), however, is not enough toguarantee differentiability (and, consequently, the existence of a tangent plane at acertain point).

Example 10.3.4. Consider the function

f(x, y) =

{0, xy 6= 0,1, xy = 0.

Show that fx(0, 0) and fy(0, 0) exist, but f(x, y) is not continuous and not differ-entiable at (0, 0).

Proof. Since f(x, 0) = 1, we have fx(0, 0) = 0. Likewise, from f(0, y) = 1we get fy(0, 0) = 0. To prove that f(x, y) is discontinuous, we considr two specialpaths C1 : y = 0 and C2 : y = x. Then

lim(x,y)→(0,0) along with C1

f(x, y) = 1

andlim

(x,y)→(0,0) along with C2

f(x, y) = limx→0

f(x, x) = 0.

Therefore, f(x, y) is not continuous at (0, 0). �

We have the following sufficient condition for differentiability.

Theorem 10.3.5. Suppose that f(x, y) is defined on an open disk centered at(x0, y0) and the partial derivatives ∂f/∂x and ∂f/∂y are continuous on an opendisk centered at (x0, y0). Then f(x, y) is differentiable at (x0, y0).

Example 10.3.6. Show that f(x, y) = 2x2y−y2 is differentiable for all (x, y) ∈ R2.

Proof. Since fx(x, y) = 4xy and fy(x, y) = 2x2−2y, it follows from Theorem10.3.5 that f(x, y) is differentiable on R2. �

10.3.3. Linearization. From Definition 10.3.2, we give the following

Definition 10.3.7. Suppose that f(x, y) is differentiable at (x0, y0). The lineariza-tion of f(x, y) at (x0, y0) is the function

L(x, y) = f(x0, y0) + fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0).

The approximationf(x, y) ≈ L(x, y)

is the standard linear approximation or the tangent plane approximationof f(x, y) at (x0, y0).

Page 135: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.3. TANGENT PLANES, DIFFERENTIABILITY, AND LINEARIZATION 135

Example 10.3.8. Find the linear approximation of

f(x, y) = x2y + 2xey

at the point (2, 0).

Proof. From fx(x, y) = 2xy + 2ey and fy = x2 + 2xey, we obtain

L(x, y) = 4 + 2(x− 2) + 8(y − 0) = 2x+ 8y.

Example 10.3.9. Find the linear approximation of

f(x, y) = ln(x− 2y2)

at the point (3, 1) and use it to find an approximation for f(3.05, 0.95).

Proof. Since fx(x, y) = 1x−2y2 and fy(x, y) = −4

x−2y2 , it follows that

L(x, y) = 0 + 1(x− 3) + (−4)(y − 1) = x− 4y + 1.

In particular, L(3.05, 0.95) = 3.05 − 4 × 0.95 + 1 = 0.25. Using the calculator,we have f(3.05, 0.95) ≈ 0.2191 and the error of approximation is |f(3.05, 0.95) −L(3.05, 0.95)| ≈ 0.031. �

Example 10.3.10. Find the linear approximation of

f(x, y) = ln(x2 − 3y)

at (1, 0), and use it to approximate f(1.1, 0.1).

Proof. Since fx(x, y) = 2xx2−3y and fy(x, y) = −3

x2−3y , it follows that

L(x, y) = 0 + 2(x− 1) + (−3)(y − 0) = 2x− 3y − 2.

In particular, L(1.1, 0.1) = 2 × 1.1 − 3 × 0.1 − 2 = −0.1. Using the calculator, weget f(1.1, 0.1) = ln(1.21− 0.3) = ln 0.91 ≈ −0.094. �

10.3.4. Vector-valued functions. We now consider the vector-valued func-tions

f : Rn −→ Rm

given by

x = (x1, · · · , xn) 7−→

f1(x) = f1(x1, · · · , xn)...

fm(x) = fm(x1, · · · , xn)

Here, each function fi(x1, · · · , xn) is a real-valued function:

fi : Rn → R, (x1, · · · , xn) 7→ fi(x1, · · · , xn).

Page 136: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

136 10. MULTI-VARIABLE CALCULUS

We will consider vector-valued functions where n = m = 2:

(u, v) 7−→[f(u, v)g(u, v)

]

Example 10.3.11. Find the linearization of

f(x) = 2 lnx

at x0 = 1.

Proof. The linearization of f(x) at x0 = 1 is L(x) = f(1) + f ′(1)(x − 1) =0 + 2(x− 1) = 2x− 2. �

The linearization of a real-valued function f : R2 → R is

L(x, y) = f(x0, y0) + fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0)

= f(x0, y0) +[fx(x0, y0) fy(x0, t0)

] [x− x0

y − y0

]

Example 10.3.12. Find the linearization of

f(x, y) = lnx+ ln y

at (1, 1).

Proof. Since f(1, 1) = 0, fx(x, y) = 1/x, andfy(x, y) = 1/y, we obtain

L(x, y) = 0 +[1 1

] [x− 1y − 1

]= x− 1 + y − 1 = x+ y − 2.

Suppose that

h : R2 −→ R2, (x, y) 7−→[f(x, y)g(x, y)

]and assume that all first partial derivatives are continuous on a disk centered at(x0, y0). The linearization of f is

(10.3.10) α(x, y) = f(x0, y0) + fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0)

and the linearization of g is

(10.3.11) β(x, y) = g(x0, y0) + gx(x0, y0)(x− x0) + gy(x0, y0)(y − y0);

we define the vector-valued function L(x, y) =

[α(x, y)β(x, y)

]and then

L(x, y) =

[f(x0, y0)g(x0, y0)

]+

[fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0)gx(x0, y0)(x− x0) + gy(x0, y0)(y − y0)

]=

[f(x0, y0)g(x0, y0)

]+

[fx(x0, y0) fy(x0, y0)gx(x0, y0) gy(x0, y0)

] [x− x0

y − y0

].

We call the 2× 2 matrix

(10.3.12) (Dh)(x0, y0) =

[fx(x0, y0) fy(x0, y0)gx(x0, y0) gy(x0, y0)

]

Page 137: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.3. TANGENT PLANES, DIFFERENTIABILITY, AND LINEARIZATION 137

the Jacobi matrix or the derivative matrix. Consequently,

(10.3.13) L(x, y) = h(x0, y0) + (Dh)(x0, y0)

[x− x0

y − y0

].

Example 10.3.13. Assume that

f : R2 −→ R2, (x, y) 7−→[uv

]with

u(x, y) = x2y − y3, v(x, y) = 2x3y2 + y.

Compute the Jacobi matrix and evaluate it at (1, 2).

Proof. Since ux(x, y) = 2xy, uy(x, y) = x2 − 3y2, vx(x, y) = 6x2y2, andvy(x, y) = 4x3y + 1, we obtain

(Df)(1, 2) =

[2xy x2 − 3y2

6x2y2 4x3y + 1

] ∣∣∣∣(1,2)

=

[4 −1124 9

]�

Example 10.3.14. Assume that

f : R2 −→ R2, (x, y) 7−→[uv

]with

u(x, y) = 2x2y, v(x, y) =1

xy.

Compute the linear approximation to f(x, y) at (1, 1).

Proof. The Jacobi matrix is

(Df)(x, y) =

[4xy 2x2

− 1x2y − 1

xy2

]=⇒ (Df)(1, 1) =

[4 2−1 −1

].

Then L(x, y) =

[21

]+

[4 2−1 −1

] [x− 1y − 1

]=

[4x+ 2y − 4−x− y + 3

]. �

Example 10.3.15. Let f : R2 → R2 with

u(x, y) = ye−x, v(x, y) = sinx+ cos y.

Find the linear approximation to f(x, y) at (0, 0) and compute f(0.1,−0.1) withits linear approximation.

Proof. The Jacobi matrix of f(x, y) is

(Df)(x, y) =

[−ye−x e−x

cosx − sin y

]

Page 138: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

138 10. MULTI-VARIABLE CALCULUS

and hence

L(x, y) =

[u(0, 0)v(0, 0)

]+ (Df)(0, 0)

[x− 0y − 0

]=

[01

]+

[0 11 0

] [xy

]=

[y

x+ 1

].

In particular,

L(0.1,−0.1) =

[−0.11.1

].

Using calculator, we obtain f(0.1,−0.1) ≈[−0.091.09

]. �

Example 10.3.16. Find a linear approximation to

f(x, y) =

[x2 − xy3y2 − 1

]at (1, 2) and an approximation for f(1.1, 1.9).

Proof. The Jacobi matrix is

(Df)(x, y) =

[2x− y −x

0 6y

]=⇒ (Df)(1, 2) =

[0 −10 12

]and therefore

L(x, y) = f(1, 2) + (Df)(1, 2)

[x− 1y − 2

]=

[−111

]+

[−(y − 2)12(y − 2)

]=

[−y + 1

12y − 13

];

in particular, L(1.1, 1.9) =

[−0.99.8

]and f(1.1, 1.9) =

[−0.889.83

]. �

We can generalize the Jacobi matric to functions f : Rn → Rm. If

f(x1, · · · , xn) =

f1(x1, · · · , xn)...

fm(x1, · · · , xn)

where fi : Rn → R, i = 1, · · · , n, are real-valued functions of n independentvariables, then the Jacobi matrix is an m× n matrix of the form

(10.3.14) Df(x) =

∂∂x1

f1(x) · · · ∂∂xn

f1(x)...

...∂∂x1

fm(x) · · · ∂∂xn

fm(x)

The linearization of f(x) about the point (x∗ is

(10.3.15) L(x∗) = f(x∗) + (Df)(x∗) · (x− x∗).

10.4. Chain rule

Recall the chain rule (see Theorem 4.2.4) that

(f ◦ g)′(x) = f ′[g(x)]g′(x)

where g is differentiable at x and f is differentiable at y = g(x).

Page 139: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.4. CHAIN RULE 139

10.4.1. Chain rule for functions of two variables. We now consider thechain rule for functions of two variables.

Theorem 10.4.1. If w = f(x, y) is differentiable and x and y are differentiablefunctions of t, then w is a differentiable function of t and

(10.4.1)dw

dt=∂w

∂x

dx

dt+∂w

∂y

dy

dt.

Proof. We approximate w = f(x, y) at (x0, y0) by its linear approximation

L(x, y) = f(x0, y0) + fx(x0, y0)(x− x0) + fy(x0, y0)(y − y0).

If we set ∆x = x − x0, ∆y = y − y0, and ∆w = f(x, y) − f(x0, y0), we canapproximate ∆w = f(x0 +∆x, y0 +∆y)−f(x0, y0) by its linear approximation andfind that

∆w ≈ fx(x0, y0)∆x+ fy(x0, y0)∆y.

Dividing both sides by ∆t, we obtain

∆w

∆t≈ fx(x0, y0)

∆x

∆t+ fy(x0, y0)

∆y

∆t.

Letting ∆t→ 0 yields (10.4.1). �

Example 10.4.2. Let w = f(x, y) = x2y3 with x(t) = sin t and y(t) = e−t. Findthe derivative of w = f(x, y) with respect to t when t = π/2.

Proof. By (10.4.1),

dw

dt= 2xy3 dx

dt+ 3x2y2 dy

dt= 2xy3 cos t− 3x2y2e−t = sin t · e−3t(2 cos t− 3 sin t).

Hence dw/dt|t=π/2 = e−3π/2(0− 3) = −3e−3π/2. �

10.4.2. Implicit differentiation. Consider the equation

(10.4.2) x2y − e−y = 0.

We differentiate both sides of (10.4.2) with respect to x and find that

0 = 2xy +dy

dx

(x2 + e−y

).

Solving for dy/dx, we obtain

dy

dx= − 2xy

x2 + e−y.

We now consider the general case. We think of y as a function of x and definea function

(10.4.3) F (x, y) = 0.

This defines y implicitly as a function of x. To find the derivative of y with respectto x, we set

w = F (u, v) with u(x) = x and v(x) = y.

Page 140: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

140 10. MULTI-VARIABLE CALCULUS

By (10.4.1), we obtain

dw

dx=∂F

∂u

du

dx+∂F

∂v

dv

dx.

Since du/dx = 1 and dv/dx = dy/dx, it follows that

dw

dx=∂F

∂x+∂F

∂y

dy

dx.

From w(x) = 0, we conclude that

0 =∂F

∂x+∂F

∂y

dy

dx.

Thus

Suppose that w = F (x, y) is differentiable and F (x, y) = 0 defines y implicitlyas a differentiable function of x. Then, at any point where Fy 6= 0,

(10.4.4)dy

dx= −Fx

Fy.

Example 10.4.3. Find dy/dx if x2y − e−y = 0.

Proof. We set F (x, y) = xy − e−y. Then

Fx(x, y) = 2xy, Fy(x, y) = x2 + e−y

and dy/dx = −Fx/Fy = −2xy/(x2 + e−y). �

Example 10.4.4. Find dy/dx for y = arcsinx.

Proof. y = arcsinx for −π/2 ≤ y ≤ π/2 is equivalent to x = sin y for−1 ≤ x ≤ 1. Let F (x, y) = x− sin y. Then

Fx(x, y) = 1, Fy(x, y) = − cos y.

Hence dy/dx = 1/ cos y = 1√1−x2

for x ∈ (−1, 1). �

Example 10.4.5. Find dy/dx if ln(x2 + y2) = 3xy.

Proof. Let F (x, y) = ln(x2 + y2)− 3xy. Then

Fx(x, y) =2x

x2 + y2− 3y, Fy(x, y) =

2y

x2 + y2− 3x.

Sody

dx= −2x− 3x2y − 3y3

2y − 3xy2 − 3x3.

Page 141: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.4. CHAIN RULE 141

10.4.3. Directional derivatives and gradient vectors. Consider two vec-

tors r0 =

[x0

y0

]and u =

[u1

u2

], where u is a unit vector. The line through (x0, y0)

in the direction of u is

(10.4.5) r = r0 + tu, t ∈ R.

Then

(10.4.6)

[xy

]=

[x0

y0

]+

[tu1

tu2

], t ∈ R.

Since x = x0 + tu1 and y = y0 + tu2, it follows that

(10.4.7)dx

dt= u1,

dy

dt= u2.

Let f(x, y) be a function of two variables and let

z(t) := f(x(t), y(t)).

By the chain rule and (10.4.7), we conclude that

(10.4.8)dz

dt=∂f

∂x

dx

dt+∂f

∂y

dy

dt=∂f

∂xu1 +

∂f

∂yu2. =

[∂f∂x∂f∂y

]·[u1

u2

].

Definition 10.4.6. Assume that z = f(x, y) is a function of two independentvariables and that ∂f/∂x and ∂f/∂y exist. Then the vector

(10.4.9) grad(f)(x, y) = ∇f(x, y) =

[fx(x, y)fy(x, y)

]is called the gradient of f at (x, y).

The directional derivative of f(x, y) at (x0, y0) in the direction of the unit

vector u =

[u1

u2

]is

(10.4.10) Duf(x0, y0) = ∇f(x0, y0) · u.

Note that in the definition of the directional derivative, we assume that u is aunit vector. Choosing a unit vector ensures that the directional derivative of f(x, y)agrees with the partial derivatives when we go along the positive x- or y-axis.

(i) If u =

[10

], then

(10.4.11) D10

f(x0, y0) =

[fx(x0, y0)fy(x0, y0)

]·[10

]= fx(x0, y0).

(ii) If u =

[01

], then

(10.4.12) D01

f(x0, y0) =

[fx(x0, y0)fy(x0, y0)

]·[01

]= fy(x0, y0).

Page 142: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

142 10. MULTI-VARIABLE CALCULUS

Example 10.4.7. Compute the directional derivative of

f(x, y) =√x2 + 2y2

at the point (−1, 2) in the direction

[−13

].

Proof. The gradient of f is

∇f(x, y) =

x√x2+2y2

2y√x2+2y2

and the gradient of f at (−1, 2) is

∇f(−1, 2) =

[−1√1+84√1+8

]=

[−1/34/3

].

Since

[−13

]is not a unit vector, we normalize it by

u =1√10

[−13

].

Therefore

Duf(−1, 2) = ∇f(−1, 2) · u =

[−1343

[−1√103√10

]=

13

3√

10.

Example 10.4.8. Compute the directional derivative of

f(x, y) = x2y − 2y2

at the point (−3, 2) in the direction of (−1, 1).

Proof. The gradient of f is

∇f(x, y) =

[2xy

x2 − 4y

]and the gradient of f at (−3, 2) is

∇f(−3, 2) =

[−12

1

].

The vector that goes from (−3, 2) to (−1, 1) has the form[−1− (−3)

1− 2

]=

[2−1

].

Since

[2−1

]is not a unit vector, we normalize it by

u =1√5

[2−1

].

Page 143: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.4. CHAIN RULE 143

Therefore

Duf(−3, 2) = ∇f(−3, 2) · u =1√5

[2−1

]·[

2−1

]= −5

√5.

Example 10.4.9. Compute the directional derivative of f(x, y) = 2x2y − 3x atthe point P = (2, 1) in the direction of the point Q = (3, 2).

Proof. The gradient of f at (2, 1) is

∇f(2, 1) =

[4xy − 3

2x2

] ∣∣∣∣(2, 1) =

[58

].

The vector that goes from (2, 1) to (3, 2) has the form[3− 22− 1

]=

[11

].

Since

[11

]is not a unit vector, we normalize it by

u =1√2

[11

].

Therefore

Duf(2, 1) = ∇f(2, 1) · u =1√2

[58

]·[11

]=

13√2.

We will now show that, geometrically, the gradient of f at (x0, y0) is perpen-dicular to the level curve f(x, y) = c that passes through this point.

Theorem 10.4.10. Suppose that f(x, y) is a differentiable function. The gradientvector ∇f(x, y) has the following properties:

(i) at each point (x0, y0), f(x, y) increases most rapidly in the direction ofthe gradient vector ∇f(x0, y0);

(ii) the gradient vector of f at a point (x0, y0) is perpendicular to the levelcurve through (x0, y0).

Proof. (i) Recall that

Duf(x, y) = ∇f(x, y) · u = |∇f(x, y)||u| cos θ,

where θ is the angle between ∇f(x, y) and u. Since |u| = 1 (u is a unit vector),we have

Duf(x, y) = |∇f(x, y)| cos θ.

The angle θ is in the interval [0, 2π) and cos θ is maximal when θ = 0. We thereforefins that Duf(x, y) is maximal when u is in the direction of ∇f(x, y).

Page 144: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

144 10. MULTI-VARIABLE CALCULUS

(ii) Consider a parameterized curve

r(t) =

[x(t)y(t)

]of the level curve f(x, y) = c. Then

0 =d

dtf(x(t), y(t)) =

∂f

∂x

dx

dt+∂f

∂y

dy

dt= ∇f · dr

dt.

This equation shows that the gradient of f at (x0, y0) is perpendicular to the levelcurve at (x0, y0). �

Example 10.4.11. Let f(x, y) = x2y+y2. In what direction does f(x, y) increasemost rapidly at (1, 1)?

Proof. By Theorem 10.4.10, the function f(x, y) increases most rapidly at(1, 1) in the direction of ∇f(1, 1). Since

∇f(x, y) =

[2xy

x2 + 2y

],

it follows that

∇f(1, 1) =

[23

].

That is, the function f(x, y) increases most rapidly in the direction

[23

]at the point

(1, 1). �

Example 10.4.12. Find a unit vector that is perpendicular to the level curve ofthe function

f(x, y) = x2 − y2

at (1, 2).

Proof. The gradient of f at (1, 2) is perpendicular to the level curve at (1, 2).The gradient of f is given as

∇f(x, y) =

[2x−2y

]hence

∇f(1, 2) =

[2−4

]and its normalized vector is

u =1√20

[2−4

]=

[15

√5

− 25

√5

].

Page 145: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 145

Example 10.4.13. Find a unit vector that is normal to the level curve of thefunction f(x, y) = x2 − y3 at the point (1, 3).

Proof. The gradient vector of f at (1, 3) is

∇f(1, 3) =

[2x−3y2

] ∣∣∣∣(1,3)

=

[2−27

],

and the desired unit vector is given by

u =1√

22 + 272

[2−27

]=

1√733

[2−27

].

10.5. Applications

In Chapter 5, we introduced local extrema for functions of one variable. Localextrema can also be defined for functions of more than one independent variables.

10.5.1. Maxima and minima. Recall that we denote by Bδ(x0, y0) the opendisk with radius δ centered at (x0, y0).

Definition 10.5.1. A function f(x, y) defined on a set D ⊂ R2 has a local (orrelative) maximum at a point (x0, y0) if there exists a δ > 0 such that

f(x, y) ≤ f(x0, y0) for all (x, y) ∈ Bδ(x0, y0) ∩D.A function f(x, y) defined on a set D ⊂ R2 has a local ( or relative) minimumat a point (x0, y0) if there exists a δ > 0 such that

f(x, y) ≥ f(x0, y0) for all (x, y) ∈ Bδ(x0, y0) ∩D.We can define global (or absolute) extrema as well: if the inequalities in the

definition hold for all (x, y) ∈ D, then f has an absolute maximum (minimum) at(x0, y0).

As Theorem 5.1.3, we have

Theorem 10.5.2. If f(x, y) has a local extremum at (x0, y0) and if f is differen-tiable at (x0, y0), then

(10.5.1) ∇f(x0, y0) =

[00

].

A point (x0, y0) that satisfies (10.5.1) is called a (smooth) critical point;points where f(x, y) is not differentiable are also called (singular) critical points.Note that (10.5.1) is a necessary condition.

Page 146: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

146 10. MULTI-VARIABLE CALCULUS

Example 10.5.3. Find the all critical points of f(x, y) = x2 +y2 +1 and determineequations of the tangent planes at those points.

Proof. Since f(x, y) is differentiable, all critical points must satisfy (10.5.1).From [

00

]=

[2x2y

]we obtain the only critical point is (0, 0). Then the tangent plane at (0, 0) is

z = f(0, 0) + fx(0, 0)(x− 0) + fy(0, 0)(y − 0) = 1.

Example 10.5.4. Find all critical points

f(x, y) = x2 + y2 + xy, (x, y) ∈ R2.

Proof. From[00

]= ∇f(x, y) =

[2x+ y2y + x

]=⇒ 2x+ y = 0

x+ 2y = 0

we find that the only critical points is (0, 0). �

We now give a sufficient condition that will allow us to determine whether acandidate for a local extremum is indeed a local extremum.

Suppose that the second partial derivatives of f are continuous in a disk cen-tered at (x0, y0). Consider the Hessian matrix of f at (x0, y0):

(10.5.2) Hess(f)(x0, y0) :=

[fxx(x0, y0) fxy(x0, y0)fyx(x0, y0) fyy(x0, y0)

].

Example 10.5.5. Compute the Hessian matrices of

f1(x, y) = x2 + y2, f2(x, y) = x2 − y2, f3(x, y) = −x2 − y2.

Proof. By (10.5.2), we have

Hess(f)(x, y) =

[2 00 2

], Hess(f)(x, y) =

[2 00 −2

], Hess(f)(x, y) =

[−2 00 −2

].

It can be showed that (0, 0) is a candidate for a local extremum for all threefunctions in Example 10.5.5. However, (0, 0) is a local minimum for f1(x, y) and isa local maximum for f3.

Theorem 10.5.6. Suppose that the second partial derivatives of f are continuous

in a disk centered at (x0, y0). Suppose that ∇f(x0, y0) =

[00

].

Page 147: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 147

(1) If det Hess(f)(x0, y0) > 0 and fxx(x0, y0) > 0, then f has a local mini-mum at (x0, y0).

(2) If det Hess(f)(x0, y0) > 0 and fxx(x0, y0) < 0, then f has a local maxi-mum at (x0, y0).

(3) If det Hess(f)(x0, y0) < 0, then f does not have a local extremum at(x0, y0). The point (x0, y0) is then called a saddle point.

Example 10.5.7. (Example 10.5.4 is revisited) The Hessian matrix of f(x, y) =x2 + y2 + xy is

Hess(f)(x, y) =

[2 11 2

].

Since det Hess(f)(0, 0) = 2 × 2 − 1 × 1 = 3 > 0, it follows from Theorem 10.5.6that (0, 0) is a local minimum.

Example 10.5.8. Find all local extrema of

f(x, y) = 3xy − x3 − y3, (x, y) ∈ R2

and classify them according to whether each is a local maximum, a local minimum,or neither.

Proof. The Hessian matrix of f is

Hess(f)(x, y) =

[−6x 3

3 −6y

]and its determinant is det Hess(f)(x, y) = 36xy − 9. The critical points satisfy[

00

]= ∇f(x, y) =

[3y − 3x2

3x− 3y2

]and this set of equations has the solutions (0, 0) or (1, 1). Since det Hess(f)(1, 1) =36− 9 = 27 > 0 and fxx(1, 1) = −6 < 0, f(x, y) has a local maximum at (1, 1). At(0, 0), det Hess(f)(0, 0)− 9 < 0, hence (0, 0) is a saddle point. �

Suppose that the second partial derivatives of f are continuous in a disk cen-tered at (x0, y0). According to Theorem 10.2.6, we have

fyx(x0, y0) = fxy(x0, y0).

Hence the Hessian matrix of f at (x0, y0) is of the form

(10.5.3) H :=

[a cc b

],

where a = fxx(x0, y0), b = fyy(x0, y0), and c = fxy(x0, y0).

(i) The matrix H is called symmetric.

Page 148: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

148 10. MULTI-VARIABLE CALCULUS

(ii) The eigenvalues of a symmetric matrix are always real. Let λ be aneigenvalue of H; then

0 = λ2 − tr(H)λ+ det(H) = λ2 − (a+ b)λ+ (ab− c2)

=

(λ− a+ b

2

)2

+ ab− c2 − (a+ b)2

4

=

(λ− a+ b

2

)2

−(c2 +

a2 + b2 − 2ab

4

)=

(λ− a+ b

2

)2

[c2 +

(a− b

2

)2].

Therefore the eigenvalues of H are

λ =a+ b

√c2 +

(a− b

2

)2

∈ R.

Theorem 10.5.9. Suppose that the second partial derivatives of f are continuous

in a disk centered at (x0, y0). Suppose also that ∇f(x0, y0) =

[00

]. Then

(1) If the two eigenvalues of Hess(f)(x0, y0) are positive, then f has a localminimum at (x0, y0).

(2) If the two eigenvalues of Hess(f)(x0, y0) are negative, then f has a localmaximum at (x0, y0).

(3) If the two eigenvalues of Hess(f)(x0, y0) are of opposite signs, then f doesnot have a local extremum at (x0, y0). The point (x0, y0) is then called asaddle point.

If one or both eigenvalues are equal to zero, we cannot say anything about thenature of the critical point on the basis of the Hessian matrix.

Example 10.5.10. Find the local extrema of

f(x, y) = 2x2 − xy + y4, (x, y) ∈ R2.

Proof. We compute

∇f(x, y) =

[4x− y−x+ 4y3

], Hess(f)(x, y) =

[4 −1−1 12y2

].

Since f(x, y) is differentiable on R2, all critical points are

(0, 0),

(1

16,

1

4

),

(− 1

16,−1

4

).

We evaluate the Hessian matrix at each candidate and compute its eigenvalues.

(i) Hess(f)(0, 0) =

[4 −1−1 0

]. The eigenvalues satisfy

λ2 − 4λ− 1 = 0;

Page 149: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 149

thus

λ =4±√

16 + 4

2= 2±

√5 ≈

{4.2361−0.2361

implying that f has a saddle point at (0, 0).

(ii) Hess(f)(1/16, 1/4) =

[4 −1−1 3

4

]. The eigenvalues satisfy

λ2 − 19

4λ+ 2 = 0;

Thus

λ =

194 ±

√36116 − 8

2=

19

8± 1

8

√233 ≈

{4.28300.4670

implying that f has a local minimum at (1/16, 1/4).

(iii) Hess(f)(−1/16,−1/4) =

[4 −1−1 3

4

]. This is the same matrix as that for

case (ii). We thus conclude that f has a local minimum at (−1/16, 1/4)as well.

Let A be a 2× 2 symmetric matrix and recall that

det(A) = λ1λ2, tr(A) = λ1 + λ2,

where λ1, λ2 are eigenvalues of A. We have showed that the eigenvalues of A areboth real. If det(A) > 0, then either both λ1 and λ2 are positive or both arenegative. If, in addition, tr(A) > 0, then both λ1 and λ2 are positive. We thusconclude from Theorem 10.5.9 that

Theorem 10.5.11. Suppose that the second partial derivatives of f are continuous

in a disk centered at (x0, y0). Suppose also that ∇f(x0, y0) =

[00

]. Then

(1) If det Hess(f)(x0, y0) > 0 and tr Hess(f)(x0, y0) > 0, then f has a localminimum at (x0, y0).

(2) If det Hess(f)(x0, y0) > 0 and tr Hess(f)(x0, y0) < 0, then f has a localmaximum at (x0, y0).

(3) If det Hess(f)(x0, y0) = 0, then (x0, y0) is not a local extremum; instead,(x0, y0) is a saddle point.

Recall that if one of the eigenvalues of Hess(f)(x0, y0) is equal to 0 (or, equiv-alently, if det Hess(f)(x0, y0) = 0), then we cannot say anything about the natureof the critical point on the basis of the Hessian matrix.

Example 10.5.12. In this problem, we will illustrate that if one of the eigenvaluesof the Hessian matrix at a point where the gradient vanishes is equal to 0, then we

Page 150: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

150 10. MULTI-VARIABLE CALCULUS

cannot make any statements about whether the point is a local extremum just onthe basis of the Hessian matrix.

Consider the following functions:

f1(x, y) = x2, f2(x, y) = x2 + y3, f3(x, y) = x2 + y4.

For each i = 1, 2, 3, we have

∇fi(0, 0) =

[00

], Hess(fi)(0, 0) =

[2 00 0

].

The eigenvalues of Hess(fi)(0, 0) are 0 and 2, hence we cannot use the criterionstated in Theorem 10.5.11. However, f1 and f2 have a local (actually global)minimum at (0, 0).

Example 10.5.13. Find and classify the critical points of

f(x, y) = x3 − 4xy + y, (x, y) ∈ R2.

Proof. Compute

∇f(x, y) =

[3x2 − 4y−4x+ 1

], Hess(f)(x, y) =

[6x −4−4 0

].

The only critical point is (1/4, 3/64), since f is differentiable on R2. From

Hess(f)

(1

4,

3

64

)=

[32 −4−4 0

],

we see that det Hess(f)(1/4, 3/64) = −16 < 0 and hence f has a saddle point at1/4, 3/64). �

Example 10.5.14. Find and classify the critical points of

f(x, y) =√x2 + y2, (x, y) ∈ R2.

Proof. Compute

∇f(x, y) =

x√x2+y2y√x2+y2

=1√

x2 + y2

[xy

], (x, y) 6= (0, 0).

Since the gradient of f is undefined at (0, 0), the point (0, 0) is a critical point.

There are no other critical points, because ∇f(x, y) 6=[00

]for (x, y) 6= (0, 0).

Since f(x, y) ≥ 0, it follows that f(x, y) has a local (actually global) minimum at(0, 0). �

Page 151: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 151

10.5.2. Global extrema. Recall that, for functions of on variable, the extreme-value theorem, Theorem 5.1.1, guarantees the existence of global extrema for func-tions defined on a closed interval. The analogue of closed intervals in the two-dimensional plane is a closed set; similarly, the analogue of an open interval is anopen set.

Let D ⊂ R2 be a set.

(i) A point (x, y) is called an interior point of D if there exists a δ > 0 suchthat the disk centered at (x, y) with radius δ is contained in D—that is,if Bδ(x, y) ⊂ D.

(ii) A point (x, y) is called a boundary point of D if every disk centered at(x, y) contains both points in D and points not in D; the boundary point(x, y) need not be contained in D.

(iii) The interior of D consists of all interior points of D, written as Int(D)of D◦; the boundary of D consists of all boundary points of D, writtenas bdy(D) or ∂D.

(iv) A set D ⊂ R2 is open if D = D◦; a set D ⊂ R2 is closed if D = D :=D◦ ∪ ∂D.

Consider the open unit disk

(10.5.4) B := {(x, y) ∈ R2 : x2 + y2 < 1}.The boundary of B is the unit circle {(x, y) ∈ R2 : x2 + y2 = 1} and B = {(x, y) ∈R2 : x2 + y2 ≤ 1}.

(v) A set D ⊂ R2 is bounded if it is contained within some disk.

Theorem 10.5.15. (Extreme-value theorem in R2) If f is continuous on aclosed and bounded set D ⊂ R2, then f has both a global maximum and a globalminimum on D.

Global extrema can occur in the interior of D or on the boundary of D. Wehave discussed how to find candidates for local extrema in the interior. To findlocal extrema on the boundary, we consider the restricted function f |D that canbe viewed as a function of one variable; we can then use the tools of single-variablecalculus to find all candidates for local extrema on the boundary of D. To findglobal extrema for continuous functions defined on a closed and bounded set, wethus proceed as follows:

(1) Determine all candidates for local extrema in the interior of D.(2) Determine all candidates for local extrema on the boundary of D.(3) Select the global maximum and the global minimum from the set of points

determined in steps (1) and (2).

Example 10.5.16. Find the global extrema of

f(x, y) = x2 − 3y + y2, −1 ≤ x ≤ 1, 0 ≤ y ≤ 2.

Proof. By Theorem 10.5.15, the function f(x, y) has global extrema. Com-pute

∇f(x, y) =

[2x

−3 + 2y

], Hess(f)(x, y) =

[2 00 2

].

Page 152: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

152 10. MULTI-VARIABLE CALCULUS

(-1,0)

(-1,1.5)

(-1,2) (0,2) (1,2)

(1,1.5)

(1,0)(0,0)

(0,1.5)

Letting ∇f(x, y) =

[00

]we find that (0, 3/2) is in the interior of the domain of

f and by Theorem 10.5.11, f(x, y) has a local minimum −2.25 at (0, 3/2).We now check the boundary values of f(x, y).

(i) Consider the line segment C1 = {(x, y) ∈ R2 : −1 ≤ x ≤ 1 and y = 0}.On C1, the function f is of the form

f(x, 0) = x2, −1 ≤ x ≤ 1.

Hence, the critical point of f on C1 is (0, 0), and then f has the globalminimum 0 at (0, 0) and has the global maximum 1 at (−1, 0) and (1, 0),on the line segment C1.

(ii) Consider the line segment C2 = {(x, y) ∈ R2 : x = 1 and 0 ≤ y ≤ 2}. OnC2, the function f is of the form

f(1, y) = 1− 3y + y2, 0 ≤ y ≤ 2.

Hence, the critical point of f on C2 is (1, 3/2), and then f has the globalminimum −1.25 and has the global maximum 1 at (1, 0), on the linesegment C2.

(iii) Consider the line segment C3 = {(x, y) ∈ R2 : −1 ≤ x ≤ 1 and y = 2}.On C3, the function f is of the form

f(x, 2) = x2 − 2, −1 ≤ x ≤ 1.

Hence, the critical point of f on C3 is (0, 2), and then f has the globalminimum −2 at (0, 0) and has the global maximum −1 at (−1, 0) and(1, 0), on the line segment C3.

Page 153: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 153

(iv) Consider the line segment C4 = {(x, y) ∈ R2 : x = −1 and 0 ≤ y ≤ 2}.On C4, the function f is of the form

f(−1, y) = 1− 3y + y2, 0 ≤ y ≤ 2.

Hence, the critical point of f on C4 is (−1, 3/2), and then f has the globalminimum −1.25 at (−1, 3/2) and has the global maximum 1 at (−1, 0).

Therefore, the function has the global maximum 1 at (−1, 0) and (1, 0), and theglobal minimum −2.25 at (0, 3/2). �

Example 10.5.17. Find the absolute maxima and minima of f(x, y) = x2 + y2 −2x+ 4 on the disk D = {(x, y) ∈ R2 : x2 + y2 ≤ 4}.

Proof. By Theorem 10.5.15, the function f(x, y) has global extrema. Com-pute

∇f(x, y) =

[2x− 2

2y

], Hess(f)(x, y) =

[2 00 2

].

The critical point of f in the domain D is (1, 0) and f(1, 0) = 3.We now seek extrema on the boundary of the domain: the circle x2 + y2 = 4.

Consider the parameterization of the circle:

x = 2 cos θ, y = 2 sin θ, 0 ≤ θ < 2π.

On the boundary ∂D, we have

f(x, y) = 4− 4 cos θ + 4 = 8− 4 cos θ = g(θ), 0 ≤ θ < 2π.

Since g′(θ) = 4 sin θ, it follows that the critical points of g(θ) are θ = 0 and θ = π.Consequently, f(x, y) has the minimum f(2, 0) = 4 at (2, 0) and the maximumf(−2, 0) = 12 at (−2, 0).

Therefore the functions has the global maximum at (−2, 0) and the globalminimum at (1, 0). �

Example 10.5.18. Find the absolute maxima and minima of f(x, y) = x2 + y2 +x− y on the disk D = {(x, y) ∈ R2 : x2 + y2 ≤ 1}.

Proof. Compute

∇f(x, y) =

[2x+ 12y − 1

], Hess(f)(x, y) =

[2 00 2

].

Hence the critical point of f in the interior of D is (−1/2, 1/2) and f(x, y) has a localminimum f(−1/2, 1/2) = −1/2 at (−1/2, 1/2). We now consider the boundary ofD: the unit circle x2 + y2 = 1. On the unit circle, we have

f(x, y) = 1 + cos θ − sin θ = g(θ), 0 ≤ θ < 2π.

Since g′(θ) = − sin θ − cos θ, we find that the critical points of g(θ) are

θ =π

2,

4,

2,

4;

Page 154: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

154 10. MULTI-VARIABLE CALCULUS

the corresponding values are

g(θ) = 0, 1, 1, 1 +√

2.

Therefore, the function f(x, y) has the global minimum −1/2 at (−1/2, 1/2) and

the global maxmimum 1 +√

2 at (√

2/2,−√

2/2). �

Example 10.5.19. Determine the values of three nonnegative numbers whose sumis 90 and whose product is maximal.

Proof. We denote the three numbers by x, y, z. Then

x+ y + z = 90, x, y, z ≥ 0.

Consider the function

f(x, y) = xyz = xy(90− x− y), x+ y ≤ 90, x ≥ 0, y ≥ 0,

and the domain D = {(x, y) ∈ R2 : x+ y ≤ 90, x ≥ 0, y ≥ 0}. Compute

∇f(x, y) =

[90y − 2xy − y2

90x− x2 − 2xy

], Hess(f)(x, y) =

[−2y 90− 2x− 2y

90− 2x− 2y −2x

].

The critical points of f in the interior of D satisfy

0 = y(90− 2x− y), 0 = x(90− 2y − x).

The solutions to above system is

(x, y) = (0, 0), (0, 90), (90, 0), (30, 30).

Since we consider the critical points of f in the interior of D, it follows that such acritical point is (30, 30). From

Hess(f)(30, 30) =

[−60 −30−30 −60

]we see that f(x, y) has a local maximum f(30, 30) = 27000 at (30, 30).

We now consider the boundary of D. The boundary of D consists of three linesegments:

(i) {(x, y) ∈ R2 : 0 ≤ x ≤ 90 and y = 0}.(ii) {(x, y) ∈ R2 : x+ y = 90 and 0 ≤ x ≤ 90}.(iii) {(x, y) ∈ R2 : x = 0 and 0 ≤ y ≤ 90}.

In each case, we have f(x, y) = 0. Therefore, the maximum of the product of threenonnegative numbers is 27000. �

Example 10.5.20. Suppose crop yield Y depends on nitrogen (N) and phosphorus(P) concentrations as

Y (N,P ) = NPe−(N+P ).

Find the value of (N,P ) that maximizes crop yield.

Page 155: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 155

Proof. Compute

∇Y (N,P ) = e−(N+P )

[(1−N)P(1− P )N

],

and

Hess(Y )(N,P ) = e−(N+P )

[(N − 2)P (1−N)(1− P )

(1−N)(1− P ) (P − 2)N

]The solutions of ∇Y (N,P ) = 0 are

(N,P ) = (0, 0), (1, 1).

Since

Hess(Y )(0, 0) =

[0 11 0

], Hess(Y )(1, 1) = e−2

[−1 00 −1

],

it follows that Y (N,P ) has the global maximum e−2 at (1, 1). �

10.5.3. Extrema with constraints. Consider the function

(10.5.5) f(x, y) = e−xy, x2 + 4y2 ≤ 1.

Compute

∇f(x, y) =

[−ye−xy−xe−xy

], Hess(f)(x, y) =

[y2e−xy (xy − 1)e−xy

(xy − 1)e−xy x2e−xy

].

Letting ∇f(x, y) =

[00

]yields (x, y) = (0, 0). then

Hess(f)(0, 0) =

[0 −1−1 0

].

Since det Hess(f)(0, 0) < 0, (0, 0) is a saddle point. Hence, the global extremamust occur on the boundary of {(x, y) ∈ R2 : x2 + 4y2 ≤ 1}:

(10.5.6) f(x, y) = e−xy, g(x, y) = x2 + 4y2 − 1 = 0.

To find the extrema of (10.5.5) on the boundary, we need the following

Theorem 10.5.21. (Lagrange’s theorem) Assume that f and g have continuousfirst partial derivatives and that f(x, y) has an extremum at (x0, y0) subject to the

constraint g(x, y) = 0. If ∇g(x0, y0) 6=[00

], then there exists a number λ such that

(10.5.7) ∇f(x0, y0) = λ∇g(x0, y0).

The number λ is called a Lagrange multiplier. Using Lagrange multipliersto find candidates for extrema subject to a constraint is called the method ofLagrange multiplier. The condition (10.5.7) is a necessary condition.

Example 10.5.22. Find all extrema of f(x, y) = e−xy subject to the constraintx2 + 4y2 = 1.

Page 156: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

156 10. MULTI-VARIABLE CALCULUS

Proof. As in (10.5.6), let g(x, y) = x2 + 4y2− 1. By Theorem 10.5.21, we arelooking for (x, y) and λ satisfying

∇f(x, y) = λ∇g(x, y), g(x, y) = 0.

Since

∇f(x, y) = e−xy[−y−x

], ∇g(x, y) =

[2x8y

],

we arrive at−ye−xy = 2λx, −xe−xy = 8λy, x2 + 4y2 = 1.

eliminating λ yieldsx2 − 4y2 = 0, x2 + 4y2 = 1.

There are four solutions

(x, y) =

(√1

2,

1

2

√1

2

),

(√1

2,−1

2

√1

2

),

(−√

1

2,

1

2

√1

2

),

(−√

1

2,−1

2

√1

2

)with

f

(√1

2,

1

2

√1

2

)= f

(−√

1

2,−1

2

√1

2

)= e−1/4

and

f

(√1

2,−1

2

√1

2

)= f

(−√

1

2,

1

2

√1

2

)= e1/4.

The maxima are (−√

1/2,√

1/2/2) and (√

1/2,−√

1/2/2), and the minima are

(√

1/2,√

1/2/2) and (−√

1/2,−√

1/2/2). �

We have mentioned that the condition ∇f = λ∇g is a necessary condition.This means that finding (x0, y0) so that ∇f(x0, y0) = λ∇g(x0, y0) only identifiescandidates for local extrema.

Example 10.5.23. Use Lagrange multipliers to identify candidates for local ex-trema of f(x, y) = y subject to the constraint y − x3 = 0, and show that there isone such candidate that turns out not to be a local extremum. Furthermore, showthat the function f(x, y) subject to the constraint y−x3 = 0 has no global extrema.

Proof. We define g(x, y) = y − x3. Then

∇f(x, y) =

[01

], ∇g(x, y) =

[−3x2

1

].

From Theorem 10.5.21, we have

0 = −3λx2, 1 = λ, y = x3.

Hence (x, y) = (0, 0).We claim that (0, 0) is not a local extremum. Along the curve y − x3 = 0, we

havef(x, y) = f(x, x3) = x3;

we know from single-variable calculus that h(x) = x3 has no local extrema onR, and hence (0, 0) is not a local minimum. Because limx→∞ h(x) = ∞ and

Page 157: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

10.5. APPLICATIONS 157

limx→−∞ h(x) = −∞, the function f(x, y) subject to the constraint y−x3 = 0 hasno global extrema. �

Example 10.5.24. Suppose you wish to enclose a rectangular plot. You have 1600ft of fencing. Using that material, what are the dimensions of the plot that willhave the largest area?

Proof. We wish to maximize

A = xy

subject to the constraint 2x+ 2y = 1600. Consider

f(x, y) = xy, g(x, y) = 2x+ 2y − 1600 = 0.

From

∇f(x, y) =

[yx

], ∇g(x, y) =

[22

],

and the equation ∇f(x, y) = λ∇g(x, y), we have

y = 2λ, x = 2λ, x+ y = 800,

from which we get λ = 200 and x = y = 400, with f(400, 400) = 160000.We now look at the boundary. By the physical reason, x, y > 0, so that we

need only to consider the line segment x+ y = 800 with 0 < x < 800. On this linesegment, we have

f(x, y) = f(x, 800− x) = x(800− x) = −x2 + 800x, 0 < x < 800.

The maximum value takes at (400, 400). Consequently, the largest area isf(400, 400) = 160000. �

Example 10.5.25. Letf(x, y) = x+ y

with constraint function1

x+

1

y= 1, x 6= 0, y 6= 0.

Use Lagrange multipliers to find all local extrema. Are these global extrema?

Proof. Let g(x, y) = 1x + 1

y − 1. From

∇f(x, y) =

[11

], ∇g(x, y) =

[−1/x2

−1/y2

],

we have

1 = − λ

x2, 1 = − λ

y2,

1

x+

1

y= 1, x 6= 0, y 6= 0.

Thus y = x or y = −x. In the second case, we obtain 1 = 1x + 1

−x = 0, a

contradiction. Hence y = x and hence 1 = 1x + 1

x = 2x . Consequently, x = y = 2.

So, there is only one local extrema (2, 2) with f(2, 2) = 4.

Page 158: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

158 10. MULTI-VARIABLE CALCULUS

It is clear to see that the local extrema (0, 0) is not global, since

limx→1

f(x, y) = limx→1

(x+

x

x− 1

)= limx→1

x2

x− 1= ±∞.

Page 159: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

CHAPTER 11

Systems of differential equations

In this chapter, we develops the theory of systems of differentialequations.

11.1. Linear systems

A system of differential equations is

dx1

dt= g1(t, x1, x2, · · · , xn),

dx2

dt= g2(t, x1, x2, · · · , xn),

...(11.1.1)

dxndt

= gn(t, x1, x2, · · · , xn).

On the left-hand side of (11.1.1) are the derivatives of xi(t) with respect to t; onthe right-hand side of each equation is a function gi that depends on the variablesx1, x2, · · · , xn and on t.

We first look at the case when the functions gi are linear in the variablesx1, x2, · · · , xn—that is, when, for i = 1, · · · , n,

(11.1.2) gi(t, x1, x2, · · · , xn) = ai1(t)x1 + ai2(t)x2 + · · ·+ ain(t)xn + fi(t).

We can write the linear system in matrix form as

(11.1.3)dx

dt= A(t)x(t) + f(t),

where

(11.1.4) x(t) =

x1(t)x2(t)

...xn(t)

, A(t) =

a11(t) a12(t) · · · a1n(t)a21(t) a22(t) · · · a2n(t)

......

......

an1(t) an2(t) · · · ann(t)

,f(t) =

f1(t)f2(t)

...fn(t)

Equation (11.1.4) is called a system of linear first-order equations. We willinvestigate only the case when f(t) = 0 and A(t) does not depend on t. In thiscase, (11.1.3) reduces to

(11.1.5)dx

dt= Ax(t),

159

Page 160: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

160 11. SYSTEMS OF DIFFERENTIAL EQUATIONS

where

A =

a11 a12 · · · a1n

a21 a22 · · · a2n

......

......

an1 an2 · · · ann

Equation (11.1.5) is called a homogeneous linear first-order system withconstant coefficients, since f(t) = 0. Since the matrix A does not depend on t,all the coefficients are constant; such a system is autonomous.

In this chapter, we restrict to the case n = 2:

dx

dt= Ax(t),

where

x(t) =

[x1(t)x2(t)

], A =

[a11 a12

a21 a22

].

Example 11.1.1. Write

dx1

dt= 4x1 − 2x2

dx2

dt= −3x1 + x2

in matric notation.

Proof. We havedx(t)

dt=

[4 −2−3 1

]x(t),

where x(t) =

[x1(t)x2(t)

]. �

A solution is an ordered n-tuple of functions (x1(t), x2(t), · · · , xn(t)) that sat-isfies (11.1.5). An equilibrium is a point x = (x1, x2, · · · , xn) such that Ax = 0.

11.1.1. Direction fields. Consider

(11.1.6)dx1

dt= x1 − 2x2,

dx2

dt= x2.

Consider the point (2,−1) in the x1x2-plane. From (11.1.6), we have

dx2

dx1=dx2/dt

dx1/dt=

x2

x1 − 2x2;

then along a curve whose tangent line at (2,−1) has slope

dx2

dx1

∣∣∣∣(2,−1)

=−1

2− 2(−1)= −1

4,

and this tangent line is y = − 14x−

12 .

We can draw tangent lines at each point (x1, x2) in the x1x2=plane. Knowingall the tangent lines then allows us to sketch the corresponding solution curve. This

is done by assigning each point (x1, x2) in the x1x2-plane a vector

[dx1/dtdx2/dt

]which

Page 161: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

11.2. SOLVING LINEAR SYSTEMS 161

has the property that it is tangential to the solution curve that passes through thepoint (x1, x2) and it points in the direction of the solution.

In the example (11.1.6), the vector is of the form

[x1 − 2x2

x2

]and the slope of

the solution curve that goes through (x1, x2) is

dx2

dx1=

x2

x1 − 2x2.

The collection of these vectors is called a direction field or slope field, and eachvector of the direction field is called a direction vector.

The point (0, 0) is special: when we compute the direction vector at (0, 0), wefind that [

dx1/dtdx2/dt

]=

[00

].

That is, if we start at this point, neither x1(t) nor x2(t) will change. We call suchpoints equilibria. We will discuss their significance in Section 11.3.

11.2. Solving linear systems

We now consider the solutions of a linear system.

11.2.1. Specific solutions. Consider the following differential equation

(11.2.1)dx

dt= ax.

From (11.2.1), we get

(11.2.2) x(t) = ceat.

We now consider a system of two linear equations

dx1

dt= a11x1(t) + a12x2(t),

dx2

dt= a21x1(t) + a22x2(t),

which, in matrix form, is written as

(11.2.3)dx

dt= Ax(t).

A solution of (1.2.3) is a vector-valued function.

Example 11.2.1. Consider

dx1

dt= x1(t),

dx2

dt= 2x2(t).

Thus,

A =

[1 00 2

].

Using (11.2.2) impliesx1(t) = c1e

t, x2(t) = c2e2t

or

x(t) =

[c1e

t

c2e2t

]= et

[c10

]+ e2t

[0c2

].

Page 162: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

162 11. SYSTEMS OF DIFFERENTIAL EQUATIONS

On the other hand, if λ is an eigenvalue of the matrix A, we have λ1 = 1 andλ2 = 2. Hence

x(t) = eλ1t

[c10

]+ eλ2t

[0c2

].

This example suggests us that the general solution is of the form

(11.2.4) x(t) = ueλ1t + veλ2t,

where λ1, λ2 are eigenvalues of A.

We now claim that (11.2.3) has the form (11.2.4).

Lemma 11.2.2. If λ is an eigenvalue of A with an eigenvector u =

[u1

u2

], then

(11.2.5) x(t) = eλtu

is a solution of (11.2.3).

Proof. Plugging (11.2.5) into (11.2.3) implies

dx

dt=

[u1λe

λt

u2λeλt

]= λeλtu = eλtAu = Ax(t).

In this subsection we will look only at differential equations of the form (11.2.3)for which the eigenvalues of A are both real and distinct. We will discuss complexeigenvalues in the next subsection. We will not discuss the case when both eigen-values are identical.

Example 11.2.3. Find specific solutions of

(11.2.6)dx1

dt= 2x1 − 2x2,

dx2

dt= 2x1 − 3x2.

Proof. The coefficient matrix of (11.2.6) is

A =

[2 −22 −3

].

Since det(A) = 2× (−3)− 2× (−2) = −2 and tr(A) = 2− 3 = −1, it follows that

0 = λ2 + λ− 2 =⇒ λ1 = 1 and λ2 = −2.

For λ1 = 1, an eigenvector u =

[u1

u2

]satisfies

0 = (A− λ1I2)u =

[1 −22 −4

] [u1

u2

]=⇒ u1 − 2u2 = 0 =⇒ u = u2

[21

].

Hence

x(t) = u2et

[21

], u2 ∈ R,

Page 163: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

11.2. SOLVING LINEAR SYSTEMS 163

is a solution of (11.2.6).

For λ2 = −2, an eigenvalue v =

[v1

v2

]satisfies

0 = (A− λ2I2)v =

[4 −22 −1

] [v1

v2

]=⇒ 2v1 − v2 = 0 =⇒ v = u1

[12

].

Hence

x(t) = v1e−2t

[12

], v1 ∈ R,

is a solution of (11.2.6). �

11.2.2. General solutions. Suppose that y(t) and z(t) are two solutions of

dx

dt= Ax(t).

That isdy

dt= Ay(t),

dz

dt= Az(t).

Sinced

dt[c1y(t) + c2z(t)] = c1

dy

dt+ c2

dz

t= c1Ay(t) + c2Az(t) = A[c1y(t) + c2z(t)],

it follows that c1y(t) + c2z(t) is also a solution.

Lemma 11.2.4. Suppose that[dx1/dtdx2/dt

]=

[a11 a12

a21 a22

] [x1(t)x2(t)

].

If

y(t) =

[y1(t)y2(t)

]and z(t) =

[z1(t)z2(t)

]are solutions, then

x(t) = c1y(t) + c2z(t)

is also a solution.

We only consider the case that the coefficient matrix A has two real and distincteigenvalues. When A has repeated eigenvalues or complex eigenvalues, we do notgive the general solution here.

Theorem 11.2.5. Letdx

dt= Ax(t)

where A is a 2 × 2 matrix with two real and distinct eigenvalues λ1 and λ2 withcorresponding eigenvectors u and v. Then

(11.2.7) x(t) = c1eλ1tu + c2e

λ2tv

is the general solution, where the constants c1 and c2 depend on the initial condition.

Page 164: Calculus II: For Biology and Medicine Yi Limath.jhu.edu/~yli/Calculus II.pdf · Calculus II: For Biology and Medicine Yi Li ... 5.4. Antiderivative 47 Chapter 6. Integrations ...

164 11. SYSTEMS OF DIFFERENTIAL EQUATIONS

The general solution of (11.2.6) is

(11.2.8) x(t) = c1et

[21

]+ c2e

−2t

[12

].

Example 11.2.6. If (11.2.6) has the initial condition

x(0) =

[−14

],

then, by (11.2.8),

c1e0

[21

]+ c2e

−2×0

[12

]=

[−14

];

thus2c1 + c2 = −1, c1 + 2c2 = 4 =⇒ c1 = −2, c2 = 3.

Hence the general solution of (11.2.6) is

x1(t) = −4et + 3e−2t, x2(t) = −2et + 6e−2t.

Example 11.2.7. Solve

dx

dt=

[2 −31 −2

]x(t) = Ax(t)

with the initial condition x(0) =

[3−1

].

Proof. Since det(A) = −1 and tr(A) = 0, it follows that

0 = λ2 − 1 =⇒ λ1 = 1 and λ2 = −1.

For λ1 = 1 we have

0 = (A− λ1I2)u =

[1 −31 −3

] [u1

u2

]=⇒ u1 − 3u2 = 0 =⇒ u = u2

[31

];

for λ2 = −1 we have

0 = (A− λ2I2)v =

[3 −31 −1

] [v1

v2

]=⇒ v1 − v2 = 0 =⇒ v = v2

[11

].

Hence the general solution is

x(t) = c1et

[31

]+ c2e

−t[11

].

By the initial condition, we have

3c1 + c2 = 3, 2c1 = 4 =⇒ c1 = 2, c2 = −3.

Thusx1(t) = 6et − 3e−t, x2(t) = 2et − 3e−t.

11.3. Equilibria and stability