Calculus PDF

Title Calculus
Author Anonymous User
Course Calculus
Institution Imperial College London
Pages 106
File Size 2 MB
File Type PDF
Total Downloads 74
Total Views 285

Summary

LECTURE NOTESIMPERIAL COLLEGE LONDONDEPARTMENT OF COMPUTINGCalculusAbbas Edalat, Paul BilokonVersion: November 15, 2021Contents 1 Course Overview I Preliminaries 2 Sets 2 Introduction 2 Basic definitions 2 Russell’s paradox 2 Operations on sets 2 Functions 2 Finite and infinite sets 2 Countable sets...


Description

L ECTURE N OTES I MPERIAL C OLLEGE L ONDON D EPARTMENT

OF

C OMPUTING

Calculus Abbas Edalat, Paul Bilokon

Version: November 15, 2021

Contents 1 Course Overview

3

I Preliminaries

4

2 Sets 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9

. . . . . . . . .

5 5 5 7 7 11 12 13 15 16

. . . . . .

18 18 19 21 23 26 26

Introduction . . . . . . Basic definitions . . . Russell’s paradox . . . Operations on sets . . Functions . . . . . . . Finite and infinite sets Countable sets . . . . Historical remarks . . Further reading . . . .

3 Proofs 3.1 Introduction . . . . 3.2 Examples . . . . . 3.3 Quantifiers . . . . 3.4 Induction . . . . . 3.5 Historical remarks 3.6 Further reading . .

. . . . . .

. . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

II Foundations of analysis

27

4 Sequences 4.1 Binary relations . . . . . . . . . 4.2 Mathematical functions . . . . 4.3 Functions in programming . . . 4.4 Sequences . . . . . . . . . . . . 4.5 The bulldozers and the bee . . 4.6 The definition of convergence . 4.7 An illustration of convergence . 4.8 Common convergent sequences 4.9 Combinations of sequences . . 4.10 Cauchy sequences . . . . . . . 4.11 The sandwich theorem . . . . . 4.12 Ratio tests for sequences . . . .

28 28 28 29 30 34 35 36 38 38 40 42 44

. . . . . . . . . . . . 2

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

CONTENTS

Table of Contents

4.13 4.14 4.15 4.16 4.17 4.18

Proof of correctness of ratio tests . . . . . . . . Subsequences of a sequence . . . . . . . . . . . Manipulating absolute values: useful techniques Properties of real numbers . . . . . . . . . . . . Historical remarks . . . . . . . . . . . . . . . . Further reading . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

45 46 47 47 50 51

5 Continuous Functions 52 5.1 Limits of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.2 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.2.1 Maxima and Minima . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.2 Intermediate Value theorem . . . . . . . . . . . . . . . . . . . 55 5.2.3 Uniform Continuity . . . . . . . . . . . . . . . . . . . . . . . . 55 6 Integration 57 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.2 Lower and Upper Sums, Riemann Sums . . . . . . . . . . . . . . . . 57 6.2.1 Improper Riemann Integral . . . . . . . . . . . . . . . . . . . 61 7 Series 7.1 Geometric Series . . . . . . . . . . . . . . . . 7.2 Harmonic Series . . . . . . . . . . . . . . . . 7.3 Series of Inverse Squares . . . . . . . . . . . . 7.4 Common Series and Convergence . . . . . . . 7.5 Convergence Tests for Series of Positive Terms 7.6 Some Proofs of Ratio Tests . . . . . . . . . . . 7.7 Absolute Convergence . . . . . . . . . . . . . 7.7.1 The nth-root test for convergence . . .

. . . . . . . .

62 64 65 65 67 68 73 74 77

8 Differentiation 8.1 Differentiation of Real Functions . . . . . . . . . . . . . . . . . . . . 8.1.1 Mean Value Theorem and Taylor’s Theorem . . . . . . . . . . 8.1.2 L’Hopital’s rule . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.3 Fundamental Theorem of Calculus . . . . . . . . . . . . . . .

80 80 84 86 86

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

9 Power Series 88 9.1 Basics of Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . 88 9.2 Maclaurin Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 9.3 Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 9.3.1 Differentiation and Integration of Power Series . . . . . . . . 98 9.4 Power Series Solution of ODEs . . . . . . . . . . . . . . . . . . . . . 99

3

CONTENTS

Contents

