Sei sulla pagina 1di 148

Engineering Analytics

KC4018

Engineering Mathematics
KC4010

Teaching team
Module tutors: Drs Benoit Huard and Eamon Scullion
Department of Mathematics, Physics and Electrical Engineering
2
Week by week schedule

1 Mathematical expressions and basic functions 7


1.1 Rules of precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Transposition of formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 The quadratic formula . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.3 Expanding brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.4 Simplifying indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.5 Exponentials and Logarithms . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Trigonometric functions 15
2.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Graphs of trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Solving trigonometric equations . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 Using trigonometric identities . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5 Trigonometric ratios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 Solving trigonometric equations of the form a sin x + b cos x . . . . . . . . . . . . 19
2.7 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3 Basic differentiation I 23
3.1 General rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2 Seminar Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Basic differentiation II 29
4.1 The product rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2 The quotient rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3 The chain rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4 Seminar Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Basic integration 35
6.1 General rules (see formula sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.2 Definite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3 Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3
4 WEEK BY WEEK SCHEDULE

6.4 Integration by substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39


6.5 Log integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.6 Trig integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.7 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

7 Complex numbers 45
7.1 Cartesian Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.2 Complex arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3 The Argand diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.4 Polar form of a complex number . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.5 Exponential form of a complex number . . . . . . . . . . . . . . . . . . . . . . 49
7.6 Exponential of a complex number . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.7 Logarithm of a complex number . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.8 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

8 Complex arithmetic in polar form 53


8.1 Multiplication and Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2 Roots and de Moivre’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.3 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

9 Further Differentiation 59
9.1 Implicit differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.2 Logarithmic Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.3 Parametric Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

10 Matrices 65
10.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
10.2 Addition and subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
10.3 Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.3.1 By a scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.3.2 Multiplication of two matrices . . . . . . . . . . . . . . . . . . . . . . . 67
10.4 The Unit or Identity matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.5 Squaring a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.6 Transposition of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.7 The determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.7.1 2 × 2 matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.7.2 3 × 3 matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

11 Maxima and minima 71


11.1 Stationary points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
11.2 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
WEEK BY WEEK SCHEDULE 5

12 Linear Regression : the Least Squares Method 77


12.1 Linear regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
12.2 Nonlinear relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
12.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

13 Approximating functions: Maclaurin series 83


13.1 General procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
13.2 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
13.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

14 Partial differentiation and error analysis 89


14.1 Partial differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
14.2 Small changes and errors for a function of a single variable . . . . . . . . . . . . 90
14.3 Small changes and errors for functions of more than one variable . . . . . . . . . 91
14.4 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
14.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

15 Integration by substitution and partial fractions 95


15.1 Integration by substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
15.2 Partial fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
15.3 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
15.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

16 Integration by parts and applications 103


16.1 Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
16.2 Applications of integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
16.2.1 Mean value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
16.2.2 RMS value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
16.2.3 Volume of solid of revolution . . . . . . . . . . . . . . . . . . . . . . . 106
16.3 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
16.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

17 Cramer’s rule and the matrix inverse 111


17.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
17.2 Cramer’s rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
17.3 Inverse of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
17.3.1 Inverse of a 2 × 2 matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 113
17.3.2 Inverse of higher order matrices . . . . . . . . . . . . . . . . . . . . . . 113
17.4 Using inverse matrices to solve simultaneous equations . . . . . . . . . . . . . . 114
17.5 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
17.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

18 Vectors 117
18.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
18.2 Addition, subtraction and multiplication by a scalar . . . . . . . . . . . . . . . . 118
18.2.1 Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
18.2.2 Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
18.2.3 Multiplication by a scalar . . . . . . . . . . . . . . . . . . . . . . . . . . 118
18.3 Dot product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
18.4 Cross product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
6 WEEK BY WEEK SCHEDULE

18.5 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121


18.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

19 First-order differential equations 123


19.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
19.2 Direction integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
19.3 Separable equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
19.4 Bernoulli equations : Using an integrating factor . . . . . . . . . . . . . . . . . . 125
19.5 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
19.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

20 Homogeneous second-order differential equations 129


20.1 The general solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
20.2 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
20.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

21 Inhomogeneous second order equations 133


21.1 The method of undetermined coefficients . . . . . . . . . . . . . . . . . . . . . 133
21.2 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
21.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

22 The wave equation and separation of variables 139


22.1 The separation of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
22.2 Applying initial and boundary conditions . . . . . . . . . . . . . . . . . . . . . 141
22.3 Seminar sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
22.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Mathematics Formula Sheet 147


Week 1

Mathematical expressions and basic


functions

Mathematical operations on numbers, variables and other more complex mathematical structures,
need to follow a set of conventions so that a set of operations can be evaluated unambiguously. This
also makes mathematical expressions universally understandable, irrespective of the scientist’s
discipline. The objective of this lecture is to introduce the basic rules and functions we will
encounter throughout the year.

1.1 Rules of precedence


When performing arithmetic calculations there is a convention which tells us the order in which
the steps should be performed:
B rackets
O perations
D ivision
M ultiplication
A ddition
S ubtraction
Example 1. Evaluate 62 ÷ (7 + 5) − 2 × 4.

1.2 Transposition of formulas


Rearranging a formula to change the subject of the formula. Think about how you can
• Remove square roots
• Clear fractions
• Clear brackets
• Collect terms involving the new subject
• Isolate the new subject
Pπa4
Example 2. Rearrange Q = for l.
8ηl
E
Example 3. Rearrange I = √ for R.
R + ω2 l 2
2

7
8 WEEK 1. MATHEMATICAL EXPRESSIONS AND BASIC FUNCTIONS

1.3 Functions
A function is a map that associates values of x to new values according to a given formula

x → f (x).

For instance, if f (x) = x + 1, then f is the function that adds 1 to the value of x, e.g.

f (0) = 1, f (1) = 2, f (10) = 11, etc.

You already know quite a few examples of functions, let us look at some of them.

1.3.1 Polynomials
Polynomials form the most primitive examples of functions. They are obtained by combining
powers of x.

6 y=x
y = x+1

Linear y = ax + b.
2
a is called the slope of the line.
b is the value of the intercept
with the y axis. 0
0 1 2 3 4 5

y = x2
y = x2 − 2
20

Quadratic y = ax2 + bx + c 10

−6 −4 −2 0 2 4 6

y = x3
100 y = x3 − 5

0
Cubic y = ax3 + bx2 + cx + d

−100

−6 −4 −2 0 2 4 6

Table 1.1: Table of basic polynomials.


1.3. FUNCTIONS 9

1.3.2 The quadratic formula


Second-degree polynomials, also called quadratic polynomials, are fundamental to many physical
problems. These are of the form

y = ax2 + bx + c, a, b, c ∈ R.

The ’roots’ of this polynomial are the values of x such that

ax2 + bx + c = 0,

and it can be shown that these can be obtained directly using the following quadratic formula

−b ± b2 − 4ac
x= , b2 − 4ac ≥ 0.
2a
Note that when b2 − 4ac = 0, the two roots coincide (the root is then said to be double).
Example 4. The roots of the polynomial

x2 − x + 1

are (here a = ,b= ,c= ),

x=

1.3.3 Expanding brackets


Sometimes expressions are written in a factorised form, that is brackets are multiplied together. It
is important to remember how to expand the brackets.

(x − a)(x − b) =

Example 5. Expand the expression (x − 1)2 . We need to write it as

(x − 1)2 = (x − 1)(x − 1) =

Please note that (x − 1)2 6= x2 − 1 !

1.3.4 Simplifying indices


It is important to know how to play with indices (powers of x).

Multiplication xa xb = xa+b Add indices


Division xa /xb = xa−b Subtract indices
1 −a
Reciprocal xa = x Negative index
Raising to a power (xa )b = xab Multiply indices
Zero power x0 = 1 Gives 1

Square root x = x1/2 Fractional index

Root n
x = x1/n Fractional index

Table 1.2: Rules of indices.


10 WEEK 1. MATHEMATICAL EXPRESSIONS AND BASIC FUNCTIONS

1.3.5 Exponentials and Logarithms


We will also regularly be using exponentials and logarithms. These functions are very useful
thanks to their properties, which are given in Table 1.3 below. The number e ≈ 2.7128 is called
Euler’s number. Here we write ln x or log x interchangeably. The function ln(x) is often called the
natural log.

Exponential Logarithm
ea eb = ea+b ln (ab) = ln a + ln b
ea /eb = ea−b ln (a/b) = ln a − ln b
(ea )b = eab ln ab = b ln a
e0 = 1 ln 1 = 0
eln u = u ln eu = u

Table 1.3: Fundamental properties of exponentials and logarithms.

The graphs of the functions are given in Figure 1.1. Please notice that ln x is defined only for
x > 0 and that ex is never equal to 0.

ex log(x)
0
6

−2
4

−4
2

−6
0
−1 −0.5 0 0.5 1 1.5 2 0.5 1 1.5 2 2.5 3

Figure 1.1: Plots of the exponential function ex and the logarithmic function log(x)(= ln(x)).

Example 6. Logarithms can be used to solve indicial equations. For example, if

5x = 4

then taking logs on both sides


ln 4
ln (5x ) = ln 4 → x ln 5 = ln 4 →x= .
ln 5
1.4. SEMINAR SHEET 11

1.4 Seminar sheet

Week 1 - Transposition and Simplification

Q1. A gas in a cylinder in state 1 with pressure P1 , temperature T1 and volume V1 expands to state
2 with pressure P2 , temperature T2 and volume V2 . The ideal gas laws show that

P1V1 P2V2
= .
T1 T2

Make T1 the subject of the formula.

Q2. The speed of sound, c, in air is given by

s
γP
c=
ρ

where γ is the specific heat ratio, P is the pressure and ρ is the density. Make P the subject of
the formula.
12 WEEK 1. MATHEMATICAL EXPRESSIONS AND BASIC FUNCTIONS

Q3. The period T of a pendulum is given by


s
l
T = 2π
g

where g is acceleration due to gravity (units: m s−2 ) and l is the length of the pendulum (units:
m). Show that T will be in units of time.

Q4. The height h (above the ground level) of a ball thrown vertically upwards is given by

h = −4.9t 2 + 55t + 12
where t is time. Find the time taken to reach the ground.
where v is velocity (units: m s−1 ), d is distance (units: m), F is force [units: newtons (N) =
mass (kg) × acceleration (m s−2 )] and A is area (units: m2 ). Find the units of µ.
1.5. EXERCISES 13

1.5 Exercises
Exercises 1. Rearrange to obtain the value of x.

3x 2 1−x
1. − =0 8. =4
5 3 1+x
x R(E −V )
2. x + = 20 9. Rearrange = r for V .
15 V
3. 4(2x − 5) = 3(2x + 8) M
10. Rearrange P = + b for Q.
Q
7x
4. − (x − 2) = 12 5 4
8 11. =
2x + 5 x + 5
3x x 5(x − 4)
5. − = 3 5 5
2 3 6 12. − =
x − 2 x + 1 (x − 2)(x + 1)
18
6. −1 = 2
2x 13. (x − 3)2 − 64 = 0
4x (x − 9)2
7. =5 14. = 60
2x − 1 15
Exercises 2. Find the roots of the following quadratic equations.

1. 2x2 − 6x + 4 = 0 3. x2 − 9 = 0 5. x2 + 3x − 1 = 0

2. x2 + 4x − 5 = 0 4. x2 − 2x + 1 = 0 6. (x − 3)(x − 4) = 0

Exercises 3. Expand the following brackets.

1. (x + 2)2 3. (x + 13)(x − 5) 5. (x − 1)(x − 2)

2. (x − 4)(x − 2) 4. (x − 3)2 6. (x − 1)(x − 2)(x − 3)

Exercises 4. Simplify the following expressions.


e3x
1. e3 e4 3. ln(x3 ) 5. x−2 x5 7. x5 x6 9. e−x

x3 e2x 3
2. (ex )3 4. x2
6. (x5 )6 8. ex 10. eln x

Answers 1.
1. x = 10/9 2. x = 75/4 3. x = 22 4. x = −80 5. x = −10
RE M
6. x = 3 7. x = 5/6 8. x = −3/5 9. V = r+R 10. Q = P−b
11. x = 5/3 12. x = 4 13. x = 11 or x = −5 14. x = 39 or x = −21
Answers 2.
1. x = 1, x = 2 2. x = −5, x√= 1 3. x = −3, x = 3
4. x = 1 5. x = − 3±2 13 6. x = 3, x = 4
Answers 3.
1. x2 + 4x + 4 2. x2 − 6x + 8 3. x2 + 8x − 65
4. x2 − 6x + 9 5. x2 − 3x + 2 6. x3 − 6x2 + 11x − 6
Answers 4.
1. e7 2. e3x 3. 3 ln x 4. x 5. x3 6. x30 7. x11 8. ex 9. e4x 10. x3
14 WEEK 1. MATHEMATICAL EXPRESSIONS AND BASIC FUNCTIONS
Week 2

Trigonometric functions

2.1 Definitions

opp adj opp


sin x = , cos x = , tan x = .
hyp hyp adj
Basic trigonometric identities

tan x = , cot x = , sec x = , csc x = .


Radian measures
In many of the mathematical applications, angles must be in radians

15
16 WEEK 2. TRIGONOMETRIC FUNCTIONS

2.2 Graphs of trigonometric functions


Sine - sin x

Cosine - cos x

Tangent - tan x

2.3 Solving trigonometric equations


Example 1. Solve cos θ = 0.7 for 0◦ < θ < 360◦ .

Warning ! : Your calculator gives only the principal value, that is the angle closest to zero. There
may exist other solutions.

From a calculator, we obtain cos−1 (0.7) = .


We need to refer to the graph of cos or to the trigonometric circle to find other possible solu-
tions.

The second possible solution is therefore :


2.4. USING TRIGONOMETRIC IDENTITIES 17

For equations involving some combination of sin, cos, sin2 , cos2 , we need to use the important
relation

sin2 x + cos2 x = 1
to rewrite the equation in terms of either sin x or cos x.
Example 2. Solve cos2 x = sin x on the interval 0 ≤ x ≤ 2π.

Writing cos2 x = 1 − sin2 x, we have

1 − sin2 x = sin x ⇒ sin2 x + sin x − 1 = 0.

This is a quadratic equation for sin x, with a = 1, b = 1, c = −1. The quadratic formula gives

p
−1 ± 12 − 4 · 1 · (−1)
sin x = ≈ sin x = 0.618 or sin x = 1.618, not possible since −1 ≤ sin x ≤ 1.
2·1
The first solution is x = sin−1 (0.618) ≈ 0.666. There is another solution in the interval, π −
0.666 ≈ 2.475.

2.4 Using trigonometric identities


2 sin π8 cos π8
Example 3. Simplify , knowing that sin(2A) = 2 sin A cos A and cos(2A) = cos2 A−
cos2 π8 − sin2 π8
sin2 A.

Example 4. Solve 3 cos(2θ) + cos θ = −2, for 0◦ ≤ θ ≤ 360◦ .


18 WEEK 2. TRIGONOMETRIC FUNCTIONS

2.5 Trigonometric ratios


Exercise 1. Find the exact value of the trigonometric ratios using the triangles.

sin π6 = cos π3 = sin π4 = cos π4 =

cos π6 = sin π3 = tan π4 =

tan π6 = , tan π3 =

Exercise 2. Complete the following table using the graph of each function and the results of the
previous exercise.

π π π π 3π
0 π 2π
6 4 3 2 2
sin
cos
tan
2.6. SOLVING TRIGONOMETRIC EQUATIONS OF THE FORM A SIN X + B COS X 19

2.6 Solving trigonometric equations of the form a sin x + b cos x


The method is to write the trigonometric term in the form R sin(x + α) using trigonometric identi-
ties, where R > 0.

Example 5. To express 3 cos x + 4 sin x in the form R sin(x + α), we use the identity

R sin(x + α) = R (sin x cos α + cos x sin α)


to write

3 cos x + 4 sin x = R cos α sin x + R sin α cos x.


Identifying the coefficients of sin x and cos x, we must solve

• cos x term:

• sin x term:
R sin α
To find α: = tan α = .
R cos α
Therefore α = tan−1 34 ≈ 36.87◦ . Verify that this gives a solution in the correct quadrant.


To find R:

(R sin α)2 + (R cos α)2 = R2 sin2 α + R2 cos2 α = (2.1)


2 2 2 2
= R (sin α + cos α) = R (2.2)

Hence R2 = and 3 cos x + 4 sin x can be written as 5 sin(x + 36.87◦ ).

Example 6. Express 4 cos x − 2 sin x in the form R sin(x − α) using the identity sin(A − B) =
sin A cos B − cos A sin B.
20 WEEK 2. TRIGONOMETRIC FUNCTIONS

2.7 Seminar sheet


Week 2 - Basic Trigonometry

Q1. Fig. 1 shows a symmetrical roof truss. Span BF is of length 8 m. Rafters AB and AC are
inclined at angles 40o and 65o , respectively. Find the lengths AF and DE.

40 65
B C D E F

Figure 2.1: A symmetrical roof truss.

Q2. Consider a spring of length L which is fixed at one end and has a mass m attached at the other
end. If the spring is extended by a length x from its natural position, then the motion of the mass
can be described by
r ! r !
λ λ
x = Acos t + Bsin t
Lm Lm
where
√ t is time after the mass, m, has been released and λ, A, B are constants. If A = 3 and
B = 3 express the equation in the form Rcos(ωt − α) and find the amplitude, the frequency
(=ω/2π) and the phase (angle) of the vibrations. (NB ω is the angular velocity of the vibrations =
q
λ
Lm .)
2.8. EXERCISES 21

2.8 Exercises
Exercises 1.

1. If sin θ = √13 and 0◦ ≤ θ ≤ 90◦ , find the exact values of cos θ, sin θ, sec θ, csc θ and cot θ
without using a calculator, i.e. by drawing a right angled triangle with appropriate values.

2. State the principal value in radians of


  √ !
−1 −1 1 3
(a) tan (−1) (b) sin − (c) cos−1
2 2
1
3. Solve sin θ = 2 for θ in the range 0 to 2π.

4. Find possible values for x between 0 and π for which tan2 x = 9.

5. Solve 2 cos2 θ + sin θ − 1 = 0 for θ in the range 0◦ to 360◦ .

6. Express 2 cos θ + 3 sin θ as R sin(θ + α).

7. Express 3 cos θ − 5 sin θ as R sin(θ + α).

8. Express cos θ − 2 sin θ as R cos(θ − α).

9. Solve 5 sin θ + 12 cos θ = 6.5 for θ lying between 0◦ and 180◦ .


sin(A + B)
10. Show that = tan A + tan B.
cos A cos B
11. Write 5 sin x + 12 cos x in the form R sin(x + α).

12. Write 3 sin x + cos x in the form R sin(x + α).

13. Write 2 sin x − cos x in the form R sin(x − α).

14. Write 4 cos x − 3 sin x in the form R cos(x + α).

15. Write 3 cos x + sin x in the form R cos(x − α).

Answers :
q q √ √
1. 23 , √1 ,
2
3
2 , 3, 2 2. − π4 (-0.7854), − π6 (−0.5236), π6 (0.5236)

3. π6 (0.5236), 6 (2.618) 4. 1.249, 1.893

5. 210◦ , 330◦ , 90◦ 6. R = 13, α = 33.69◦
√ √
7. R = 34, α = 149.04◦ 8. R = 5, α = −63.43◦
9. 82.62◦ 10. Use identity sin(A + B) = sin A cos B + sin B cos A
11. R = 13, α = 67.38◦ 12. R = 2, α = 30◦

13. R = 5, α = −26.66◦ 14. R = 5, α = 36.9◦

15.R = 10, α = −18.4◦
22 WEEK 2. TRIGONOMETRIC FUNCTIONS
Week 3

Basic differentiation I
dy
If y is a function of x, then dx is the rate of change of y with respect to x

dy
y = f (x) → = f 0 (x).
dx
dy
In graphical terms, dx represents the gradient of the graph of y = f (x). For example, for the
function

dy
y = x2 + 4 → = 2x
dx

8 x2 + 4

4
−2 −1 0 1 2

Therefore at the point (1,5) on the curve, the gradient of the tangent curve is equal to

dy
= 2x = 2 × 1 = 2.

dx (x=1,y=5)

(x=1,y=5)

23
24 WEEK 3. BASIC DIFFERENTIATION I

3.1 General rules


• Taking the derivative is a linear operation. This means that you can treat each term of a sum
or a difference independently

d( f ± g) d f dg
Derivative of a sum is the sum of derivatives : = ± .
dx dx dx

• A multiplicative constant does not contribute to the derivative

dy
Derivative of a function multiplied by a constant: y = a · f (x) → = a · f 0 (x)
dx

• To differentiate a polynomial, the rule is to premultiply by the value of the power and sub-
stract one from the power

dy
Derivative of a polynomial: y = xn → = nxn−1 .
dx

• The derivative of a constant :

Derivative of a constant = 0.

Example 1.

dy
• If y = 2x, then dx = .

dy
• If y = 7, then dx = .

• If y = 3x5 − 2x4 + 7x − 4, then


dy
=
dx
Example 2.
The electric power P (watts) as a function of current i (amps), in a certain circuit, is given by

P = 16i2 + 60i
Find the instantaneous rate of change of power with respect to current when i = 0.75 amps.

Example 3.
Find the gradient of the following functions at the point where x = 3.

• y = 2x3 + 3:

• y = 6x−4 − 23 x2 :

• y = (2x − 3)2 :


• y= x + x12 :
3.1. GENERAL RULES 25

The derivatives of other important functions of x can be read from formulae sheets.
dy
Example 4. Find dx for the following functions

• y = sin x:

• y = cos x:

• y = tan x:

• y = ex = exp x :

• y = ln(x) :
26 WEEK 3. BASIC DIFFERENTIATION I

3.2 Seminar Sheet


Week 3 - Differentiation

Q1. The current, i, through an inductor is given by


(
t for 0 ≤ t ≤ 2,
i= (3.1)
4 - t for 2 < t ≤ 4
i) Sketch the current i.
ii) The voltage, V , applied across the inductor is given by

di
V = 0.25
dt
Sketch V on a different axis.

Q2. The displacement, s, of a particle is given by

s = 75t − t 3 (t ≥ 0)

i) Find the velocity v given that

ds
v= .
dt
ii) At what value of t is v = 0 ?

Q3. Faraday’s law states that the electromotive force, F, induced by N turns of a coil with flux, φ,
passing through it, is given by


F = −N
dt
If φ = K sin(2π f t) where K and f are constants, determine F.
3.3. EXERCISES 27

3.3 Exercises
dy
Exercises 1. Find dx when
(a) y = 7x5 (b) y = 3x11 (c) y = 27 x2 (d) y = x4/3

(e) y = 3x1/4 (f) y = 2x−1/2 (g) y = 3x2 − 2 (h) y = 4x3 + 2x2

(i) y = 3x − 0.5x4 (j) y = 6x2 − 3x + 1 (k) y = (x + 1)2 (l) y = (4x − 2)2

(m) y = (2x)2 − x42 + 2x12


Exercises 2. Find the derivative of the following functions
(a) y = 6 cos x (b) y = 6 ln x (c) y = 4ex (d) y = 5x3 − 4 sin x + 7ex
dy
Exercises 3. Find dx for each of the following functions.

1. y = 4x2 + 3x − 1 7. y = x − 1x
2. y = 100 8. y = x2 + x−2
3. y = 6x5 + 3x2 − 5x + 2 √
x−2x
9. y = x2
4. y = 6x
5. y = 3 tan x 10. y = 2x1.5 − 4x + 6

6. y = 2x3 − 4 cos x + ex 11. y = (x − 4)2

Answers 1.
dy dy dy dy
(a) dx = 35x4 (b) dx = 33x10 (c) dx = 7x (d) dx = 43 x1/3
dy dy dy dy
(e) dx = 34 x−3/4 (f) dx = −x−3/2 (g) dx = 6x (h) dx = 12x2 + 4x
dy dy dy dy
(i) dx = 3 − 2x3 (j) dx = 12x − 3 (k) dx = 2(x + 1) (l) dx = 8(4x − 2)
dy
(m) dx = 8x + x73
Answers 2.

dy dy 6 dy dy
(a) dx = −6 sin x (b) dx = x (c) dx = 4ex (d) dx = 15x2 − 4 cos x + 7ex

Answers 3.

dy dy 1
1. dx = 8x + 3 7. dx = √
2 x
+ x12
dy
2. =0 dy
dx 8. dx = 2x − 2x−3 = 2x − x23
dy
3. dx = 30x4 + 6x − 5
dy
dy
9. dx = − 32 x−5/2 + x22
4. dx = 6x ln 6
dy
5. dy
= 3 sec2 x 10. dx = 3x0.5 − 4
dx
dy dy
6. dx = 6x2 + 4 sin x + ex 11. dx = 2x − 8 = 2(x − 4)
28 WEEK 3. BASIC DIFFERENTIATION I

3.4 Additional material


The formal definition for the derivative of a function y = f (x) is given by

df f (x + ∆x) − f (x)
= f 0 (x) = lim .
dx ∆x→0 ∆x
The meaning of this definition can be illustrated as in the following figure. As ∆x is made arbitrar-

Figure 3.1: Formal definition of the derivative of a function.

ily small, the line that passes through the points (x, f (x)) and (x + ∆x, f (x + ∆x)) eventually gets
close to the tangent line at (x, f (x)). Using this definition, prove that
dy
• If y = x2 , then dx = 2x.
 
d 1 1
• = − 2.
dx x x
d
• (sin x) = cos x.
dx
Week 4

Basic differentiation II

4.1 The product rule


The product rule is used to compute the derivative of products of functions, that is y = u · v where
u and v are both functions of x.
d(u · v) dv du
= u +v .
dx dx dx
Example 1.
dy
If y = x3 cos x, find dx .
du dv
Here we write u = x3 and v = cos x. Differentiating gives dx = 3x2 and dx = − sin x. Applying
the product rule, we obtain
dy
=
dx
Example 2.
dy
If y = (x4 − 2x)ex , find dx .
Here

u= v=

du dv
dx = dx =

The product rule then gives

dy
=
dx

29
30 WEEK 4. BASIC DIFFERENTIATION II

4.2 The quotient rule


u
The quotient rule is used to compute the derivative of a quotient of functions, y = v where u and v
are functions of x.

dy d(u/v) v du − u dv
= = dx 2 dx .
dx dx v
Example 3.
x2 dy
If y = 3x+1 , find dx .
Here
u = x2 v = 3x + 1

du dv
dx = 2x dx =3

Applying the quotient rule gives


dy
=
dx
Example 4.
x2 − 4 dy
If y = , find dx .
sin x
Here
u= v=

du dv
dx = dx =

Applying the quotient rule gives


dy
=
dx

4.3 The chain rule


The chain rule is used to differentiate composite functions, y = y(u(x)). The chain rule states that

dy dy du
= × .
dx du dx
For example, if y = (2x + 1)4 we can write

y = u4 u = 2x + 1

dy du
du = 4u3 dx =2

Applying the chain rule gives


dy dy du
= × = 4u3 × 2 = 8u3 = 8(2x + 1)3 .
dx du dx
4.3. THE CHAIN RULE 31

Example 5. : y = sin (x2 − 1)

y= u=

dy du
du = dx =

Applying the chain rule gives


dy dy du
= × = .
dx du dx
Example 6. Differentiate the following with respect to x :

1. y = ln (2x)

2. y = e3x

3. y = e−2x

4. y = cos (3πx)

5. y = exp(−2x) + 6
32 WEEK 4. BASIC DIFFERENTIATION II

4.4 Seminar Sheet


Week 4 - Differentiation: Part II

Q1. The density, ρ, is defined as

1
ρ=
V
where V represents the volume of unit mass (i.e. the specific volume).
Find an expression for dV
dρ .

Q2. If the voltage, v, across a capacitor is given as


−6
v = 1 − e−10t / 2 × 10
and the capacitance is C = 0.2 × 10−6 then the current, i, is defined as

dv
i=C .
dt
i) Find i in terms of t given v.

Q3. A damped oscillator has displacement, s, given by

s = e−kt cos(ωt)
where ω is the angular velocity and k is a constant.
Find the velocity v = ds
dt .
4.5. EXERCISES 33

4.5 Exercises
dy
Exercises 1. Use the product rule to find dx for each of the following:

a) y = x sin x b) y = xex

c) y = x2 ln x d) y = sin x cos x

e) y = (x2 − 2) sin x f) y = ex cos x

dy
Exercises 2. Use the quotient rule to find dx for each of the following:

sin x x
a) y= x b) y= sin x
x 1+x
c) y= x2 +1
d) y= 1−x

4x+2ex 5x3 −3x2 +2x−1


e) y= x2 +4
f) y= 4x+7

dy
Exercises 3. Use the chain rule to find dx for each of the following:

1
a) y = (x3 − 2)2 b) y= 3x+1

c) y = cos (4x + 1) d) y = sin(x2 )

e) y = ln(4x + 1) f) y = sin2 x

Answers 1.
dy dy
a) = sin x + x cos x b) = (x + 1)ex = xex + ex
dx dx
dy dy
c) = x + 2x ln x d) = cos2 x − sin2 x
dx dx
dy dy
e) = (x2 − 2) cos x + 2x sin x f) = ex cos x − ex sin x = ex (cos x − sin x)
dx dx
Answers 2.
dy x cos x − sin x dy sin x − x cos x
a) = b) =
dx x2 dx sin2 x
dy 1 − x2 dy 2
c) = d) =
dx (1 + x2 )2 dx (1 − x)2
dy 16 − 4x2 + ex (2x2 − 4x + 8) dy 40x3 + 93x2 − 42x − 16x−1 − 14x−2
e) = f) =
dx (x2 + 4)2 dx (4x + 7)2
Answers 3.
dy dy −3
a) = 6x2 (x3 − 2) b) =
dx dx (3x + 1)2
dy dy
c) = −4 sin(4x + 1) d) = 2x cos(x2 )
dx dx
dy 4 dy
e) = f) = 2 sin x cos x
dx 4x + 1 dx
34 WEEK 4. BASIC DIFFERENTIATION II
Week 6

Basic integration

6.1 General rules (see formula sheet)


Integration is the inverse or opposite process to differentiation. Generally integration can be used
to find a function given its derivative or rate of change.
dy
Integration is the process that takes the differentiated function dx and transforms it back to its
original form.
Formally, for a polynomial

1 n+1
Z  n+1 x +C
 n 6= −1
n
x dx =

ln(x) +C n = −1

where C is some constant of integration. You need to treat each term of a sum separately.
For a polynomial xn , the general rule is

Add one to the power


Divide by the new power
Add an integration constant

Example 1. Integrate 3x4 dx. This is the integral of 3x4 with respect to x.
R

x4+1 3
Z Z
3x4 dx = 3 x4 dx = 3 +C = x5 +C.
4+1 5
Example 2. Integrate sin x + 1x dx.
R

1
Z
sin x + dx =
x
We call these indefinite integrals since the result is an expression in x.

35
36 WEEK 6. BASIC INTEGRATION

Example 3. Find the function y in the following cases:


dy
1. dx = x + x4

dy
2. dx = 2x − 2x2 + 3x4

dy
3. dx = 2x−2 − 2x−3 + 3x−4

dy √
4. dx =2 x

dy 1
5. dx = x2
+ x23 , if y = 2 when x = 1

6.2 Definite integrals


Definite integrals have upper and lower limits, which we write adjacent to the integral sign at the
top and bottom respectively. The result of definite integration is a number.

Example 4. Compute the definite integral 13 (x2 + 2x + 4)dx. This is the integral of x2 + 2x + 4
R

between x = 1 and x = 3. We first compute the indefinite integral and evaluate this between the
limits,

3
x3
Z 3 
2
(x + 2x + 4)dx = + x2 + 4x + c
1 3 1
33 13
   
2 2
= +3 +4·3+c − +1 +4·1+c
3 3
Value at UPPER limit - Value at LOWER limit
1
= 30 − 5
3
2
= 24 .
3
Example 5.
Z π
sin xdx =
0
6.3. AREAS 37

6.3 Areas
In graphical terms, the definite integral
Z b
f (x)dx
a

represents the area bounded by the x axis, the curve y = f (x), the line x = a and the line x = b.

Example 6. The integral


Z 4
(x2 + 3)dx
1

corresponds to the area enclosed by the curve y = x2 + 3, the x axis, x = 1 and x = 4.

Therefore this area is given by

Area =
38 WEEK 6. BASIC INTEGRATION

Example 7. Find the area bounded by the curve y = x2 and the line y = x + 2.
6.4. INTEGRATION BY SUBSTITUTION 39

6.4 Integration by substitution


In this section, we shall see that changing variables can simplify an integral and allow us to com-
pute it.

Example 8. Let’s find the integral of sin (3x + 4). If we let

du 1
u = 3x + 4 then = 3 ⇒ dx = du.
dx 3

Thus,

1
Z Z
sin(3x + 4)dx = sin u · du
3
1 1
Z
= sin udu = − cos u +C
3 3
1
= − cos(3x + 4) +C
3

1
Z
Example 9. Find dx.
2x − 5
Set u = 2x − 5. Then

6.5 Log integrals


(x) 0
Integrals of the type k ff (x)
R
dx can be integrated directly to k ln | f (x)| +C.

Example 10.

2x
Z
1. dx
x2 + 4

Z
2. tan xdx

3
Z
3. dx
2x + 1
40 WEEK 6. BASIC INTEGRATION

6.6 Trig integrals


It may be necessary to use the trigonometric identities to bring an integral to a tractable form.

Example 11.
 
1 1 1
Z Z
2
sin θdθ = (1 − cos(2θ)) dθ = θ − sin(2θ) +C
2 2 2
6.7. SEMINAR SHEET 41

6.7 Seminar sheet


Week 6 - Integration: Part I

Q1. Find the area of the segment (shaded area) cut from the curve y = x(3 − x) and the line y = x,
as shown below.


Q2. Find the area of the segment cut-off from the curve y = sin(x), 0 ≤ x ≤ π by the line y = 1/ 2.
42 WEEK 6. BASIC INTEGRATION

6.8 Exercises
Exercises 1. Find the integrals of the following functions
Z 


dy 1
1. = −3x3/2 + 4x−4 + 5 6. x+ 2 dx
dx x
Z  
9 Z
2. y = 5x−6 + 2 dx x−1.5 + 3x2 dx

x 7.
Z Z
(4x2 − 3x−7 + 5x5/4 + 3)dx e3x + e−2x + 6 dx

3. y = 8.
Z  
6 3 1
Z
4
4. y = − x + √ dx 9. dx
x5/2 x e2x
1
Z Z
4 2
5. (x + 3x − 2)dx 10. dx
2x
Exercises 2. Evaluate the following definite integrals
Z 2 Z 4
√ Z π
2
1. 2xdx 3. xdx 5. cos xdx
−1 2 π
6

Z 3 Z 1 Z π
6
2. 2
(x + x)dx 4. x
e dx 6. (cos x − sin x)dx
−1 0 − π6

Exercises 3. Find the following integrals


Z Z
4e−2x + 5 sin (2x) dx