Preface These lecture notes are intended for first year undergraduate students of computer science at Imperial College London and cover basic mathematical concepts in calculus that are required in other courses. The lecture notes were originally based on Jeremy Bradley’s material from 2014/15, but the course has been restructured since then. Many people have helped improving these lecture notes by providing comments, suggestions and corrections. In particular, thanks to Romain Barnoud, Mahdi Cheraghchi, Ruhi Choudhury, Marc Deisenroth, Tony Field and Michael Huth for valuable feedback and additions. Abbas Edalat September 2020

1

Contents

CONTENTS

2

1 Course Overview This introductory course covers background that is essential to many other courses in the Department of Computing. We will cover topics, including • sequences • continuous functions • integration • series • differentiation • power series • numerical methods • metric spaces • vector derivatives • applications to neural networks There are many courses in the department that require an understanding of mathematical concepts. These courses range from optimization, operations research and complexity to machine learning, robotics, graphics and computer vision. The department offers additional courses that cover other and more advanced mathematical concepts: Linear Algebra (1st year), Probability and Statistics (2nd year), Computational Techniques (2nd year), Mathematics for Inference and Machine Learning (4th year).

3

Part I Preliminaries

4

2 Sets 2.1 Introduction We begin our journey by introducing the language of set theory. This theory, originally developed towards the end of the 19th century, has by now become an extensive subject in its own right. More important, however, is the great influence which set theory has exerted and continues to exert on mathematical thought as a whole.

2.2 Basic definitions Definition 1 A set is simply a collection of objects, which are called its members or elements. There are several ways of describing a set. Sometimes the most convenient way is to make a list of all the objects in the set and put curly brackets around the list. Example 1 Here are some examples of sets: • {1, 3, 5} is the set consisting of objects 1, 3, and 5. • {John, cat, 3.57} is the set consisting of objects John, cat, and 3.57. • {1, {2}} is the set consisting of two objects, one being the number 1 and the other the set {2}. Often this isn’t a convenient way to describe a set. For example, the set consisting of all people who live in England is for most purposes best described by precisely this phrase (i.e., “the set of people who live in England”); it is unlikely to be useful to describe this set in list form {Michael, Anne, Abbas, ...}. As another example, the set of all real numbers whose square is less than 2 is neatly described by the notation {x | x a real number, x2 < 2}. (This is read: “the set of all x such that x is a real number and x2 < 2.” The symbol “|” is the “such that” part of the phrase.) Likewise, {x | x a real number, x2 − 2x + 1 = 0}

denotes the set consisting of all real numbers x such that x2 − 2x + 1 = 0. As a convention, we define the empty set to be the set consisting of no objects at all, and denote the empty set by the symbol ∅. 5

2.2. Basic definitions

Chapter 2. Sets

Definition 2 If S is a set, and s is an element of S (i.e., an object that belongs to S), we write s∈S and say s belongs to S. If some other object t does not belong to S, we write t < S . Example 2 For example, • 1 ∈ {1, 3, 5} but 2 < {1, 3, 5}. • If S = {x | x a real number, 0 ≤ x ≤ 1}, then 1 ∈ S but Fred < S . • {2} ∈ {1, {2}} but 2 < {1, {2}}. • 1 < ∅. Definition 3 Two sets are defined to be equal when they consist of exactly the same elements. Example 3 Here are some examples: • {1, 3, 5} = {3, 5, 1} = {1, 5, 1, 3}. • {x | x a real number, x2 − 2x + 1 = 0} = {1}. • {x | x a real number, x2 + 1 = 0} = the set of green swans = ∅. Definition 4 We say a set T is a subset of a set S if every element of T also belongs to S (i.e., T consists of some of the elements of S). We write T ⊆ S if T is a subset of S and T * S if not. Example 4 For example, • If S = {1, {2}, cat}, then {cat} ⊆ S, {{2}} ⊆ S, {2} * S. • The subsets of {1, 2} are

{1, 2}, {1}, {2}, ∅.

(By convention, ∅ is a subset of every set.) Note that S = T iff1 S and T iff S ⊆ T and T ⊆ S, i.e. iff every element of S is an element of T and every element of T is an element of S. If S ⊆ T but S , B, we call S a proper subset of T . 1 The abbreviation “iff” stands for “if and only if”. It first appeared in print in [Kel55], whereas the invention of this abbreviation is attributed to the Hungarian-born American mathematician and statistician Paul Halmos (1916–2006).