1. cos(5x + 6)dx 5.
Z  
Z
6 2 4
2. dx 6. − dx
4x + 5 3 + 2x 4x + 3
Z  
Z 3 2x+5
2 7. − 5e + sin (x − 7) dx

3. sin(4x) − cos(5x) + sec (3x) dx x
Z  
Z 4 2
7e3x − 4e−3x dx 8. − cos (5x) dx

4. 2x + 4
6.8. EXERCISES 43

Answers 1.
3
1. − 65 x5/2 − 3x43 + 5x +C 6. 2x 2
− 1x +C
3

2. − x15 − 9x +C 2
7. x3 − x1/2 +C
4x3
3. 3 + 3x + 20
9x
9/4 + 1 +C
2x6 8. e3x
− 12 e−2x + 6x +C
3
4 5 √
4. C − x3/2 − x5 + 6 x +C 9. −1
+C
2e2x

x5 1
5. 5 + x3 − 2x +C 10. 2 ln x +C

Answers 2.
2
√ 1
1. 3 3. 3 [8 − 8] ∼ 3.45 5. 2
40
2. 3 (= 13 13 ∼ 13.33) 4. e − 1 ∼ 1.718 6. 1

Answers 3.

1 5
1. sin(5x + 6) +C 5. −2e−2x − cos(2x) +C
5 2

3 3 + 2x
2. ln |4x + 5| +C 6. ln |3+2x|−ln |4x+3|+C = ln +
2 4x + 3
C
1 1 1 5
3. − cos(4x) − sin(5x) + tan(3x) +C 7. 3 ln x − e2x+5 − cos (x − 7) +C
4 5 3 2
7 3x 4 −3x 1
4. e + e +C 8. 2 ln(2x + 4) − (10x + sin(10x)) +C
3 3 20
44 WEEK 6. BASIC INTEGRATION
Week 7

Complex numbers

7.1 Cartesian Form


Attempting to solve the quadratic equation z2 − 2z + 10 = 0 presents us with a problem. The
quadratic formula gives
√ √
−b ± b2 − 4ac 2 ± −36
z= = =
2a 2
There exist
√ no real solutions !
What is −36?? Let us use the following definition


Definition : −1 = j, j2 = −1.
We
√ can then
p write √ √
−36 = (−1) × (36) = −1 × 36 = ± j6.
The solutions for the polynomial are therefore

2 ± −36 2 ± j6
z= = = 1 ± j3.
2 2
Remark 1. Most math textbooks will use the letter i instead of j.
When written in the form z = a + jb,(a number is said to be in Cartesian or rectangular form.
real part : Re(z) = a
Each complex number consists of a
imaginary part : Im(z) = b
Remark 2. Two complex numbers z1 = a1 + jb1 and z2 = a2 + jb2 are equal if and only their real
and imaginary parts are equal, i.e. a1 = a2 and b1 = b2 .
The complex conjugate of z = a + jb is the number z∗ = a − jb, it has the same real part and
the imaginary part with opposite sign. For example, if z = 3 + j4, then z∗ = 3 − j4.

7.2 Complex arithmetic


Addition and subtraction. Treat real and imaginary parts separately. If z = 3+ j4 and w = 5− j,
then

z + w = (3 + j4) + (5 − j) =
z − w = (3 + j4) − (5 − j) =

45
46 WEEK 7. COMPLEX NUMBERS

Multiplication. Multiply out the terms and take into account that j2 = −1,

z·w = (3 + j4)(5 − j) =

zz = (3 + j4)(3 − j4) =
(a + jb)(a − jb) =

Remark 3. The multiplication of a complex number with its own complex conjugate always gives
a real number.

Division. Multiply both parts of the ratio by the complex conjugate of the denominator.

z (3 + j4)
= =
w (5 − j)
Exercises 1. Given complex numbers z = 2 + j3, w = 4 − j, p = −3 + j2, q = −1 − j, find

1.z + w 2. p + q 3. w − z 4. p − q 5. zz∗ 6. qq∗ 7. zw 8. pq


9. wq 10. z ÷ w 11. w ÷ z 12. qp 13. qp 14. z ÷ z∗ 15. pp∗

Answers :
1.6 + j2 2. −4 + j 3. 2 − j4 4. −2 + j3 5. 13
5
6. 2 7. 11 + j10 8. 5 + j 9. −5 − j3 10. 17 + j 14
17
5
11. 13 − j 14
13 12. 12 − j 25 1
13. 13 5
+ j 13 14. −5 12
13 + j 13 15. 13 − j 12
5
13
7.3. THE ARGAND DIAGRAM 47

7.3 The Argand diagram


Complex numbers can be represented graphically using the real Re and imaginary Im axes. The
resulting diagram is called an Argand diagram.

Modulus and argument of a complex number. The modulus of a complex number z = a + jb


is a measure of the magnitude of z and is written as |z|
p
|z| = a2 + b2 .
The argument of a complex number is the angle between the positive real axis and the line
representing the complex number and is abbreviated to arg(z),
 
−1 b
arg(z) = tan .
a
The angle can be given in degrees or radians and will be the principal value, i.e. the angle
closest to the positive real axis

−180◦ < arg(z) < 180◦ or − π < arg(z) < π.


√ √
Example 1. If z = 4 + j3 then |z| = 42 + 32 = 25 = 5. The argument arg(z) = tan−1 34 ≈


36.87◦ .
p √ √
Example 2. If z = −3 − j2 then |z| = (−3)2 + (−2)2 = 9 + 4 = 13. The argument arg(z) =
−2
tan−1 −3 ≈ 33.69◦ . This result is not correct as we are looking for a number in the third quadrant.
The function tan repeats every 180◦ so by removing 180◦ we obtain an angle in the required range,
i.e. 33.69◦ − 180◦ = −146.31◦ .

7.4 Polar form of a complex number


If the complex number z = a + jb has modulus r and argument ϕ then
48 WEEK 7. COMPLEX NUMBERS

Therefore a = and b = . Since z = a + jb, this can be written as

z = r(cos ϕ + j sin ϕ).


This is called the polar form of the complex number.

Example 3. Express z = 2 + j in polar form.


√ √
We compute |z| = r = 22 + 12 = 5 and arg(z) = tan−1 1
≈ 26.565◦ , therefore in polar

√ 2
form we have z = 5 (cos 26.565◦ + j sin 26.565◦ ).

Remark 4. When computing the polar form, it is useful to remember the following properties of
the trigonometric functions, cos(−x) = cos x, sin(−x) = − sin x.

Example 4. Express z = 2 − j in polar form.


√ √
We compute |z| = r = 22 + 12 = 5 and arg(z) = tan−1 − 21 ≈ −26.565◦ , therefore z =

√ √
5 (cos(−26.565◦ ) + j sin (−26.565◦ )) = 5 (cos 26.565◦ − j sin 26.565◦ ).

Example 5. Express z = −3 + j4 in polar form.


√ √
We compute |z| = r = 32 + 42 = 25 = 5 and arg(z) = tan−1 −3 4
≈ −53.13◦ . However


−3+ j4 is in the second quadrant so we need to add 180 , i.e. arg(z) = −53.13◦ +180◦ = 126.87◦ .

Therefore in polar form we have z = 5 (cos 126.87◦ + j sin 126.87◦ ).


 
Example 6. Convert z = 3 cos π3 + j sin π3 into Cartesian form.

3 3
π
 π

By direct computation, Re(z) = 3 cos 3 = 1.5 and Im(z) = 3 sin 3 = 2 ≈ 2.598, hence
z = 1.5 + j2.598.
7.5. EXPONENTIAL FORM OF A COMPLEX NUMBER 49

7.5 Exponential form of a complex number


A complex number written in polar form can easily be converted to exponential form, provided
that the argument is expressed in radians. Just write
z = r (cos ϕ + j sin ϕ) as z = r e jϕ .

Example
√ 7. Convert z = 1 + j into polar form and exponential form. We compute z = 12 + 12 =
2, arg(z) = tan−1 (1) = 45◦ or π4 rads. Therefore

• Polar form : z = 2 (cos 45◦ + j sin 45◦ ).

• Exponential form : z = 2e jπ/4 .

7.6 Exponential of a complex number


For a number z = ea+ jb , we need to use Euler’s equation

e jϕ = cos ϕ + j sin ϕ, ϕ in radians


to obtain

z = ea+ jb = ea · e jb = ea (cos b + j sin b).

Example 8. If z = e3+ j2 , then in polar form we have

z = e3+ j2 = e3 · e j2 = e3 (cos 2 + j sin 2)

Example 9. Euler’s identity


If z = e jπ , then

z = e jπ = cos π + j sin π = −1 + j · 0 = −1.

Example 10. If z = eπ+ jπ , then in polar form we have

z = eπ+ jπ = eπ · e jπ = eπ (cos π + j sin π) = eπ (−1 + j (0)) = −eπ .

7.7 Logarithm of a complex number


To compute the log, first convert the complex number to exponential form.

z = re jϕ
ln(z) = ln(re jϕ ) = ln(r) + ln(e jϕ ) = ln(r) + jϕ.

Example 11. Find ln(z) if z = 5e jπ .

ln z = ln(5) + ln(e jπ ) = ln(5) + jπ.


50 WEEK 7. COMPLEX NUMBERS

7.8 Seminar sheet


Week 7 - Complex Numbers

Q1. The admittance, Y , in a circuit is given by

1
Y=
Z
where Z is the impedance of the circuit. If Z = 100 − j25, find Y .

Q2. The total impedance, Z, of a circuit containing an inductor with inductance L and a resistor
with resistance R in series is given by

Z = R + j2π f L where f = frequency


If Z = (50 + j200) Ω and f = 50 Hz, find R and L.

Q3. A current, I, in a magnetically coupled circuit satisfies

20I + j100I = 200


Find the current I and express it in polar form.
7.9. EXERCISES 51

7.9 Exercises
Exercises 2.

1. Locate the following complex numbers in the Argand plane and find ther modulus and ar-
gument (in degrees) √
a) 1 + j b) 1 + j 3 c) −3 + j3
d) −4 − j3 e) 3 − j2

2. Use that cos(−x) = cos x and sin(−x) = − sin x to convert to polar form
a) 3 + j2 b) 3 − j2 c) 1 − j
d) −2 + j e) −3 − j4 f) e3+ j
3. Convert to cartesian form
a) 4 (cos 60◦ + j sin 60◦ ) b) 5 (cos 90◦ + j sin 90◦ )
π
c) e−2+ j 4 d) e j2π
4. Convert to exponential form
a) 6 (cos 135◦ + j sin 135◦ ) b) 3 + j4

Answers

√ √ √ √
1. a) 2, 45◦ b) 2, 60◦ c) 18 = 3 2 ≈ 4.243, 135◦ d) 5, −143.1◦ e) 13, −33.7◦
√ √
a) √13(cos 33.7◦ + j sin 33.7◦ ) b) √13(cos 33.7◦ − j sin 33.7◦ )
2. c) 2(cos 45◦ − j sin 45◦ ) d) 5(cos 153.4◦ + j sin 153.47◦ )
e) 5(cos 126.87◦ − j sin 126.87◦ ) f) e3 (cos 1 + j sin 1)
√ √ √ 
a) 2 + j2 3 ≈ 2 + j3.464 b) 5 j c) e−2 cos π4 + j sin π4 = e−2 22 + j 22
 
3. d) 1


4. a) 6e j 4 b) 5e j0.927
52 WEEK 7. COMPLEX NUMBERS
Week 8

Complex arithmetic in polar form

8.1 Multiplication and Division


Given that z = r1 (cos ϕ + j sin ϕ) and w = r2 (cos θ + j sin θ), we have

Multiplication:

z×w = r1 (cos ϕ + j sin ϕ) × r2 (cos θ + j sin θ)


=
=

Therefore, to multiply, we need to

Multiply moduli and add arguments : zw = r1 r2 (cos(ϕ + θ) + j sin(ϕ + θ))

Example 1. If z = 5(cos 45◦ + j sin 45◦ ) and w = 2(cos 10◦ + j sin 10◦ ), then

z×w =

Division: It can be shown in a similar way that for the division,

z r1
Divide moduli and subtract arguments : = (cos(ϕ − θ) + j sin(ϕ − θ))
w r2

53
54 WEEK 8. COMPLEX ARITHMETIC IN POLAR FORM

8.2 Roots and de Moivre’s Theorem


Multiplying a given complex number z = r(cos ϕ + j sin ϕ) by itself we have

z2 = r(cos ϕ + j sin ϕ) × r(cos ϕ + j sin ϕ) = r2 (cos ϕ + j sin ϕ)2


= r2 (cos2 ϕ + j 2 sin ϕ cos ϕ + j2 sin2 ϕ) = r2 (cos2 ϕ − sin2 ϕ) + j 2 sin ϕ cos ϕ
 

= r2 (cos(2ϕ) + j sin(2ϕ))

Multiplication and division can be further generalized to powers to give what is called de
Moivre’s formula, that is if z = r(cos ϕ + j sin ϕ), then

de Moivre’s formula : zn = rn (cos ϕ + j sin ϕ)n = rn (cos(nϕ) + j sin(nϕ))


Incredible Fact: The de Moivre’s formula applies not only for integer powers, but also for
fractional powers !
4
Example√ 2. If zπ = 1 + j,π find z . It is much simpler to work in polar form. It is easy to obtain
thatz = 2(cos 4 + j sin 4 ). By applying de Moivre’s formula, we obtain directly
√ 4   π   π 
z4 = 2 cos 4 · + j sin 4 · = 4(cos π + j sin π) = −4.
4 4

Example 3. If z = 2 − j, find z2 . In polar form, the modulus of z is equal to 5and its argument
is −26.565◦ . By using de Moivre’s formula, we have

√ 2
z2 = cos (2 × (−26.565◦ )) + j sin (2 × (−26.565◦ ))

5
= 5 cos(−53.13◦ ) + j sin(−53.13◦ ) = 5 cos 53.13◦ − j sin 53.13◦
 

Note that the cosine and sine functions repeat every 360◦ or 2π rads. In particular,

cos θ = cos(θ + 2π) = cos(θ + 4π) = . . . = cos(θ + 2kπ), k = 0, 1, 2, . . .


sin θ = sin(θ + 2π) = sin(θ + 4π) = . . . = sin(θ + 2kπ), k = 0, 1, 2, . . .

So in general if z = r(cos θ + j sin θ), then z can also be written as z = r(cos(θ + 2kπ) +
j sin(θ + 2kπ)). de Moivre’s formula can then be used to compute the roots of complex numbers.
Indeed, if zn = r(cos θ + j sin θ), then
    
1/n θ + 2kπ θ + 2kπ
z=r cos + j sin , k = 0, 1, 2 . . .
n n
In degrees, this is expressed as

θ + k · 360◦ θ + k · 360◦
    
z = r1/n cos + j sin , k = 0, 1, 2 . . .
n n
Example 4. Find the complex solutions of z3 = 1 = 1 + j 0. There are 3 such roots which we find
using the de Moivre’s formula. In polar form, 1 = 1(cos 0◦ + j sin 0◦ ),therefore
  ◦
0 + k · 360◦
 ◦
0 + k · 360◦
 
1/3
z=1 cos + j sin , k = 0, 1, 2.
3 3
For each value of k, we obtain a root
8.2. ROOTS AND DE MOIVRE’S THEOREM 55

• k = 0: z1 = 1 (cos 0◦ + j sin 0◦ ) = 1
◦

360◦ ◦ ) + j sin (120◦ )) = − 1 + j 3 .
• k = 1:z2 = 1 cos 360