6

Chapter 2. Sets

2.3. Russell’s paradox

2.3 Russell’s paradox The set theory that we have discovered so far is deceptively simple. Amidst this seeming simplicity lurks an important paradox2 : Paradox 1 (Russell’s paradox) Most sets commonly encountered are not members of themselves. For example, consider the set of all squares in the plane. This set is not itself a square in the plane, thus it is not a member of itself. Let us call a set “normal” if it is not a member of itself, and “abnormal” if it is a member of itself. Clearly every set must be either normal or abnormal. The set of squares in the plane is normal. In contrast, the complementary set that contains everything which is not a square in the plane is itself not a square in the plane, and so it is one of its own members and is therefore abnormal. Now consider the set of all normal sets R, and try to determine whether R is normal or abnormal. If R were normal, it would be contained in the set of all normal sets (itself), and therefore be abnormal; on the other hand if R were abnormal, it would be contained in the set of all normal sets (itself), and therefore be normal. This leads to the conclusion that R is neither normal nor abnormal: Russell’s paradox. Because the set theory that we have considered so far admits paradoxes, such as the ıve set theory. However, it usually suffices one above, it is sometimes called the na¨ for the everyday use in contemporary mathematics.

2.4 Operations on sets Definition 5 Let S and T be any two sets. By the sum or union of S and T , denoted by S ∪ T , is meant the set consisting of all elements which belong to at least one of the sets S and T (Figure 2.1). More generally, by the sum or union of an arbitrary number (finite S or infinite) of sets Sα (indexed by some parameter α), we mean the set, denoted by α Sα , of all elements belonging to at least one of the sets Sα . Definition 6 By the intersection S ∩ T of two given sets S and T , we mean the set consisting of all elements which belong to both S and T (Figure 2.2). For example, the intersection of the set of all even numbers and the set of all integers divisible by 3 is the set of all integers divisible by 6. By the intersection T of an arbitrary number (finite or infinite) of sets Sα , we mean the set, denoted by α Sα , of all elements belonging to every one of the sets Sα . 2A

paradox is a logically self-contradictory statement or statement that runs contrary to one’s expectation; it is a statement that, despite apparently valid reasoning from true premises, leads to a seemingly self-contradictory or a logically unacceptable conclusion. A paradox usually involves contradictory-yet-interrelated elements that exist simultaneously and persist over time.

7

2.4. Operations on sets

Chapter 2. Sets

S

T

Figure 2.1: S ∪ T .

S

T

Figure 2.2: S ∩ T .

Definition 7 Two sets S and T are said to be disjoint if S ∩ T = ∅, i.e. if they have no elements in common. More generally, let F be a family of sets such that S ∩ T = ∅ for every pair of sets S,T in F . Then the sets in F are said to be pairwise disjoint. It is an immediate consequence of the above definitions that the operations ∪ and ∩ are commutative S ∪ T = T ∪ S,

S ∩T =T ∩S and associative

(S ∪ T ) ∪ U = S ∪ (T ∪ U ), (S ∩ T ) ∩ U = S ∩ (T ∩ U ). Moreover, the operations ∪ and ∩ obey the following distributive laws: (S ∪ T ) ∩ U = (S ∩ U ) ∪ (T ∩ U ), (S ∩ T ) ∪ U = (S ∪ U ) ∩ (T ∪ U ). Let us actually prove that (S ∪ T ) ∩ U = (S ∩ U ) ∪ (T ∩ U ).

(2.1) 8

Chapter 2. Sets

2.4. Operations on sets

S

T

Figure 2.3: S \ T .

S

T

Figure 2.4: S△T .