3 + j sin 3 = 1 (cos (120 2 2

720◦ 720◦
= 1 (cos (240◦ ) + j sin (240◦ )) = − 12 − j 3
 
• k = 2:z3 = 1 cos 3 + j sin 3 2 .

What happens if we take higher values of k? For k = 3, we would have

3 · 360◦ 3 · 360◦
    
z4 = 1 cos + j sin = 1 (cos 360◦ + j sin 360◦ ) = 1,
3 3
so we would just obtain the same values periodically. Therefore it is sufficient to look only at
k = 0, 1, . . . n − 1. In the complex plane, the roots can be represented in a circle of radius 1 in an
Argand diagram.

In general

• There will be n solutions of the equation z = w1/n .

• The solutions will all have the same modulus.


360◦ 2π
• The solutions will be equally spaced at intervals of n or n in radians.

• The angle closest to the positive real axis is the principal argument of w1/n and the corre-
sponding root is the principal root.

Example 5. Solve z4 = 4+ j4. In polar form, the number w = 4+ j4 is written as w = 32 (cos 45◦ + j sin 45◦ ).
Using de Moivre’s formula we get
√    45◦ + k · 360◦   ◦
45 + k · 360◦

1/4
z= 32 cos + j sin , k = 0, 1, 2, 3.
4 4
The four roots have modulus equal to (321/2 )1/4 = 321/8 = 25/8 ≈ 1.54 and are equally spaced

at intervals of 360 ◦
4 = 90 . They are given by
◦ ◦ 
• k = 0: z1 = 25/8 cos 454 + j sin 454 = 25/8 (cos 11.25◦ + j sin 11.25◦ )

• k = 1: z2 = 25/8 (cos (11.25◦ + 90◦ ) + j sin (11.25◦ + 90◦ )) = 25/8 (cos 101.25◦ + j sin 101.25◦ )

• k = 2: z3 = 25/8 (cos (101.25◦ + 90◦ ) + j sin (101.25◦ + 90◦ )) = 25/8 (cos 191.25◦ + j sin 191.25◦ )

• k = 3: z4 = 25/8 (cos (191.25◦ + 90◦ ) + j sin (191.25◦ + 90◦ )) = 25/8 (cos 281.25◦ + j sin 281.25◦ )
56 WEEK 8. COMPLEX ARITHMETIC IN POLAR FORM

8.3 Seminar sheet


Week 8 - Complex arithmetics in polar form
1. Find all roots z of
z4 = 4 + j4
and represent them graphically in the Argand plane.

2. (Singh’s book, p.547, no.5) A robot arm has a transfer function G given by
40
G(ω) = ,
(ω + jω)4

where ω is the angular frequency. Show that


10
G(ω) = − .
ω4

3. Consider the following three forces F1 , F2 , F3 acting on the point (0, 0).

Knowing that the forces have magnitude (in Newtons)



13 5 1
|F1 | = N, |F2 | = N, |F3 | = N,
6 6 2
compute the resulting force F = F1 + F2 + F3 .
8.4. EXERCISES 57

8.4 Exercises
Exercises 1.

1. Express z = 4 + j5, w = −2 + j7 in polar form and write the polar form of the following
numbers

(a) z w
(b) z ÷ w
(c) z3
(d) w4

2. (Extra problem) Using the usual approach for dividing complex numbers (i.e. multiplying
by the complex conjugate of the denominator), prove the above formula for division.
Exercises 2. 1. Express

(a) 2 + j3 and 1 − j2 in polar form.


(2+ j3)4
(b) Hence find 1− j2 in polar form.
(c) Convert your answer into exponential form and cartesiana + j b form.

2. Find the fifth roots of −3 + j3 in polar and exponential forms.

3. Find all complex roots of the equation z3 + 6 − j 7 = 0.


Answers 1.

1. In polar
√ form, we have
z = √41 (cos 51.34◦ + j sin 51.34◦ ) ≈ 6.403 (cos 51.34◦ + j sin 51.34◦ )
w√ = 53 (cos 105.95◦ + sin 105.95◦ ) = 7.28 (cos 105.95◦ + sin 105.95◦ )
a) p2703(cos 157.29◦ + j sin 157.29◦ ) ≈ 46.61(cos 157.29◦ + j sin 157.29◦ )
b) 41/53(cos(−54.61◦ ) + j sin(−54.61◦ )) ≈ 0.8795(cos(54.61◦ ) − j sin(54.61◦ ))
c) 413/2 (cos 154.02◦ + j sin 154.02◦ ) ≈ 262.528 (cos 154.02◦ + j sin 154.02◦ )
d) 532 (cos 423.8◦ + j sin 423.8◦ ) = 2809(cos 63.8◦ + j sin 63.8◦ )

2. If z = r1 (cos ϕ + j sin ϕ) and w = r2 (cos θ + j sin θ), then by remembering that j2 = −1, we
have

z r1 (cos ϕ + j sin ϕ) r1 (cos ϕ + j sin ϕ) (cos θ − j sin θ)


= = ·
w r2 (cos θ + j sin θ) r2 (cos θ + j sin θ) (cos θ − j sin θ)
r1 (cos ϕ cos θ − j cos ϕ sin θ + j sin ϕ cos θ − j2 sin ϕ sin θ)
= =
r2 (cos θ cos θ − j cos θ sin θ + j sin θ cos θ − j2 sin2 θ)
r1 cos ϕ cos θ + sin ϕ sin θ + j (sin ϕ cos θ − cos ϕ sin θ)
=
r2 cos2 θ + sin2 θ
r1
= (cos(ϕ − θ) + j sin(ϕ − θ)) .
r2

The last step is due to the identities cos(A − B) = cos A cos B + sin A sin B and sin(A − B) =
sin A cos B − cos A sin B, see the formula sheet.
58 WEEK 8. COMPLEX ARITHMETIC IN POLAR FORM

Answers 2.
√ √
a) 13(cos 56.3◦ + j sin 56.3◦ ), 5(cos(−63.4◦ ) + j sin(−63.4◦ ))
1. b) ≈ 75.56 (cos 288.6◦ + j sin 288.6◦ ) = 75.56 (cos(−71.4◦ ) + j sin(−71.4◦ ))
c) 24.2 − j 71.6, 75.6 e− j1.244

z1 = 1.335(cos 27◦ + j sin 27◦ ) = 1.335 e j3π/20 = 1.335 e j0.471


z2 = 1.335(cos 99◦ + j sin 99◦ ) = 1.335 e j11π/20 = 1.335 e j1.728
2. z3 = 1.335(cos 171◦ + j sin 171◦ ) = 1.335 e j19π/20 = 1.335 e j2.985
z4 = 1.335(cos 243◦ + j sin 243◦ ) = 1.335 e j27π/20 = 1.335 e j4.241
z5 = 1.335(cos 315◦ + j sin 315◦ ) = 1.335 e j7π/4 = 1.335 e j5.480

z1 = 851/6 (cos 43.53◦ + j sin 43.53◦ ) z2 = 851/6 (cos 163.53◦ + j sin 163.53◦ )
3.
z3 = 851/6 (cos 283.53◦ + j sin 283.53◦ )
Week 9

Further Differentiation

9.1 Implicit differentiation

For a function y = f (x), we say that y is defined explicitly in terms of x. For instance,

y = sin ln(x2 + 1) .
 

If, on the contrary, there is an equation relating x and y and y cannot be expressed explicitly in
terms of x (or if it is not convenient to do so) then we call this an implicit function. For example,

x sin(y2 + 1) − ln y = x

is an implicit function of y in terms of x (or x in terms of y). If we consider that y is a function


dy
of x, we can obtain the derivative dx from the implicit function by using the chain rule.

dy
Example 1. Find dx if (x − 2)2 + (y + 1)2 = 9.

Differentiating term by term gives :

dy
Solve the result for dx :

dy
Note that dx is a function of x and y.

dy
Example 2. Find dx if sin(2x) + cos(3y) = x2 y.

59
60 WEEK 9. FURTHER DIFFERENTIATION

9.2 Logarithmic Differentiation


Let us recall some rules about split up of logarithms of products, quotients and powers
 
x
ln(xyz) = ln x + ln y + ln z, ln = ln x − ln y, ln (xy ) = y ln x.
y
It is sometimes useful to use these properties and implicit differentiation to differentiate com-
plicated functions.

dy x3 sin(2x)
Example 3. Find dx if y = √ . First we take logs and use the properties to get
1 − 4x

x3 sin(2x)
   3 
x sin(2x)
ln y = ln √ = ln = ln
1 − 4x (1 − 4x)1/2
1
= ln x3 + ln sin(2x) − ln[(1 − 4x)1/2 ] = 3 ln x + ln sin(2x) − ln(1 − 4x).
2
d f 0 (x)
[ln( f (x))] =
Differentiate with respect to x and remember that .
dx f (x)
1 dy 3x2 2 cos(2x) 1 (−4) 3 2
= 3 + − = + 2 cot(2x) + .
y dx x sin(2x) 2 1 − 4x x 1 − 4x
x3 sin(2x)
Since y = √ , we can rearrange this to get
1 − 4x
    3
dy 3 2 3 2 x sin(2x)
= + 2 cot(2x) + y= + 2 cot(2x) + √ .
dx x 1 − 4x x 1 − 4x 1 − 4x
dy
Example 4. Find dx if y = xsin x , this is called an indicial expression. First take logs,

ln y = ln xsin x = sin x ln x
 

Differentiate with respect to x by using the product rule and rearrange to get

1 dy 1
=cos x ln x + sin x ·
y dx x
   
dy 1 sin x 1
⇒ = y cos x ln x + sin x · =x cos x ln x + sin x · .
dx x x
9.3. PARAMETRIC DIFFERENTIATION 61

9.3 Parametric Differentiation


It can be sometimes convenient to express x and y in terms of a third parameter which can be either
time t or an angle θ, for instance. Then if we write x(t) and y(t), we can compute the variation of
y with respect of x as a function of t by writing

dy dy/dt dy dx
= = ÷ .
dx dx/dt dt dt
dy
Example 5. Find dx if x = sint and y = 2t + 3.

We first find
dx dy
= cost, and = 2.
dt dt
Hence,

dy dy dx 2
= ÷ = = 2 sect.
dx dt dt cost
Note that the result is given in terms of the parameter t.

Second derivative As the first derivative is a function of t, we need to use the chain rule in order
to differentiate it again with respect to x

d2 y
     
d dy d dy dt d dy dx
= = · = ÷ .
dx2 dx dx dt dx dx dt dx dt
dy
Example 6 (Continuing the previous example). We had that dx = 2 sect, therefore
 
d dy d
= (2 sect) = 2 sect tant.
dt dx dt

We then find

d2 y
 
d dy dx 2 sect tant sint
2
= ÷ = =2 3 .
dx dt dx dt cost cos t
dy d2 y
Example 7. Find dx in terms of θ if x = cos θ and y = sin θ.
and dx2
dx dy
Differentiating x and y with respect to θ, we get = − sin θ and = cos θ.
dθ dθ
Therefore

dy dy dx cos θ
= / = = − cot θ.
dx dθ dθ − sin θ
Since d
dθ cot θ = − csc2 θ = − sin12 θ (look in the table of derivatives), the second derivative is
given by

d2 y csc2 θ
 
d dy dx d 1
2
= ÷ = (− cot θ) ÷ (− sin θ) = =− 3 .
dx dθ dx dθ dθ − sin θ sin θ
62 WEEK 9. FURTHER DIFFERENTIATION

9.4 Exercises
Exercises 1.

dy
1. Find dx when

(a) 3x3 − 2y3 = 9 (c) x2 + ln y = cos(2x) + 4y2


(b) 2ex + 3y = sin y (d) x3 − e2y + sin y = 4

2. Find the gradient of the given curve at the point specified

(a) x2 − xy + y2 = 7 at the point (3, 2)


(b) x2 + 4xy − y2 + 9 = 0 at the point (0, 3)
(c) 2x2 e3y = x + 1 at the point (1, 0)
dy
Exercises 2. Find dx when
q
1. y = (1 + x)(1 + 2x)(1 + 3x) 5. y = e−x (1 + 2x)(1 + x2 )3
2. y = ex (1 − x)3 sin(4x)
√ 6. y = 3x
cos x 3 + x2
3. y =
4x 7. y = 42x
e2x sin2 x 2)
4. y = 8. y = 2(1−3x
1+x
Exercises 3.

dy
1. Find dx in terms of t if

(a) x = 2t 3 , y = 4t 2 + 1

(b) x = 3t , y = 1 + t 2

(c) x = t 2 + 4, y = t
1 1
(d) x = t−1 , y= t+1

dy
2. Find dx in terms of θ if

(a) y = cos(2θ), x = sin(θ)


(b) y = 3 sin θ − sin3 θ, x = cos3 θ
(c) x = cos θ + θ sin θ, y = sin θ − θ cos θ

d2 y
3. Find dx2
in terms of t, given that

(a) x = 1t , y = 3t 2 + 2
(b) x = t + 3, y = t 2 + 4
(c) x = t 2 + 2t, y = t 2 − 2t
9.4. EXERCISES 63

Answers 1.
3x2 2ex 2y(x + sin 2x) 3x2
1. a) b) c) d)
2y2 cos y − 3 8y2 − 1 2e2y − cos y

2. a) −4 b) 2 c) −0.5
Answers 2.
 1 2 3

1. (1 + x)(1 + 2x)(1 + 3x) 1+x + 1+2x + 1+3x
3
2. ex (1 − x)3 sin(4x) 1 − 1−x
 
+ 4 cot 4x

cos x 3 + x2
 
x 1
3. − tan x + −
4x 3 + x2 x

e2x sin2 x
 
1
4. 2 + 2 cot x −
1+x 1+x
p h i
5. e−x (1 + 2x)(1 + x2 )3 − 12 + 1+2x 1 3x
+ 1+x 2

6. 3x ln 3

7. 2 ln 4 42x
2
8. −6x ln 2 21−3x

Answers 3. 2
−t 3 t −3/2

8 4 t −1
1. a) = b) √ c) d)
6t 3t 3 1 + t2 4 t +1
sin 2θ
2. a) −2 = −4 sin θ b) − cot θ c) tan θ
cos θ
1
3. a) 18t 4 b) 2 c)
(t + 1)3
64 WEEK 9. FURTHER DIFFERENTIATION
Week 10

Matrices

10.1 Definition
A matrix (plural matrices) is an array of numbers. For example,
 
1 2 3
A= .
4 0 −1
It is a very rich mathematical structure. The order, or the dimensions, of a matrix is r × c,
where r is the number of rows and c is the number of columns. In this example, r = 2 and c = 3
and therefore the order is 2 × 3.
To identify a particular lement or term in a matrix we state the row then the column.

A1,2 = 2, A2,1 = 4, A2,3 = −1.

10.2 Addition and subtraction


Two matrices can be added or subtracted if and only if they have the same order. Elements are just
added componentwise. If
     
1 −2 4 5 1 2 3
A= , B= , C=
3 0 6 7 4 5 6

65
66 WEEK 10. MATRICES

10.3 Multiplication
10.3.1 By a scalar
To multiply a matrix by a number, just multiply each element in the matrix by this number. If
     
1 −2 4 5 1 2 3
A= , B= , C=
3 0 6 7 4 5 6
we can compute

3C =

2A + 4B =

3B − 5A =

3A + 2C =
10.3. MULTIPLICATION 67

10.3.2 Multiplication of two matrices


To multiply two matrices, it is necessary that the number of columns in the first matrix must be
equal to the number of rows in the second matrix. In other words, if A is a p × q matrix and B is
r × s. The product AB is defined only if q = r. We multiply rows by columns and the resulting
matrix will have dimensions p × s.
     
1 −2 4 5 1 2 3
A= , B= , C=
3 0 6 7 4 5 6
Let’s compute

AB =

AC =

BA =

CA =
68 WEEK 10. MATRICES

10.4 The Unit or Identity matrix


The unit matrix is a square matrix which acts like “1” under multiplication. It has 1’s on the
leaading diagonal and zeros elsewhere.

10.5 Squaring a matrix


To square a matrix A means taking the product of A with itself, i.e. A2 = A · A. It does not mean to
square each element. The matrix must itself be a square matrix.
 
  1 0 3  
1 −2 1 2 3
A= , B =  2 −1 0  , C= .
3 0 4 5 6
3 5 7

A2 =

B2 =

C2 =

10.6 Transposition of a matrix


 
1 2 3
Simply interchange rows and columns. If A = , then the transpose of A is
4 5 6
 

AT =  

10.7 The determinant


The determinant of a square matrix A is denoted by |A| and is a number which is computed from
the matrix elements.
10.7. THE DETERMINANT 69

10.7.1 2 × 2 matrix
For a 2 × 2 matrix  
a b a b
A= → |A| = = ad − bc.
c d c d

For example,


2 3
4 5 =


1 −2
5 3 =

10.7.2 3 × 3 matrix.
The steps are the following.

1. Assign to each element a sign (+ or -) according to the pattern


 
+ − +
 − + − 
+ − +
(
+ if i + j is even
The element in position i, j has the sign (−1)i+ j , i.e. .
− if i + j is odd

2. Choose one row or column (typically the first row, but any will work).

3. Find the minor of an element as follows:

(a) Cross out the row and column in which the element occurs.
(b) The 2 × 2 determinant of the remaining elements is the minor.

4. The product of the sign with the minor gives the cofactor of the element.

5. To evaluate the determinant, move along the row or column you chose, multiply each ele-
ment by its cofactor and add up the results.

The same procedure can be applied to higher order matrices.


NOTE: A matrix with determinant equal to zero is called a singular matrix.

Example 1.

1 2 1

3 0 4 =

2 1 0
70 WEEK 10. MATRICES

10.8 Exercises
Exercises 1.
     
3 1 2 4 −1 2 1 2
1. Given that A = ,B= ,C= , evaluate where pos-
5 1 7 3 1 3 6 −5
sible
(i) 3A (ii) 2B (iv) 3A + 2B (v) A −C (vi) 3A − 2B.
(iii) C + B
 
  1 −1    
2 3 4 2 1 0 3 1
2. Given that P = , Q = 0 2  , M = , N= ,
1 5 2 3 4 7 4 5
1 3
find, where possible,
(i) PQ (ii) QP (iii) MQ (iv) MN (v) NM (vi) QN (vii) NQ.

3. Evaluate the following determinants



1 2 1 1 −2 0
6 2 3 4 2 4
(i) , (ii) , (iii) , (iv) −1 3 4 , (v) 3 1 5 .
1 5 6 5 −7 −3
5 1 2 −1 2 3

 
2 −1 4
4. Show that A =  5 −2 9  is not a singular matrix.
3 2 1

x 3+x 2+x

5. Solve 3 −3 −1 = 0.
2 −2 −2
Answers :

       
9 3 6 8 −2 4 17 1 10 1 5 2
1. (i) , (ii) , (iv) , (vi) . (iii)
15 3 21 6 2 6 21 5 27 9 1 15
and (v) are not possible.
   
  1 −2 2     −1 −4
6 16 2 0 9 7 7
2. (i) , (ii)  2 10 4  , (iii) , (v) , (vi)  8 10  .
3 15 10 26 23 24 35
5 18 10 15 16
(iv) and (vi) are not possible.

3. (i) 28 (ii) − 9 (iii) 22 (iv) 30 (v) 21.

4. |A| = 2 6= 0, hence A is not singular.

5. x = −1.5
Week 11

Maxima and minima

11.1 Stationary points


A stationary point or turning point is a point on a curve where the gradient of the tangent is zero.

On this curve the turning points are at :

Point A is a

Point B is a

Point C is a
dy
At a turning point the gradient is zero ⇒ dx = .

71
72 WEEK 11. MAXIMA AND MINIMA

d2 y
At a local maximum the gradient is changing from to ⇒ dx2
0.

d2 y
At a local minimum the gradient is changing from to ⇒ dx2
0.

The gradient of a curve has the same sign on either side of a point of inflexion.

Summary

dy d2 y
Type of turning point
dx dx2
Maximum
Minimum
Point of inflexion
Problematic case
11.1. STATIONARY POINTS 73

Example 1.
Find the local maximum and local minimum points on the curve y = x5 − 80x + 16.

dy
Solution : dx = 5x4 − 80.
dy
At a maximum/minimum dx = 0, therefore

dy
= 5x4 − 80 = 0 ⇒ 5x4 = 80 ⇒ x4 = 16 ⇒ x = ±2.
dx
The corresponding values for y are
(
x = −2 y=
.
x=2 y=

To decide whether these are maxima or minima we look at the second derivative:

d2 y
=
dx2
d2 y
At x = −2 : dx2
= ⇒

d2 y
At x = 2 : dx2
= ⇒
d2 y
An inflexion point can be found when dx2
= 20x3 = 0 ⇒ x = 0. Therefore the point (0, 16) is
an inflexion point.
74 WEEK 11. MAXIMA AND MINIMA

Example 2. A 10m long beam AB is supported at both ends. The beam is deflected by a load. At
any point on the beam the deflection y(m) is given by

1
y= (x3 − 26x2 + 160x),
3000
where x is the distance from end A in meters. To find the point where deflection is maximum and
the size of this deflection,

dy
= .
dx
dy 1 2
At a local maxima dx =0⇒ 3000 (3x − 52x + 160) = 0 ⇒ (3x2 − 52x + 160) = 0.

40
Therefore x = 4m or x = 3 ≈ 13.33m.

The second derivative is given by

d2 y
=
dx2
d2 y
When x = 4m ⇒ dx2
= ⇒ .

d2 y
When x = 13 31 m ⇒ dx2
= ⇒ .

The maximum deflection is therefore attained at x = 4m and is of


1
(43 − 26 × 42 + 160 × 4) = 0.096m.
3000
11.1. STATIONARY POINTS 75

Example 3. The speed v (in ms−1 ) of a signal transmitted through a cable is given by

v = −0.9 k x2 ln x
where x is the ratio of the inner to the outer diameter of the core and k is a positive constant. Find
the value of x for which the speed of transmission is maximum. Show clearly that your answer is
in fact a maximum and not a minimum and find the maximum speed of transmission in terms of k.
We compute the first and second derivatives of v with respect to x using the product rule.

dv
=
dx
d2v
=
dx2
dv
The first derivative dx is 0 when

dv
= 0 ⇒ −0.9k [2x ln x + x] = 0 ⇒
dx
There are two solutions : x = and x = , but only x = is physically realistic.
The second derivative at this point is
Therefore this point is a maximum. The maximal speed is

v = 0.45 e−1 k ≈ 0.166 k.


76 WEEK 11. MAXIMA AND MINIMA

11.2 Exercises
Exercises 1. For each of the following functions, find any maxima, minima and points of inflexion.

1. y = x2 − 6x + 1

2. y = 4x − 3x3

3. y = x2 − 5x + 3

4. y = 2x3 − 3x2 − 12x − 7

5. y = −2x3 + 27x2

6. y = x − ex

7. y = xex

8. y = a x2 + bx + c, (a > 0)

Answers :

1. Min at (3, −8)

2. Min at (− 23 , − 16 2 16
9 ), max at ( 3 , 9 ), inflexion at (0, 0).

3. Min at ( 25 , − 13
4 ).

4. Min at (2, −27), max at (−1, 0) and inflexion at (0.5, −13.5).

5. Min at (0, 0), max at (9, 729) and inflexion at (4.5, 364.5).

6. Max at (0, −1).

7. Min at (−1, − 1e ), inflexion at (−2, − e22 ).


b 4ac−b 2
8. Min at (− 2a , 4a ).
Week 12

Linear Regression : the Least Squares


Method

12.1 Linear regression


Let us start with a set of bivariate data (x1, y1 ), (x2 , y2 ), . . . , (xn , yn ) where it is suspected that there
is a linear relationship between the two variables. The method of least squares can be used to find
a line of best fit.
The line of best fit y = a + b x is the one which minimises the squares of the differences be-
tween the observed values yi and the y values.

The coefficients for this line are obtained by using the formulas

n ∑ xi yi − ∑ xi ∑ yi
b =
n ∑ xi2 − (∑ xi )2
∑ yi − b ∑ xi
a =
n

77
78 WEEK 12. LINEAR REGRESSION : THE LEAST SQUARES METHOD

Example 1. It is thought that a linear relationshop exists between the following values of xi and
yi . Use least squares to find the line of best fit and hence estimate the value of y when x = 30.
We complete the following table

xi yi xi2 xi yi
10 3.8
20 6
50 12.8
60 14.1
80 18.5
Sum ∑

We then compute

n ∑ xi yi − ∑ xi ∑ yi
b = =
n ∑ xi2 − (∑ xi )2
∑ yi − b ∑ xi
a = =
n
The line of best fit is y = a + b x = . When x = 30, this gives a predicted value of
y= = (to 1 d.p.).
12.2. NONLINEAR RELATIONSHIPS 79

12.2 Nonlinear relationships


Example 2. It is thought that y and t are related such that y = C Rt for some constants C, R. This
is an indicial relationship, so first take logs to obtain

ln y = ln(C Rt ) = lnC + ln Rt = |{z}


lnC +t |{z}
ln R
a b

which represents a linear relationship between ln y and t.

We use the following table

ti yi ln yi ti2 ti ln yi
1 10.2
2 26.4
3 66.1
4 163.2
5 414.7
Sum ∑
Therefore we compute

n ∑ ti ln yi − ∑ ti ∑ ln yi
b = = = ln R
n ∑ ti2 − (∑ ti )2
∑ ln yi − b ∑ ti
a = = = lnC
n
hence R = ,C = and the indicial relationship is given by y = CRt = .
80 WEEK 12. LINEAR REGRESSION : THE LEAST SQUARES METHOD

Example 3. Assuming that P = At k , estimate the values of A and k.

t 5 10 15 20 25
P 0.38 0.50 0.59 0.66 0.72

Taking logs of P = At k , we get

ln P = ln(At k ) = |{z}
ln A + |{z}
k lnt
a b

which is a linear relationship between lnt and ln P.

We then use the table

ti Pi lnti ln Pi (lnti )2 (lnti )(ln Pi )


5 0.38
10 0.50
15 0.59
20 0.66
25 0.72
Sum ∑

and compute

n ∑ lnti ln Pi − ∑ lnti ∑ ln Pi
b = = =k
n ∑(lnti )2 − (∑ lnti )2
∑ ln Pi − b ∑ lnti
a = = = ln A.
n
Therefore A = ea = and we obtain the relationship P = .
12.3. EXERCISES 81

12.3 Exercises
Exercises 1.

1. For the following sets of data, build the straight line of best fit.

xi 1 2 3 4 5
(a)
yi 18 24 23 29 36
xi 0 1 2 3 4 5
(b)
yi 7.2 18.9 31.6 42.1 55.0 68.1
xi 0 2 4 6 8 10
(c)
yi 24.62 20.19 17.11 13.99 8.64 5.23

2. Consider the following data

xi 2 3 4 5 6
yi 100 740 3000 9500 19250

Tabulate Y = ln y versus X = ln x and find the line of best fit for Y versus X. Given that y
varies with x according to y = c xd , estimate the values of c and d.

3. It is thought that exists a relationship of the form X = Aekt for the data

ti 1 2 3 4
Xi 22.17 163.8 1210 8943

Find the line of best fit forln X against t, hence estimate the values of A and k.

4. Consider the data

ti 2 3 5 10 14 18
Vi 153 200 282 449 563 666

Given that V varies with t according to V = at n , estimate the values of a and n.

Answers :

1. a) y = 4.1x + 13.7, b) y = 12.09x + 6.91, c) −1.92x + 24.59

2. c = 3.58, d = 4.84, y = 3.58 x4.84 .

3. A = 3, k = 2 hence X = 3e2t .

4. V = 96t 0.67 .
82 WEEK 12. LINEAR REGRESSION : THE LEAST SQUARES METHOD

Extra problem : Prove the formulae for the coefficients a and b by using the following approach.
We want to find the values for a and b which minimize the square of the errors. For each point
(xi , yi ), the square of the difference between the actual value yi and the predicted value a + bxi is
given by (a + bxi − yi )2 . The sum of these errors is given by

S = ∑(a + bxi − yi )2
where the sum is taken over all n points in the data set. This is the function we want to
minimize. To do this,

• Compute the partial derivatives

∂S ∂S
and .
∂a ∂b

You should obtain


∂S ∂S
= 2 ∑(a + bxi − yi ) = 0, = 2 ∑(a + bxi − yi )xi = 0.
∂a ∂b

Note that these can be written as

∂S    
∂a
= 2 ∑ a + ∑ bxi − ∑ yi = 2 n a + b ∑ xi − ∑ yi
∂S
∑ axi + ∑ bxi2 − ∑ xi yi = 2 a ∑ xi + b ∑ xi2 − ∑ xi yi
   
= 2
∂b

∂S ∂S
• Function S will have a minimum when both partial derivatives ∂a and ∂b are equal to 0,
therefore solve the system

∂S ∂S
= 0, = 0.
∂a ∂b
The first equation would give

∂S   ∑ yi − b ∑ xi
= 2 n a + b ∑ xi − ∑ yi = 0 ⇒ a =
∂a n
Inserting into the second equation leads to

  
∂S  2
 ∑ yi − b ∑ xi 2
= 2 a ∑ xi + b ∑ xi − ∑ xi yi = 2 ∑ xi + b ∑ xi − ∑ xi yi
∂b n
  
1 2  2
= 2 yi xi − b ∑ xi + b ∑ xi − ∑ xi yi
n ∑ ∑
2h  2  i
= ∑ yi ∑ xi + b n ∑ xi2 − ∑ xi − n ∑ xi yi = 0
n

and solving for b gives


n ∑ xi yi − ∑ xi ∑ yi
b= .
n ∑ xi2 − (∑ xi )2
Week 13

Approximating functions: Maclaurin


series

Let us consider the problem of approximating a function using a polynomial. This can be very
useful when a complicated function appears in an expression we wish to solve. One very common
example is the sine function, which can be approximated

sin x ≈ x, (13.1)

when x is close to 0, as shown in Figure 13.1 below.

1
sin x
x

0.5

−0.5

−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

Figure 13.1: Plot of sin x and x for small x.

13.1 General procedure


Here we aim to obtain a general procedure for computing a polynomial approximation for a given
function. Let us suppose we have a function f (x) that we wish to approximate using a polynomial,

f (x) ≈ a0 + a1 x + a2 x2 + a3 x3 + a4 x4 + . . . . (13.2)

83
84 WEEK 13. APPROXIMATING FUNCTIONS: MACLAURIN SERIES

The problem is therefore to find the value for the constants a0 , a1 , etc. To do so, notice that
evaluating the function at x = 0 gives

f (0) = a0 + a1 (0) + a2 (0) + a3 (0) + . . . = a0

and so
a0 = f (0).
To obtain the next constants, we differentiate on both sides the equation for f (x), getting

f 0 (x) ≈ a1 + 2a2 x + 3a3 x2 + . . .

Evaluating at x = 0, we obtain
f 0 (0) = a1 .
Differentiating again,
f 00 (x) ≈ 2a2 + 3 × 2a3 x + . . . .
and setting x = 0 we get
f 00 (0) = 2a2 .
Continuing this process, we can obtain the value of all constants, up to any degree !
In general, we can prove that the constants are equal to
f (n) (0)
an =
n!
where
d n f
f (n) (0) =
dxn x=0

and n! is called the factorial of n and is equal to the product of all numbers from 1 to n,

n! = 1 × 2 × 3 × . . . . × n.

For example,

0! = 1(by convention)
1! = 1
2! = 1 × 2 = 2
3! = 1 × 2 × 3 = 6
4! = 1 × 2 × 3 × 4 = 6 × 4 = 24
5! = 1 × 2 × 3 × 4 × 5 = 24 × 5 = 120

Let’s do an example with the exponential function.


Example 1. Compute the Maclaurin series up to x3 for the exponential ex .
We need to find the constants a0 , a1 , a2 , a3 such that

ex ≈ a0 + a1 x + a2 x2 + a3 x3

We compute the consecutive derivatives of the exponential

n=0: f (x) = ex f (0) = 1 → a0 = 1/0! = 1


0
n=1: f 0 (x) = ex f (0) = 1 → a1 = 1/1! = 1
(2)
n=2: f (2) (x) = ex f (0) = 1 → a2 = 1/2! = 1/2
(3)
n=3: f (3) (x) = ex f (0) = 1 → a3 = 1/3! = 1/6
13.1. GENERAL PROCEDURE 85

Therefore, the required expansion is


1 1
ex ≈ 1 + x + x 2 + x 3
2 6

8
ex
1+x
2

6 1 + x + x2
x2 3
1+x+ 2 + x6

0 0.5 1 1.5 2

Figure 13.2: Successive approximations of the exponential function ex .

Example 2. Compute the Maclaurin series up to x3 for the sine function sin(x).

We need to find the constants a0 , a1 , a2 such that

sin(x) ≈ a0 + a1 x + a2 x2 + a3 x3 .

We compute the consecutive derivatives

n=0: f (x) = sin(x) f (0) = 0 → a0 = 0


0
n=1: f 0 (x) = cos(x) f (0) = 1 → a1 = 1/1! = 1
(2)
n=2: f (2) (x) = − sin(x) f (0) = 0 → a2 = 0/2! = 0
(3)
n=3: f (3) (x) = − cos(x) f (0) = −1 → a3 = −1/3! = −1/6

Therefore, the required expansion is

x3
sin(x) ≈ x −
6
86 WEEK 13. APPROXIMATING FUNCTIONS: MACLAURIN SERIES

13.2 Seminar sheet


Q1. Compute the expansion of cos x up to x4 .

1. Use this expansion to get an approximation of the value of cos (5◦ ).

2. Use the terms only up to x2 to get an approximation x0 of the solution of the equation
1
cos x = x2 + .
2

Q2. Compute the expansion of ln(x + 1) up to x4 .


13.3. EXERCISES 87

13.3 Exercises
Exercises 1.

1
1. Find the expansion up to x3 of 1+x .

2. Show that
√ 1 1 1 5 4
1 − x = 1 − x − x2 − x3 − x ...
2 8 16 128
3. Give an approximate solution to the equation
x + ex = 0
by using a first-degree polynomial approximation of the exponential. Compare with the
solution when using a second-degree polynomial approximation.
4. Plot the functions ex , 1 + x + x2 /2 and 1 + x + 12 x2 + 61 x3 in Google to see how adding terms
to the polynomial provides a better approximation to the original functions.
Answers:

1
1. For the function 1+x , we get the following Maclaurin series
1
≈ 1 − x + x2 − x3
1+x
Continuing further, you would obtain that an = (−1)n and therefore

1
≈ ∑ (−1)n xn i.e. the sum of powers of x with alternating signs.
1 + x n=0

2. You need to compute the Maclaurin series. If you set y = (1 − x)1/2 , then
dy 1
= − (1 − x)−1/2 , etc.
dx 2
3. Using ex ≈ 1+x, you should obtain x = −1/2 = −0.5. With a second-degree approximation,
2 √
the equation becomes 1 + 2x + x2 = 0. The root closest to 0 is −2 + 2 ≈ −0.5858. An
almost exact approximation would be x = −0.567143.

4
0
x + ex
3

−1
Q3. −1 −0.5 0 0.5 1

4. In Google, you could simply type plot exp(x) and 1+x+x**2/2 and 1+x+x**2/2+x**3/6
and use the mouse to zoom in to obtain a similar graph to the one in Figure 13.2. You may
of course obtain different colours. You can also use other graphing software such as Matlab,
Octave, Maxima, Mathematica, Gnuplot, Matplotlib, etc.
88 WEEK 13. APPROXIMATING FUNCTIONS: MACLAURIN SERIES
Week 14

Partial differentiation and error


analysis

14.1 Partial differentiation


If one variable is a function of two or more other independent variables, e.g.

z = f (x, y) = x2 + 4y − 3xy
then z changes with respect to x and also with respect to y. We denote by

∂z
(Note the curly ∂!)
∂x
the partial derivative of z with respect to x and is found by treating y as a constant. In our case,

∂z ∂ 2 ∂ ∂
= (x ) + (4y) − (3xy)
∂x ∂x ∂x ∂x
∂ 2 ∂ ∂
= (x ) + 4y (1) − 3y (x)
∂x ∂x ∂x
= 2x + 0 − 3y = 2x − 3y
∂z
To find ∂y , the partial derivative of z with respect to y, treat x as a constant.

∂z ∂ 2 ∂ ∂
= (x ) + (4y) − (3xy)
∂y ∂y ∂y ∂y
= 0 + 4 − 3x = 4 − 3x
Notation for higher derivatives

∂2 z
 
∂ ∂z ∂
means = (2x − 3y) = 2
∂x2 ∂x ∂x ∂x
∂2 z
 
∂ ∂z ∂
means = (4 − 3x) = 0
∂y2 ∂y ∂y ∂y
∂2 z
 
∂ ∂z ∂
means = (4 − 3x) = −3
∂x∂y ∂x ∂y ∂x
∂2 z
 
∂ ∂z ∂
means = (2x − 3y) = −3
∂y∂x ∂y ∂x ∂y

89
90 WEEK 14. PARTIAL DIFFERENTIATION AND ERROR ANALYSIS

All these principles above apply also to functions of more than two variables. For example, if
z = sin(t) exy , then we can find all first-order partial derivatives

∂z
=
∂t
∂z
=
∂x
∂z
=
∂y