Suppose x ∈ (S ∪ T ) ∩ U , so that x belongs to the left-hand side of (2.1). Then x belongs to both U and S ∪ T , i.e. x belongs to both U and at least one of the sets S and T . But then x belongs to at least one of the sets S ∩ U and T ∩ U , i.e., x ∈ (S ∩ U ) ∪ (T ∩ U ), so that x belongs to the right-hand side of (2.1). Conversely, suppose x ∈ (S ∩ U ) ∪ (T ∩ U ). Then x belongs to at least one of the sets S ∩ U and T ∩ U . It follows that x belongs to both U and at least one of the sets S and T , i.e. x ∈ U and x ∈ S ∪ T , or equivalently x ∈ (S ∪ T ) ∩ U . This completes the proof. Incidentally, this was the first proof of the course. We’ll talk about proofs and their importance in calculus shortly. By the difference S \ T between two sets S and T (in that order), we mean the set of all elements of S which do not belong to T (Figure 2.3). Note that it is not assumed that S ⊇ T . It is sometimes convenient (e.g., in measure theory) to consider the symmetric difference of two sets S and T (Figure 2.4), denoted by S△T and defined as the union of the two differences S \ T and T \ S : S△T = (S \ T ) ∪ (T \ S). We will often be concerned later with various sets which are all subsets of some underlying set R, for example, various sets of points on the real line. In this case, given a set S, the difference R \ S is called the complement of A, denoted by A. The diagrams in Figures 2.1, 2.2, 2.3, and 2.4 are known as the Venn diagrams, so named after the English mathematician, logician, and philosopher John Venn 9

2.4. Operations on sets

Chapter 2. Sets

Figure 2.5: Stained glass window at Gonville and Caius College, Cambridge, commemorating Venn and the Venn diagram.

(1834–1923). There is even a stained glass window (Figure 2.5) at Gonville and Caius College, Cambridge, commemorating Venn and the Venn diagram. An important role is played in set theory and its applications by De Morgan’s laws, so named after the 19th-century British mathematician Augustus De Morgan: \ [ Sα = Sα , α

\ α

Sα =

[

Sα ;

as a special case, S ∪T = S ∩T,

S ∩T = S ∪T.

In words, the complement of a union equals the intersection of the complement, and the complement of an intersection equals the union of the complements. Let us prove that \ [ Sα = Sα . α

S S Suppose that x ∈ R \ α Sα . Then x does not belong to the union α Sα , i.e., x does not belong to any of the sets Sα . It follows that x belongs to each of the complements R − Sα , and hence \ \ x∈ (R − Sα ) = Sα . (2.2) α

10

Chapter 2. Sets

2.5. Functions

Conversely, suppose (2.2) holds, so that x belongs to every set R − SS α . Then x does not belong to any of the sets Sα , i.e. x does not belong to the union α Sα .

2.5 Functions Let S and T be two arbitrary sets. Then a rule associating a unique element b = f (a) ∈ T for each element a ∈ S is said to define a function f on S (or a function f with domain S). f is sometimes also referred to as a mapping of S into T and is said to map S into T (and a into b). If a is an element of S, the corresponding element b = f (a) is called the image of a (under the mapping f ). Every element of S with a given element b ∈ T as its image is called a preimage of b. Note that in general b may have several preimages. Moreover, T may contain elements with no preimages at all. If b has a unique preimage, we denote this preimage by f −1 (b). If A is a subset of S, the set of all elements f (a) ∈ T such that a ∈ A is called the image of A, denoted by f (A). The set of all elements of S whose images belong to a given set B ⊆ T is called the preimage of B, denoted by f −1 (B). If no element of B has a preimage, then f −1 (B) = ∅. A function f is said to map S into T if f (S) ⊆ T , as is always the case, and onto T if f (S) = T . Thus every “onto mapping” is an “into mapping,” but not conversely. Suppose f maps S onto T . Then f is said to be one-to-one if each element b ∈ T has a unique preimage f −1 (b). In this case, f is said to establish a one-to-one correspondence (or a bijection) between S and T and the mapping f −1 associating f −1 (b) with each b ∈ T is called the inverse of f . Theorem 2 The preimage of the union of two sets is the union of the preimages of the sets: f −1 (A ∪ B) = f −1 (A) ∪ f −1 (B). Proof If x ∈ f −1 (A ∪ B), then f (x) ∈ A ∪ B, so that f (x) belongs to at least one of the sets A and B. But then x belongs to at least one of the sets f −1 (A) and f −1 (B), i.e., x ∈ f −1 (A) ∪ f −1 (B). Conversely, if x ∈ f −1 (A) ∪ f −1 (B), then x belongs to at least one of the sets f −1 (A) and f −1 (B). Therefore, f (x) belongs to at least one of the sets A and B, i.e., f (x) ∈ A ∪ B. But then x ∈ f −1 (A ∪ B).  The symbol ✷ stands for the Latin phrase quod erat demonstrandum (Q.E.D.), meaning “which was to be demonstrated”, “what was to be shown”. While some authors still use the classical abbreviation, Q.E.D., it is relatively uncommon in modern ma...


Similar Free PDFs