Example 1. If z = f (x, y) = 6x3 + 5xy2 + 4y3 + 2ex , find the first and second partial derivatives.

14.2 Small changes and errors for a function of a single variable


The concept of differentiating a function is based on the following idea. If y is a function of x,
y = f (x), and if δx is a small increment in x and δy the resulting increment in y, then

dy δy

dx δx
The equality holds when the increment δx is made infinitely small. We can rearrange this expres-
sion in the following way

dy
δy ≈ δx (14.1)
dx
This equation can be used to estimate errors made during experimental readings.

Example 2. Let P (power in watts), R (resistance in ohms) and V (potential difference in volts).
These are related by the equation

V2
P= .
R
If the resistance is fixed but the voltmeter reading is known to be only accurate to ±3%, what
is the percentage error in the calculated value of P?

Using
dP δP dP
≈ ⇒ δP ≈ δV,
dV δV dV
and since
dP 2V 3
= and δV = ± V,
dV R 100
we get that

6 V2
 
V 3 6
δP ≈ 2 · ± V =± =± P.
R 100 100 R 100
Hence the maximum error in the calculated value of P will be ±6%.
14.3. SMALL CHANGES AND ERRORS FOR FUNCTIONS OF MORE THAN ONE VARIABLE91

14.3 Small changes and errors for functions of more than one vari-
able
If w is a function of many variables, w = w(x, y, z), then its total differential is given in terms of
the partial derivatives by

∂w ∂w ∂w
δw = δx + δy + δz.
∂x ∂y ∂z
Example 3. Find the percentage change in the volume of a cylinder if its radius increases by 2%
whilst its height decreases by 1%.
The volume of a cylinder is a function of the radius r and its height h and is given by

V = π r2 h.

The total differential of V is therefore

∂V ∂V
δh = π 2 r h δr + r2 δh
 
δV = δr +
∂r ∂h
2 1
If δr = 100 r (positive increase) and δh = − 100 h, then

    
2 2 1
δV = π 2rh· r +r · ±− h
100 100
   
4 2 1 2 3 2 3
= π r h− r h =π r h = V.
100 100 100 100

There is therefore an increase of 3% in the volume.


92 WEEK 14. PARTIAL DIFFERENTIATION AND ERROR ANALYSIS

14.4 Seminar sheet


Question 1. Consider again Example 2 where we had

V2
P= .
R
Now suppose that the resistance is known to be accurate to ±2% and the voltmeter reading
is known to be accurate to ±4%, what will be the maximum possible percentage error in the
calculated value of P.

Question 2. Given that measuring the current A, the voltage V and the welding speed s is accurate
to ±2% of their respective value, estimate the maximal error obtained when computing the
welding heat input H using the formula
AV
H =k ,
s
where k is a constant.

Question 3. We say that a fluid flow is a potential flow if its stream function ψ(x, y) satisfies
Laplace equation
∂2 ψ ∂2 ψ
+ 2 = 0.
∂x2 ∂y
Show that the function ψ = ln (x2 + y2 ) defines a potential flow. A potential flow is some-
times said to be irrotational and has no vorticity.
14.5. EXERCISES 93

14.5 Exercises
Exercises 1.

∂z ∂z ∂2 z ∂2 z ∂2 z ∂2 z
1. If z = 4x2 + 5y + 6xy2 , find , , , , , .
∂x ∂y ∂x2 ∂y2 ∂x∂y ∂y∂x
2. Given that z = x2 + sin y + 4xy2 , find the first and second partial derivatives.
∂z ∂z ∂z ∂2 z ∂2 z ∂2 z
3. If z = wxy + w2 + cos x − w sin y, find , , , , , .
∂x ∂y ∂w ∂x∂y ∂x∂w ∂y∂w
Exercises 2.

1. The deflection at the centre of a rod is known to be given by

kωl 3
y= , where kis a constant.
d4

If ω increases by 2%, l by 3% and d decreases by 2%, find the percentage change in y.


2
2. Let P be defined by P = QRD5
. If R, Q and D are known to ±2% accuracy, find the maximum
percentage error in the calculated value of P.

3. The rate of flow of a liquid through a tube is given by Poiseuille’s equation

πPa4
Q= ,
8ηl

where P is the pressure difference between the ends of a tube of length l and radius a and
the viscosity coefficient of the liquid is η. Rearrange this equation to make η the subject.
Given that P and Q are measured to ±3% accuracy whereas a and l are known to ±0.5%
accuracy, find the maximum error in the calculated value of η.

Answers 1:
∂z ∂z ∂2 z ∂2 z ∂2 z ∂2 z
1. = 8x + 6y2 , = 5 + 12xy, 2 = 8, 2 = 12x, = = 12y.
∂x ∂y ∂x ∂y ∂x∂y ∂y∂x
∂z ∂z ∂2 z ∂2 z ∂2 z ∂2 z
2. = 2x + 4y2 , = cos y + 8xy, 2 = 2, 2 = − sin y + 8x, = = 8y.
∂x ∂y ∂x ∂y ∂x∂y ∂y∂x
∂z ∂z ∂z ∂2 z ∂2 z ∂2 z
3. = wy − sin x, = wx − w cos y, = xy + 2w − sin y, = w, = y, = x − cos y
∂x ∂y ∂w ∂x∂y ∂x∂w ∂w∂y
Answers 2:

1. +19%

2. ±16%

3. ±8.5%
94 WEEK 14. PARTIAL DIFFERENTIATION AND ERROR ANALYSIS
Week 15

Integration by substitution and partial


fractions

15.1 Integration by substitution


f (g(x)) g0 (x) dx, e.g. 2 esin 2x cos 2x dx.
R R
For integrals of the form

Indefinite integrals To compute the integral


Z
cos(x2 + 3x) (2x + 3) dx

du
let u = x2 + 3x, then dx = 2x + 3 ⇒ du = (2x + 3) dx. The integral becomes
Z Z
cos(x|2 {z
+ 3x}) (2x + 3) dx = cos u du = sin u +C.
| {z }
u du

Returning back to the original variables, we obtain


Z
cos(x2 + 3x) (2x + 3) dx = sin(x2 + 3x) +C.

Definite integrals We start in the same way and need to change also the limits of integration.
For example, to evalutate the integral
Z 1
e2x (1 − e2x )3 dx
0
du
firstly introduce u = 1 − e2x to get dx = −2e2x ⇒ du = −2e2x dx. To change the limits of the
integral,

x = 0 ⇒ u = 1 − e2×0 = 1 − 1 = 0
x = 1 ⇒ u = 1 − e2×1 = 1 − e2 .

In the new variable u, the integral becomes

Z 1−e2  1−e2
1 u4 1 (1 − e2 )4
Z 1  
2x 2x 3 1 3 1
e (1 − e ) dx = − u du = − =− − 0 = − (1 − e2 )4 .
0 0 2 2 4 0 2 4 8

95
96 WEEK 15. INTEGRATION BY SUBSTITUTION AND PARTIAL FRACTIONS

Example 1.
x
Z
√ dx
3x + 1

Example 2.
x+1
Z
dx
x2 + 2x + 5

This is an example of the special case

k f 0 (x)
Z
dx = k ln | f (x)| + c.
f (x)
Example 3.

x2 − 1
Z
dx
x3 − 3x

Example 4.
Z
tan x dx =
15.2. PARTIAL FRACTIONS 97

15.2 Partial fractions


Fractions can be split and integrated when the denominator factorises.

Z  
5x + 8 5x + 8 2 3
Z Z
2
dx = dx = + dx = 2 ln(x + 4) + 3 ln(x − 2) +C
x + 2x − 8 (x + 4)(x − 2) x+4 x−2

To obtain this decomposition, there are three types.

Type one: Real linear factors in denominator

Example 5. Let us write

5x + 8 5x + 8 A B
= = +
x2 + 2x − 8 (x + 4)(x − 2) x + 4 x − 2
A(x − 2) + B(x + 4)
=
(x + 4)(x − 2)

Since the denominators are equal, the numerators must also be equal.

5x + 8 = A(x − 2) + B(x + 4)
At x = 2:

At x = −4:
98 WEEK 15. INTEGRATION BY SUBSTITUTION AND PARTIAL FRACTIONS

Type two: A quadratic factor in the denominator

Example 6.
2x + 3
Z
dx
(x − 1)(x2 + 4)

2x + 3 A Bx +C
= +
(x − 1)(x2 + 4) x − 1 x2 + 4
15.2. PARTIAL FRACTIONS 99

Type three: Repeated factor in the denominator

Example 7.
5x + 3
Z
dx
(x − 2)(x + 3)2
We write

5x + 3 A B C
2
= + +
(x − 2)(x + 3) x − 2 x + 3 (x + 3)2
100 WEEK 15. INTEGRATION BY SUBSTITUTION AND PARTIAL FRACTIONS

15.3 Seminar sheet


Question 1. Evaluate the integral
x2 − 1
Z
dx.
x3 − 3x

Question 2. Evaluate the integral


Z 4
t
dt.
1 3t 2 + 1

Question 3. Evaluate the following integral using partial fractions


Z 8
dx
.
4 (x + 2)(x − 3)

Question 4. The moment of inertia I of a rod of length 2r is given by

mx2
Z r
I= dx,
−r 2r
mr2
where m is the mass of the rod and x is the distance from the axis. Show that I = 3 .
15.4. EXERCISES 101

15.4 Exercises
Exercises 1. 1. Integration by substitution

Z 1
(a) x2 sin(x3 + 1) dx
0
Z
(b) sin(cos x) sin x dx
Z 0
2 −2
(c) xe−3x dx
−1

2. Integration by use of partial fractions

2x − 1
Z
(a) dx
x2 − 8x + 15
2x + 3
Z
(b) dx
(x − 4)(5x + 2)
x2 − 2x
Z 1
(c) 2
dx
0 (2x + 1)(x + 1)
8−x
Z
(d) dx
(x − 2)2 (x + 1)
2x − 3
Z
(e) dx
(x − 1)(x − 2)(x + 3)
Answers :

1. cos 1−cos 2 e−5 −e−2


a) 3 ≈ 0.3188 b) cos(cos x) + c c) 6 ≈ −0.0214

a) 92 ln(x − 5) − 52 ln(x − 3) +C b) 12 ln(x − 4) − 10


1
ln(5x + 2) +C
2. c) 21 ln(2x + 1) − tan−1 x +C 2
d) ln(x + 1) − ln(x − 2) − x−2 +C
e) 41 ln(x − 1) + 15 ln(x − 2) − 20
9
ln(x + 3) +C
102 WEEK 15. INTEGRATION BY SUBSTITUTION AND PARTIAL FRACTIONS
Week 16

Integration by parts and applications

16.1 Integration by parts


Let’s go back to the product rule for differentiation.

d dv du
(uv) = u + v
dx dx dx
If we rearrange this equation, we get

dv d du
u = (uv) − v
dx dx dx
and integrating on both sides with respect to x we get

dv du
Z Z
u dx = u v − v dx
dx dx
Sometimes it may happen that v du dv
R R
dx dx is simpler to integrate than u dx dx.
This technique is used to integrate products of the type

• x sin x

• ex cos x

• (x2 + 3x) ln x
dv
Choose one part of the product as u, the other part as dx . The term which simplifies when differ-
entiated is chosen as the u term.

103
104 WEEK 16. INTEGRATION BY PARTS AND APPLICATIONS

Example 1. Find the following integral


Z
x e2x dx

Example 2. Find the following integral


Z
x2 ln x dx

Example 3. Use twice integration by parts to evaluate


Z
ex sin x dx
16.2. APPLICATIONS OF INTEGRATION 105

16.2 Applications of integration


16.2.1 Mean value
The mean value of a function y = f (x) between two values of x, say x = a and x = b, is given by
Z b
1
Mean = f (x) dx
b−a a

Example 4. Find the mean value of the function y = cos θ between θ = 0 and θ = π2 .

16.2.2 RMS value


This is the square root of the mean of the squares of y = f (x).
s
Z b
1
R.M.S. = f (x)2 dx
b−a a
Example 5. Find the R.M.S. value of y = cos θ between θ = 0 and θ = 2π.
106 WEEK 16. INTEGRATION BY PARTS AND APPLICATIONS

16.2.3 Volume of solid of revolution


A solid of revolution is formed by rotating an area through a complete revolution around one of
the axes. The volume of this solid can be computed by making use of an integral.
If an area bounded by the x the lines x = a, x = b and the curve y = f (x) is rotated around the
x axis, then its volume is given by
Z b
Volume = π f (x)2 dx
a

Example 6. The volume generated when the area encolsed by the curve y = x3 + 2, the lines x = 0,
x = 2 and the x axis, is rotated through 2π about the x axis.

Z 2
V= π (x3 + 2)2 dx
0
16.3. SEMINAR SHEET 107

16.3 Seminar sheet


Question 1. The acceleration, ẍ, of a particle is given by

ẍ = te−t

Find the expression for the velocity


Z
v = ẋ = te−t dt.

Question 2. Evaluate the RMS value of the current i = 5 sint between t = 0 and t = 2π.

Question 3. The centre of gravity x̄ for a solid of revolution, formed by rotating the function
y = f (x) between x = a and x = b around the x axis is given by
Rb
xy2 dx
x̄ = Ra b .
2
a y dx

Using this formula, find the centre of gravity of the solid obtained by rotating the area under
the curve x2 + y2 = 16, between x = 1 and x = 3, around the x axis.
108 WEEK 16. INTEGRATION BY PARTS AND APPLICATIONS

16.4 Exercises
Exercises 1.
Revision of integration methods.
Z
3 √ Z
3
Z
1. (x − x)dx 2. √ dx 3. x sin xdx
x
2x
Z Z Z
4. 2x(1 − x2 )3 dx 5. 2
dx 6. xex dx
Z x −1 Z √
1
Z
7. (3 + 4x)3 dx 8. dx 9. 1 − xdx
Z 2
x
x
Z Z
10. dx 11. x ln xdx 12. 4 sin(3x + 1)dx
Z (x + 1)(x + 2)
1 1
Z Z
13. x2 (x3 − 1)dx 14. dx 15. √ dx
Z 1 −x  2x + 1
2 x 4x
Z Z
16. 2
dx 17. cos dx 18. 2 +1
dx
1 − x 2 x
(x2 + 2x − 1)
Z Z Z
19. esin x cos xdx 20. 21. ex cos xdx
(x − 1)(x − 2)(x − 3)

Exercises 2.

1. Find the area bounded by the curve y = x3 + 3x2 + 2x, the x axis, and the lines x = 1 and
x = 3.
x2
2. Find the area enclosed by the parabolas y2 = 4x and y = 4.

3. Find the volume generated when the area bounded by the curve y = e−x , the x and the lines
x = 1 and x = 2, is rotated through 2π radians about the x axis.

4. Find the mean value of the function

5
y=
(x + 1)(x + 4)

over the range x = 0 to 5.

5. Find the R.M.S. value of 1 − sint over the range 0 ≤ t ≤ π.

6. At time t the alternating current i is given by

i = A sin (ωt + φ)

where A, ω and φ are constants. Show that the R.M.S. value of the current, over the period
0 ≤ t ≤ 2π √A
ω is 2 .
16.4. EXERCISES 109

Answers 1.

x4 2 3/2
1. − x +c 2. 6x1/2 + c 3. sin x − x cos x + c
4 3
(1 − x2 )4
4. − +c 5. ln |x2 − 1| + c 6. (x − 1)ex + c
4
1 1 2
7. (3 + 4x)4 + c 8. − + c 9. − (1 − x)3/2 + c
16 x 3
x2

1 4
10. 2 ln |x + 2| − ln |x + 1| + c 11. ln x − +c 12. − cos (3x + 1) + c
2 2 3
x6 x3 1 √
13. − + c = (x3 − 1)2 + c̃ 14. − ln |1 − x| + c 15. 2x + 1 + c
6 3 6 x
16. ln |x + 1| − ln |1 − x| + c 17. 2 sin +c 18. 2 ln |x2 + 1| + c
2
ex
19. esin x + c 20. ln |x − 1| + 7(ln |x − 3| − ln |x − 2|) + c 21. (sin x + cos x) + c
2
Answers 2.

1. 54 square units.
16
2. 3 square units.
π −2
3. 2 (e − e−4 ) ≈ 0.184 square units.
1 8

4. 3ln 3 ≈ 0.327.
q
3
5. 2 − π4 ≈ 0.476.
110 WEEK 16. INTEGRATION BY PARTS AND APPLICATIONS
Week 17

Cramer’s rule and the matrix inverse

17.1 Definition
We consider this week systems of simultaneous linear equations. For example,

a1 x + b1 y = c1 ,
a2 x + b2 y = c2 , (17.1)
(17.2)

is a 2 × 2 system for x and y. At least three techniques can be used to obtain the values of x and y.

17.2 Cramer’s rule


The solution of (17.1) is given by

c1 b2 − c2 b1 a1 c2 − a2 c1
x= , y=
a1 b2 − a2 b1 a1 b2 − a2 b1
and note that this can be expressed as a ratio of two determinants




x= , y = .


Also notice that:

• The denominator of each term is the determinant of the matrix of coefficients of the left-hand
side of the original set of equations.

• The numerator for the x term is obtained by replacing the first column by the coefficients in
the right-hand side of the original set of equations.

• Similarly, the numerator for the y term is obtained by replacing the second column by the
coefficients in the right-hand side of the original set of equations.

111
112 WEEK 17. CRAMER’S RULE AND THE MATRIX INVERSE

Example 1. Solve directly


2x + y = 3, x − 2y = 4.

Example 2. Solve
2x − y = 1, −4x + 2y = −2.

The method works exactly in the same way for larger systems.

Example 3. Solve
x + y = 1, 2y = 1 − z, x+y+z = 0

using Cramer’s rule. We first write the system as a matrix equation


    
x
  y  =  .
z

Then





x= , y= , z= .




17.3 Inverse of a matrix


Let A be a square matrix and I be the corresponding identity matrix. A square matrix B such that
BA = I is the inverse of the matrix A and is denoted by A−1 .

Example 4.
  
2 1 3 −1
=
5 3 −5 2
   
2 1 3 −1
therefore is the inverse of .
5 3 −5 2
17.3. INVERSE OF A MATRIX 113

17.3.1 Inverse of a 2 × 2 matrix


If  
a b
A= ,
c d
then  
−1 1 d −b
A = .
ad − bc −c a
Notice that if det A = 0, i.e. if A is singular, then the inverse of A does not exist.

17.3.2 Inverse of higher order matrices


To find the inverse of a square matrix A, the steps are

1. Evaluate the determinant of A.

2. Replace each element by its cofactor.

3. Transpose the resulting matrix to form the adjoint matrix.

4. The inverse will be


1
A−1 = Adjoint(A).
det A
Example 5. Find the inverse of the matrix
 
2 3 1
A =  2 0 1 .
0 2 1
114 WEEK 17. CRAMER’S RULE AND THE MATRIX INVERSE

17.4 Using inverse matrices to solve simultaneous equations


If A is an invertible (say 3 × 3) matrix in the following equation
 
x
A  y  = B,
z

then we can multiply on the left by A−1 and obtain


     
x x x
A−1 A  y  = A−1 B ⇒ I  y  = A−1 B ⇒  y  = A−1 B.
z z z

Example 6. Write the system

4x − y = 1, −2x + 3y = 12

in matrix form and use the matrix inverse to find x and y.


17.5. SEMINAR SHEET 115

17.5 Seminar sheet


Question 1. Kirchhoff’s current law describes the conservation of electric charge and states that
at any junction in an electrical circuit, the sum of the currents flowing into the junction is
equal to the sum of the currents flowing out of the junction. For a circuit consisting of 2
junctions, with a given input voltage (V1 ) and output voltage (V2 ), through using Kirchhoff’s
current law we can deduce the following system of equation
V1 − 64 V1 −V2
− − −2 = 0 at Junction 1,
8 4
V1 −V2 V2
+2− = 0 at Junction 2.
4 10
Rearrange these equations in order to apply Cramer’s rule to determine the values of V1 and
V2 that satisfy Kirchhoff’s current law.

Question 2. In a homogeneous, isotropic and linearly elastic material, the strains (i.e. fractional
displacements) on a section of the material, represented by εx , εy , εz for the x−, y−, z− di-
rections respectively, can be related to the stresses (i.e. force per unit area), σx , σy , σz by the
following system of equations
1
εx = (σx − vσy − vσz )
E
1
εy = (−vσx + σy − vσz )
E
1
εz = (−vσx − vσy + σz )
E

where E is the modulus of elasticity (also called Young’s modulus) and v is Poisson’s ratio
which relates the lateral strain to the axial strain. Derive expressions for σx , σy and σz in
terms of the strain εx , εy and εz through rearranging the equation and applying the inverse
matrix method in the scenario where v = 14 , E = 4, εx = 1, εy = 0, εz = 1.
116 WEEK 17. CRAMER’S RULE AND THE MATRIX INVERSE

17.6 Exercises
Exercises 1. 1. Use Cramer’s rule to solve

(a) 2x + 2y = 2, −2x − 4y = 8.
(b) 3x − 2y − z = 4, 2x + y + z = 7, −x + 2y + 4z = 12.

2. Find the inverse of  


1 4 −1
A =  0 2 3 .
2 1 4

3. Use the matrix inverse to solve

(a) 3x + 3y = 11, 2x − 6y = 18.


(b) −2x + 3y + 4z = −7, x + y + 2z = 6, 2x + 3y + 3z = 13.
Answers:

1. a) x = 6, y = −5. b) x = 2, y = −1, z = 4.
 
5 −17 14
2. A−1 = 331 
6 6 −3 
−4 7 2

3. a) x = 5, y = −4/3. b) x = 5, y = 1, z = 0.
Week 18

Vectors

18.1 Definition
A vector is a quantity in space which has a magnitude and a direction. When working in three
dimensions, it is useful to introduce the “triad” i, j, k .

A vector is then given in terms of its coordinates with respect to the origin. We denote by
u = u1 i + u2 j + u3 k the vector which starts at the origin and ’ends’ at the point (u1 , u2 , u3 ). The
opposite of u, denoted −u, is the vector that points in the opposite direction.

The norm or modulus of a vector u = u1 i+u2 j+u3 k corresponds to the length of the segment,
that is
q
|u| = u21 + u22 + u23 .
A unit vector is a vector for which the norm is equal to 1. You can verify that the vector
u u1 u2 u3
= i+ j+ k
|u| |u| |u| |u|
has norm equal to one.

117
118 WEEK 18. VECTORS

18.2 Addition, subtraction and multiplication by a scalar


The addition and subtraction of vectors is performed termwise. Same goes for the mulplication by
a scalar (number). If u = u1 i + u2 j + u3 k and v = v1 i + v2 j + v3 k, then

u + v = (u1 + v1 ) i + (u2 + v2 ) j + (u3 + v3 ) k


u − v = (u1 − v1 ) i + (u2 − v2 ) j + (u3 − v3 ) k
k u = k u1 i + k u2 j + k u 3 k

18.2.1 Addition
The addition of u and v is obtained by placing the second vector at the end of the first one.

18.2.2 Subtraction
The subtraction u − v is obtained by adding the opposite of v to u, i.e. u − v = u + (−v).

18.2.3 Multiplication by a scalar


The multiplication of a vector u by a number k corresponds to a dilation of u by a factor of k.
18.3. DOT PRODUCT 119

18.3 Dot product


The dot product (also called the scalar product) of two vectors u = u1 i + u2 j + u3 k and v = v1 i +
v2 j + v3 k, denoted u · v, is defined by

u · v = u1 v1 + u2 v2 + u3 v3 .
It can be shown that the dot product can be computed by using the following formula

u · v = |u| |v| cos θ


where θ is the angle between u and v.

This provides an easy way to compute the angle between two given vectors
u·v
cos θ = .
|u| |v|
If two vectors are perpendicular (we also say orthogonal), then θ = 90◦ and cos θ = 0. Therefore
two vectors u and v are perpendicular if and only if their dot product is equal to 0.

u and v are perpendicular ↔ u · v = 0.

Example 1. Let u = i+2 j+k and v = i−4 j+2k. Find u·v and the angle between the two vectors.

Example 2. Compute the dot product of u = 2i + j − k and v = −i + 3j + k.


120 WEEK 18. VECTORS

18.4 Cross product


The cross product of two vectors u = u1 i + u2 j + u3 k and v = v1 i + v2 j + v3 k is defined by the
following determinant


i j k

u × v = u1 u2 u3 =
v1 v2 v3

The cross product always produces a vector which is perpendicular to both u and v.

The cross product also has the following property.

u × v = −v × u.

Example 3. Find a vector perpendicular to the vectors u = i − 4 j − k and v = 2 i + j + 2 k.

We compute the cross product of u and v,


i j k
−4 −1 1 −1 1 −4
w = u × v = 1 −4 −1 = i

− j 2 2 + k 2 1 = −7 i − 4 j + 9 k.

2 1 1 2
2

We verify that this vector is indeed perpendicular to u and v by computing the dot product

u · w = (i − 4 j − k) · (−7 i − 4 j + 9 k) = −7 + 16 − 9 = 0
v · w = (2 i + j + 2 k) · (−7 i − 4 j + 9 k) = −14 − 4 + 18 = 0

Example 4. Verify that i and j are perpendicular and compute their cross product.
18.5. SEMINAR SHEET 121

18.5 Seminar sheet


Question 1. A projectile is fired with an initial velocity of 30m/s at an angle of 50◦ with the
horizontal. Write the velocity in the i, j notation.

Question 2. A boat sets off from a port and travels 100 miles at 10◦ North from the East direction
and then travels a further 150 miles in the direction 25◦ West from North. What is the
resulting displacement ?

Question 3. The forces F1 = 3i + 2j and F2 = −5i + 4j + 2k are acting on an object.

• Find the resulting force F = F1 + F2 .


• Find the magnitude of each force and compute the angle between them.
• Find a vector which is perpendicular to both forces.
122 WEEK 18. VECTORS

18.6 Exercises
Exercises 1.

1. Given the vectors a = 3 i + 4 j − k and b = 2 i − 4 j − 3 k. Compute

a
a) a + b b) 3a − 2b c) 2a + b d) a · b e) f) a × b
|a|
2. Compute the scalar product of u = −i + 2 j − 3 k and v = 3 i − 2 j − 2 k and find the angle
between the two vectors.

3. Find a vector which is perpendicular to both u = j − k and v = i − 3 j.

4. Let a force F = 2 i + 3 j + k act on a mass. Determine the magnitude (norm) of this force and
the angle between this force and the vector i.

Answers:
1
1. a) 5 i − 4 k b) 5 i + 20 j + 3 k c) 8 i + 4 j − 5 k d) −7 e) √ (3 i + 4 j − k) f) −16 i + 7 j − 20 k
26
√ √
2. u · v = −1, |u| = 14, |v| = 17, cos θ = √ −1
√ ≈ −0.065 → θ = 93.72◦ .
14 17

3. Any vector proportional to 3 i + j + k, e.g. −3 i − j − k.



4. |F| = 14, angle = 57.69◦ .
Week 19

First-order differential equations

19.1 Definitions
A differential equation is an equation which involves a function, say y(x), and its derivatives

dy d 2 y dny
 
F x, y, , 2 , . . . , n = 0.
dx dx dx
For example,
d 2 y dy
− + y + x = 0.
dx2 dx
The objective is to find the function y(x) which satisfies this equation. Such a function is said
to be a solution of the equation.
The order of the differential equation is the order of the highest derivative it contains. A
dy
first-order differential equation is an equation which involves only x, y(x) and the derivative .
dx
In this section, we will look at equations which are of the forms :
dy
• Directly integrable : = f (x), for some function f (x).
dx
dy
• Separable : = f (x)g(y), for some functions f (x) and g(y).
dx
dy
• Bernoulli equations : + P(x)y = Q(x), for some functions P(x) and Q(x).
dx
The solution of a first-order differential which contains an arbitrary constant is called the general
solution. This represents a family of solutions, parametrised by the constant. The value of the
arbitrary constant can be fixed by requiring that the solution passes by a given point. This then
gives a particular solution. Let us look at the way to solve these equations.

123
124 WEEK 19. FIRST-ORDER DIFFERENTIAL EQUATIONS

19.2 Direction integration


An equation of the type
dy
= f (x)
dx
can be solved directly by writing

dy = f (x) dx
and integrating on both sides to obtain
Z Z Z
dy = f (x) dx ⇒ y = f (x) dx +C.

Note that the integration constant is important. Let’s see this on an example.

Example 1. Find the function y(x) which satisfies the equation

dy
= 2x.
dx
We rewrite the equation as
Z Z
dy = 2x dx ⇒ dy = 2x dx,

therefore

y = x2 +C.
This is the general solution. If we impose that y = 1 when x = 0, we get 1 = 0 +C → C = 1,
and this leads to the particular solution y = x2 + 1.

19.3 Separable equations


To solve an equation of the type

dy
= f (x)g(y)
dx
we need to split the variables and integrate both sides separately

dy dy
Z Z
= f (x) dx ⇒ = f (x) dx.
g(y) g(y)
dy
Example 2. Solve (x + 1) = y given that y = 4 when x = 1. Separating the variables gives
dx
1 1 dy dx
Z Z
dy = dx ⇒ = .
y x+1 y x+1
Performing the integrations on both sides leads to the general solution

ln |y| = ln |x + 1| +C
This can be simplified by taking the exponential on both sides

eln |y| = eln |x+1|+C = eC eln |x+1| = C̃(x + 1)


19.4. BERNOULLI EQUATIONS : USING AN INTEGRATING FACTOR 125

and therefore

y = C̃(x + 1)
where C̃ is an arbitrary constant. Imposing the condition that y = 4 when x = 1, we get

4 = C̃(1 + 1) = 2C̃ → C̃ = 2.
The particular solution is then

y = 2(x + 1).

19.4 Bernoulli equations : Using an integrating factor


For first-order differential equations which can be written in the form

dy
+ P(x)y = Q(x)
dx
we use what is called an integrating factor. The method is the following

1. The integrating factor (denoted (I.F.) or µin the literature), is computed as


R
P(x) dx
(I.F.) = e

2. The general solution is obtained by using the equation


Z
(I.F.) y = (I.F.) Q(x) dx

You should add an integration constant only in the second step.

Example 3. Find the general solution of the equation

dy y
+ = 1.
dx x
We identify P(x) = 1/x and Q(x) = 1. The integrating factor is then given by
R R 1
(I.F.) = e P(x) dx
=e x dx
= eln x = x.
The general solution is found by using

Z
(I.F.)y = (I.F.) Q(x) dx
x2
Z Z
xy = x 1 dx = x dx = +C
2
x C
⇒y = +
2 x
126 WEEK 19. FIRST-ORDER DIFFERENTIAL EQUATIONS

19.5 Seminar sheet


dy
Question 1. Find the solution of = 3x2 − 4, given that when x = 0, y = 1.
dx

dy
Question 2. Find the solution of = x2 y, given that when x = 3, y = 1.
dx

Question 3. Using an integration factor, find the general solution of

dy
− 4y = e2x .
dx
19.6. EXERCISES 127

19.6 Exercises
Exercises 1. Separate variables to solve the following differential equations.

dy
1. = 3y2 (2x + 1), given that when x = 2, y = 2.
dx
dy
2. = 3xy, given that when x = 0, y = 4.
dx
dy
3. = 6x(y + 1), given that when x = 0, y = 3.
dx
dy y + 2
4. = , given that when x = 3, y = 7.
dx x
dy 2
5. = , given that when x = 1, y = π2 .
dx sin y
that when x = 1, y = 2.

6. Newton’s law of cooling states that the rate at which a body, at T oC above the temperature
of its surroundings, cools is proportional to T. A body at 68oC is placed in a room where
the temperature is 16oC. After 5 minutes, the body has cooled to 55◦C. What will be its
temperature after a further 5 minutes ?

Exercises 2. Solve the following differential equations


dy
1. + 5 = 6x, given that when x = 1, y = 2
dx
dy
2. x = 2, given that when x = 1, y = −2, for x > 0.
dx
dy
3. x = x2 + 2x − 3, given that when x = 1, y = 2, for x > 0.
dx
dy dy
4. x = 2+ , given that when x = 2, y = 1, for x > 1.
dx dx
Exercises 3. Solve the following equations by using an integrating factor

dy
1. − 2xy = 2x
dx
dy
2. x +x+y = 0
dx
dy
3. = y−x
dx
dy
4. + xy = x
dx
dy
5. + ay = ex , a 6= −1.
dx
dy
6. + y tan x = 1
dx
128 WEEK 19. FIRST-ORDER DIFFERENTIAL EQUATIONS

Answers 1.
−1
1. = 3x2 + 3x − 18.5
y
3 2
2. y = 4e 2 x
2
3. y = 4e3x − 1

4. y = 3x − 2

5. cos y = 2 − 2x

6. Use the differential equation dT


dt = k T , for some k. Solve the equation for T (t) and use
the data in the problem to find the values for k and the arbitrary constant coming from
the integration. You should obtain k = 15 ln(3/4) ≈ −0.058. The final answer should be
45.25oC, or 45.11o if you used a value of k rounded to 2 decimal places. Do not forget that
T represents temperature above the room temperature.

Answers 2.

1. y = 3x2 − 5x + 4

2. y = 2 ln x − 2
x2 1
3. y = + 2x − 3 ln x −
2 2
4. y = 2 ln |x − 1| + 1

Answers 3.
2
1. y = Cex − 1
C x
2. y = −
x 2
3. y = x + 1 + c ex
2 /2
4. y = Ce−x +1
ex
5. y = +C e−ax
a+1
6. y sec x = ln | sec x + tan x| +C ⇒ y = ln | sec x + tan x| cos x +C cos x
Week 20

Homogeneous second-order differential


equations

We consider second-order differential equations for y = y(x)

d2 y dy
a 2
+ b + cy = 0 (20.1)
dx dx
where a, b, c are constants. These equations are said to be homogeneous as they do not involve
non-zero forcing terms in the right-hand side.

20.1 The general solution


The general solution of equation (20.1) depends on two arbitrary constants and will generally have
the form
y = C1 em1 x +C2 em2 x .
The values for m1 and m2 are found by solving the associated auxiliary equation

am2 + bm + c = 0.

This is obtained by putting into the equation the seed solution y = emx . Indeed, differentiating
dy d2 y 2 mx and therefore equation (20.1) would give
gives dx = memx , dx 2 = m e

am2 emx + bmemx + cemx = 0 → (am2 + bm + c)emx = 0 → am2 + bm + c = 0.

129
130 WEEK 20. HOMOGENEOUS SECOND-ORDER DIFFERENTIAL EQUATIONS

Example 1. Solve the equation


d2 y dy
+ 3 + 2y = 0,
dx2 dx
dy
given that when x = 0, y = 5 and dx = −12.

This represented the simplest case, when the two roots of the auxiliary equation are real and
not equal. When both are real and equal, m1 = m2 = m, the general solution is given by

y = C1 emx +C2 xemx = (C1 +C2 x)emx .

For complex eigenvalues, m1 = α + jβ, m2 = α − jβ, we use Euler’s formula to write

eα+ jβ = eα e jβ = eα [cos β + j sin β] .

This implies that trigonometric functions will appear in the general solution. It can be shown that
it will be
y = C1 eαx cos (βx) +C2 eαx sin (βx) = eαx (C1 cos (βx) +C2 sin (βx)) .
To sum up, one uses the following table to get the general solution

Category Roots General solution


Real, distinct m1 , m2 y = C1 em1 x +C2 em2 x
Real, repeated m = m1 = m2 y = C1 emx +C2 xemx
Complex m1 = α + jβ, m2 = α − jβ eαx (C1 cos (βx) +C2 sin (βx))
20.2. SEMINAR SHEET 131

20.2 Seminar sheet


Question 1. Find the general solution of the equation

d2y dy
+ 3 + 2y = 0.
dx2 dx

Question 2. A body of mass m is attached to a spring of stiffness k > 0. Assuming no damping is


present, the displacement x is obtained by solving the following differential equation

d2x k
+ x = 0.
dt 2 m
r
k
Show that x = A cos (ωt) + B sin (ωt), where A and B are arbitrary constants and ω = .
m

Question 3. Consider a mechanical system which is governed by the initial value problem

y00 (t) + By0 (t) + y(t) = 0, y(0) = 0, y0 (0) = 1,

where t is time and B is a constant. Solve this IVP, keeping B arbitrary. Give a range on B
which ensures that the system is oscillating.
132 WEEK 20. HOMOGENEOUS SECOND-ORDER DIFFERENTIAL EQUATIONS

20.3 Exercises
Exercises 1. Solve the following differential equations.
d2 y dy dy
1. dx2
+ 17 dx + 72y = 0 given that when x = 0, y = 1 and dx = 1.
d2 y dy dy
2. dx2
− dx − 2y = 0 given that when x = 0, y = 0 and dx = 1.
d2 y dy
3. dx2
+ y = 0 given that when x = 0, y = 0 and dx = 1.
d2 y dy dy
4. dx2
− 4 dx + 4y = 0 given that when x = 0, y = 1 and dx = 0.
d2 y
5. dx2
+ 4y = 0 given that when x = 0, y = 1 and when x = π/4, y = 6.
d2 y dy dy
6. dx2
− 2 dx + 2y = 0 given that when x = 0, y = 2 and dx = 3.

Answers.

1. y = −9e−9x + 10e−8x .

2. y = 31 e2x − e−x .


3. y = sin x.

4. y = e2x (1 − 2x).

5. y = 6 sin(2x) + cos(2x).

6. y = ex (sin x + 2 cos x).


Week 21

Inhomogeneous second order equations

Building up from the results for homogeneous equations, we now construct the solution for the
inhomogeneous equation
d2 y dy
a 2 + b + cy = f (x),
dx dx
where f (x) is a non-zero forcing term.

21.1 The method of undetermined coefficients


The solution will be made up of two parts:

1. The complementary function (C.F. or yc ). This is the general solution of the corresponding
homogeneous equation,
d2 y dy
a 2 + b + cy = 0,
dx dx
obtained using the technique in the previous section.

2. The particular integral (P.I. or y p ). The particular integral is any solution of the inhomoge-
neous equation. It is assumed to have the same form as f (x) and will contain constants to
be determined, according to the following table. The constants in the particular integral are

f (x) yp
k yp = A
kx y p = Ax + B
kx2 y p = Ax2 + Bx +C
k sin (mx) y p = A sin(mx) + B cos(mx)
k cos (mx) y p = A sin(mx) + B cos(mx)
kemx y p = Aemx

found by substituting y p into the inhomogeneous equation and requiring that it is a solution.

The general solution is the obtained by adding these two solutions

y = Complementary function + Particular integral = yc + y p .

133
134 WEEK 21. INHOMOGENEOUS SECOND ORDER EQUATIONS

Example 1. Find the general solution of the differential equation

d2 y dy
2 − − 3y = e2x .
dx2 dx
21.1. THE METHOD OF UNDETERMINED COEFFICIENTS 135

Example 2. Find the general solution of the differential equation

d2 y dy
2
+ 6 + 5y = 10 cos 5x.
dx dx
136 WEEK 21. INHOMOGENEOUS SECOND ORDER EQUATIONS

21.2 Seminar sheet


Question 1. Find the general solution of the equation

d2 y dy
− 6 + 8y = x.
dx2 dx

Question 2. Find the solution of the following initial-value problem

d2 y dy
2
− 3 + 2y = sin x, y(0) = 0, y0 (0) = 1.
dx dx

Question 3. An undamped spring-mass system is subject to a force F cos (2t). The equation for
the displacement x is given by

d2x
m = −kx + F cos (2t), k > 0, k 6= 4m.
dt 2
Obtain the general formula giving the displacement x(t).
21.3. EXERCISES 137

21.3 Exercises
Exercises 1. Find the general solution of
d2 y dy
1. dx2
− dx − 6y = e2x .
d2 y dy
2. dx2
− 2 dx − 3y = 6.
d2 y dy
3. dx2
+ 3 dx + 2y = 10 cos(2x).
d2 y dy
4. dx2
− 6 dx + 10y = 20 − e2x .

Exercises 2. Find the solution of the following differential equations which satisfies the initial
condition
d2 y dy
1. dx2
+ 4 dx + 4y = 8 sin 2x, y(0) = 1, y0 (0) = 0.
d2 y dy
2. dx2
+ 4 dx + 3y = e−3x , y(0) = 1/2, y0 (0) = −2.
d2 y dy
3. dx2
+ 2 dx + 2y = 85 sin(3x), y(0) = 1/2, y0 (0) = −20.

Answers 1.

1. y = C1 e3x +C2 e−2x − 14 e2x .

2. y = C1 e3x +C2 e−x − 2.

3. y = C1 e−2x +C2 e−x − 21 cos(2x) + 32 sin(2x).

4. y = e3x (C1 cos x +C2 sin x) + 2 − 12 e2x .

Answers 2.

1. y = 2(1 + 2x)e−2x − cos(2x).

2. y = 21 (1 − x)e−3x .

3. y = (7 sin x + 6 cos x)e−x − 7 sin(3x) − 6 cos(3x).


138 WEEK 21. INHOMOGENEOUS SECOND ORDER EQUATIONS
Week 22

The wave equation and separation of


variables

The knowledge we gained about solving second-order differential equations can be used to solve
more complex problems in multiple dimensions. Let us consider the following partial differential
equation
∂2U 2
2∂ U
− c = 0. (22.1)
∂t 2 ∂x2
Equation (22.1) is called the wave equation. Here the coefficient c represents the propagation
speed of the wave and depends on the physical properties of the medium. For instance, the vibra-
tion of a string would depend on the density and elasticity of the material composing it. Let us
consider the case of an elastic string of lenght L with fixed ends. This is illustrated in Figure 22.1.

Figure 22.1: String attached at both ends.

This gives the following boundary conditions

U(t, 0) = 0, U(t, L) = 0. (22.2)

Here, we assume that c = 1 and that the string is of length π and we want to model its motion by
solving the partial differential equation (22.1). We therefore need to fix the initial ’profile’ of the
string and its initial speed. Let us assume that the string is at rest at t = 0, with an initial profile
corresponding to the sine function (Figure 22.2). This gives the following initial conditions

U(0, x) = sin x, Ut (0, x) = 0. (22.3)

139
140 WEEK 22. THE WAVE EQUATION AND SEPARATION OF VARIABLES

Figure 22.2: The initial state of the string.

22.1 The separation of variables


To find the general solution of (22.1), one supposes that the solution can be represented in the
separated form
U(t, x) = G(t)F(x). (22.4)
The partial derivatives of (22.4) are given by

∂2U d2G ∂2U d2F


= F(x), = G(t). (22.5)
∂t 2 dt 2 ∂x2 dx2
Substituting (22.5) into the wave equation (22.1) (with c = 1) gives

d2G d2F
F(x) − G(t) = 0. (22.6)
dt 2 dx2
This equation can be rewritten as

1 d2G 1 d2F
= . (22.7)
G(t) dt 2 F(x) dx2

Now, note that the left-hand side is a function only of t while the right-hand side is a function of
x: These can be equal if and only if they are constant, i.e.

1 d2G 1 d2F
= = α, α ∈ R, (22.8)
G(t) dt 2 F(x) dx2

where α is called the separation constant. This implies that F(x) and G(t) satisfy

1 d2G 1 d2F
= α, = α, (22.9)
G(t) dt 2 F(x) dx2

or equivalently
d2G d2F
− αG(t) = 0, − αF(x) = 0. (22.10)
dt 2 dx2
This procedures then reduces the problem to the solution of two second-order homogeneous dif-
ferent equations with constant coefficients. The corresponding auxilliary polynomial is given by

m2 − α = 0 →m=± α
22.2. APPLYING INITIAL AND BOUNDARY CONDITIONS 141

and m will be real if α > 0 and complex if α < 0. We know that in order to obtain an oscillatory
behaviour (which is to be expected for a vibrating string), m should be complex. Denoting α =
−n2 , we obtain p
m = ± −n2 = ± jn,
and the general solutions for the differential equations (22.10) are then given by

G(t) = A cos (nt) + B sin (nt), F(x) = C cos (nx) + D sin (nx), (22.11)

where A, B,C, D are constants. In view of (22.4), this implies that

U(t, x) = [A cos (nt) + B sin (nt)] [C cos (nx) + D sin (nx)] (22.12)

is a solution of the wave equation (22.1) for any value of n.


Remark 5. In general, α could be any number. If α > 0, then it is a simple calculation to show
that the corresponding solution would be
h √ √ ih √ √ i
U(t, x) = Ae αt + Be− αt Ce αx + De− αx .

Although it is a solution of the wave equation (22.1), it clearly does not allow to satisfy the initial
condition U(0, x) = sin x.
Remark 6. Formally, since the wave equation is a linear equation, any linear combination of
solutions will be a solution. Hence one could take the sum over all possible values of n to obtain

Ū(t, x) = ∑ [An cos (nt) + Bn sin (nt)] [Cn cos (nx) + Dn sin (nx)] , (22.13)
n=0

where the constants An , Bn ,Cn , Dn are to be determined from the initial and boundary conditions
through Fourier transform integral formulas. This process allows to solve more complex and
general initial and boundary conditions. This topic should be pursued in a more advanced module.

22.2 Applying initial and boundary conditions


We are now ready to determine the constants A, B,C, D such that solution (22.12) satisfies the
initial and boundary conditions given previously, namely

IC : U(0, x) = sin x, Ut (0, x) = 0, BC : U(t, 0) = 0, U(t, π) = 0. (22.14)

We look first at the initial conditions


 

U(0, x) = A cos (n0) +B sin (n0) [C cos (nx) + D sin (nx)]


| {z } | {z }
=1 =0
= AC cos (nx) + AD sin (nx) = sin x.

This readily implies that n = 1, A · D = 1 and C = 0. The solution then becomes

U(t, x) = [A cost + B sint] D sin x = cost sin x + BD sint sin x. (22.15)

To apply the second initial condition, take the partial derivative of (22.15) with respect to t and set
t = 0,
∂U  
= − sint sin x + BD cost sin x t=0 = BD = 0 → B = 0,
∂t t=0
142 WEEK 22. THE WAVE EQUATION AND SEPARATION OF VARIABLES

since D 6= 0. The result is then


U(t, x) = cost sin x. (22.16)
Let us finally verify that this solution satisfies the boundary conditions:

U(t, 0) = cost sin 0 = 0, U(t, π) = cost sin π = 0. (22.17)

Therefore U(t, x) = cost sin x is the solution of this problem and provides the motion of the string.
A plot of this function showing the oscillatory behaviour is given for different values of time in
Figure 22.3.

1
t =0
t =1
t = π/2
0.5
t =2
t =π
U(t, x)

−0.5

−1
0 0.5 1 1.5 2 2.5 3
x

Figure 22.3: Plot of solution (22.16) representing an oscillating string.


22.3. SEMINAR SHEET 143

22.3 Seminar sheet


Question 1. Assuming that U(t, x) = G(t)F(x) is a solution of the wave equation

∂2U 2
2∂ U
− c = 0,
∂t 2 ∂x2
with c arbitrary, obtain the ordinary differential equations (ODEs) satisfied by G(t) and
F(x). Obtain the general solution of these ODEs when the separation constant is negative
(i.e. α = −n2 ).

Question 2. Solve the wave equation


∂2U ∂2U
− 2 =0
∂t 2 ∂x
subject to the following initial condition

U(t, 0) = 0, U(t, π) = 0, U(0, x) = sin (2x), Ut (0, x) = 0.

Sketch the initial profile (t = 0) and the solution at t = π/4, π/2, 3π/4, π.
144 WEEK 22. THE WAVE EQUATION AND SEPARATION OF VARIABLES

22.4 Exercises
Exercise 1. Investigate the effect of having a non-zero initial speed for the string by

∂2U ∂2U
− 2 =0
∂t 2 ∂x
subject to the following initial condition

U(t, 0) = 0, U(t, π) = 0, U(0, x) = sin (x), Ut (0, x) = sin x.

Answer: U(t, x) = (cost + sint) sin x.

Exercise 2. Use Matlab (or software of your choice) to plot the solution obtained in Exercise 1 at
different times. The following code should work on Matlab and GNU Octave.
xx = 0 : 0 . 0 5 : p i ;
for t =0:0.5:2∗ pi ;
p l o t ( xx , ( c o s ( t ) + s i n ( t ) ) ∗ s i n ( xx ) )
h o l d on ;
end

Answer: You should obtain a graph similar to the following one.


Revision topics

First semester topics


• Weeks 4,5. Basic differentiation, product rule, quotient rule, chain rule.

• Week 6. Basic integration, integration by substitution.

• Weeks 7,8. Polar and exponential form, De Moivre’s theorem.

• Week 9. Parametric differentiation, implicit derivative, logarithmic derivative.

• Week 10. Matrices, basic operations, determinant.

• Week 11. Maxima and minima.

Second semester topics


• Week 13. Computation of Maclaurin series.

• Week 14. Partial derivatives, estimation of error.

• Week 15,16. Integration using substitutions, partial fractions and integration by parts. Ap-
plications of integrals.

• Week 17. Cramer’s rule and matrix inverse.

• Week 18. Vectors, basic operations, dot product, cross product.

• Week 19. First-order differential equations. Separable equations, integrating factor, initial
conditions.

• Weeks 20,21. Second-order ordinary differential equations with constant coefficients, com-
plementary function, particular integral, initial conditions.

• Week 22. The wave equation. Initial and boundary conditions.


146 WEEK 22. THE WAVE EQUATION AND SEPARATION OF VARIABLES
Mathematics Formula Sheet
Derivative Function Integral

dy
Z
y y dx
dx
0 k kx
xn+1
nxn−1 xn
n+1
− x12 1
x ln x
1 kx
k ekx ekx e
k
ax
ax ln a ax
ln a
1
ln x (log x) x ln x − x
x
1
loga x x(loga x − ln a)
x ln a
cos x sin x − cos x

− sin x cos x sin x

sec2 x tan x − ln(cos x)

sec x tan x sec x ln(sec x + tan x)

− csc2 x cot x ln(sin x)

2 sin x cos x sin2 x 1


4 (2x − sin(2x))

1
−2 cos x sin x cos2 x 4 (2x + sin(2x))

1 1 −1  x 
... tan
x2 + a2 a  a
1 1 x−a
... ln
x2 − a2 a x+a
1  √ 
... √ ln x + x2 + a2
x + a2
2

1  √ 
... √ ln x + x2 − a2
a2 − x 2
Rules for differentiation and integration
d dv du d du dv
Product rule: (uv) = u + v . Chain rule: (u(v(x)) = × .
dx dx dx dx dv dx
d  u  v du − u dv dv du
Z Z
Quotient rule: = dx 2 dx . Integration by parts: u dx = uv − v dx.
dx v v dx dx

Series
x2 00 x3
Maclaurin series: f (x) ≈ f (0) + x f 0 (0) + f (0) + f 000 (0) + . . .
2! 3!
x2 00 x3
Taylor series: f (x + h) ≈ f (h) + x f 0 (h) + f (h) + f 000 (h) + . . .
2! 3!

Numerical integration
Z b
h
Simpsons’s rule: f (x)dx = [( f0 + fn ) + 4( f1 + f3 + . . . + fn−1 ) + 2( f2 + f4 + . . . + fn−2 )]
a 3

Quadratic formula

−b ± b2 − 4ac
If ax2 + bx + c = 0, then x = .
2a

Euler’s equation
If θ is in radians, then e jθ = cos θ + j sin θ.

Trigonometric identities
sin (A ± B) = sin A cos B ± cos A sin B sin (2A) = 2 sin A cos A
cos (A ± B) = cos A cos B ∓ sin A sin B cos (2A) = cos2 A − sin2 A = 1 − 2 sin2 A = 2 cos2 A − 1
tan A ± tan B
tan(A ± B) = sin A cos B = 12 (sin(A + B) + sin(A − B))
1 ∓ tan A tan B
cos2 A + sin2 A = 1 cos A cos B = 12 (cos(A + B) + cos(A − B))
1 + tan2 A = sec2 A sin A sin B = 12 (cos (A − B) − cos (A + B))
A+B A−B
sin A − sin B = 2 cos A+B sin A−B
   
sin A + sin B = 2 sin 2 cos 2 2 2
A+B
cos A−B cos A − cos B = −2 sin A+B sin A−B
   
cos A + cos B = 2 cos 2 2 2 2

Second-order constant coefficient differential equations


If m1 , m2 are the roots of the associated polynomial am2 + bm + c = 0, the general solution is
If m1 6= m2 y = C1 em1 x +C2 em2 x
If m1 = m2 y = C1 em1 x +C2 xem1 x
If m = α ± jβ y = eαx [C1 cos(βx) +C2 sin (βx)]