MATH1012 Mathematics for Civil and Environmental Engineering Prof. Janne Ruostekoski School of Mathematics University of Southampton

Similar documents
Math 234. What you should know on day one. August 28, You should be able to use general principles like. x = cos t, y = sin t, 0 t π.

Semester University of Sheffield. School of Mathematics and Statistics

Ch 4 Differentiation

PURE MATHEMATICS AM 27

1 Geometry of R Conic Sections Parametric Equations More Parametric Equations Polar Coordinates...

Math 302 Outcome Statements Winter 2013

MATH 2433 Homework 1

(arrows denote positive direction)

Notes for Advanced Level Further Mathematics. (iii) =1, hence are parametric

PURE MATHEMATICS AM 27

OR MSc Maths Revision Course

Phys 201. Matrices and Determinants

Dr. Allen Back. Sep. 8, 2014

MTH4101 CALCULUS II REVISION NOTES. 1. COMPLEX NUMBERS (Thomas Appendix 7 + lecture notes) ax 2 + bx + c = 0. x = b ± b 2 4ac 2a. i = 1.

Mathematics for Graphics and Vision

Basics of Calculus and Algebra

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

Study guide for Exam 1. by William H. Meeks III October 26, 2012

MA Spring 2013 Lecture Topics

Pure Further Mathematics 3. Revision Notes

Week beginning Videos Page

M. Matrices and Linear Algebra

CP3 REVISION LECTURES VECTORS AND MATRICES Lecture 1. Prof. N. Harnew University of Oxford TT 2013

MATHEMATICS. IMPORTANT FORMULAE AND CONCEPTS for. Final Revision CLASS XII CHAPTER WISE CONCEPTS, FORMULAS FOR QUICK REVISION.

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

1.1 Single Variable Calculus versus Multivariable Calculus Rectangular Coordinate Systems... 4

Coordinate systems and vectors in three spatial dimensions

= 1 and 2 1. T =, and so det A b d

Elementary maths for GMT

Chapter 2: Vector Geometry

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Mathematics Revision Questions for the University of Bristol School of Physics

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

Chapter 2: Matrices and Linear Systems

3. On the grid below, sketch and label graphs of the following functions: y = sin x, y = cos x, and y = sin(x π/2). π/2 π 3π/2 2π 5π/2

Extra Problems for Math 2050 Linear Algebra I

Study Guide for Final Exam

Contents. 1 Vectors, Lines and Planes 1. 2 Gaussian Elimination Matrices Vector Spaces and Subspaces 124

Linear Algebra March 16, 2019

Vectors and Fields. Vectors versus scalars

3 Applications of partial differentiation

1 Geometry of R Conic Sections Parametric Equations More Parametric Equations Polar Coordinates...

Distance Formula in 3-D Given any two points P 1 (x 1, y 1, z 1 ) and P 2 (x 2, y 2, z 2 ) the distance between them is ( ) ( ) ( )

Sec. 1.1: Basics of Vectors

1 Vectors and the Scalar Product

Curriculum Map for Mathematics HL (DP1)

1. Vectors and Matrices

Dr. Allen Back. Sep. 10, 2014

1.1 Bound and Free Vectors. 1.2 Vector Operations

(1) Recap of Differential Calculus and Integral Calculus (2) Preview of Calculus in three dimensional space (3) Tools for Calculus 3

REVIEW - Vectors. Vectors. Vector Algebra. Multiplication by a scalar

Sometimes the domains X and Z will be the same, so this might be written:

Core A-level mathematics reproduced from the QCA s Subject criteria for Mathematics document

Examples and MatLab. Vector and Matrix Material. Matrix Addition R = A + B. Matrix Equality A = B. Matrix Multiplication R = A * B.

Higher Mathematics Course Notes

Vectors. J.R. Wilson. September 27, 2018

Course Notes Math 275 Boise State University. Shari Ultman

4 Partial Differentiation

Some Notes on Linear Algebra

3.4 Conic sections. Such type of curves are called conics, because they arise from different slices through a cone

Midterm 1 Review. Distance = (x 1 x 0 ) 2 + (y 1 y 0 ) 2.

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Review for the Final Exam

Week Topics of study Home/Independent Learning Assessment (If in addition to homework) 7 th September 2015

Math 23b Practice Final Summer 2011

SYLLABUS FOR ENTRANCE EXAMINATION NANYANG TECHNOLOGICAL UNIVERSITY FOR INTERNATIONAL STUDENTS A-LEVEL MATHEMATICS

SANDERSON HIGH SCHOOL AP CALCULUS AB/BC SUMMER REVIEW PACKET

Course MA2C02, Hilary Term 2010 Section 4: Vectors and Quaternions

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Chapter 7: Techniques of Integration

Notes on multivariable calculus

Chapter 8: Polar Coordinates and Vectors

Matrices. Chapter Definitions and Notations

4.1 Distance and Length

MATHEMATICS. Higher 2 (Syllabus 9740)

Further Mathematics SAMPLE. Marking Scheme

Chapter 4 Notes, Calculus I with Precalculus 3e Larson/Edwards

DuVal High School Summer Review Packet AP Calculus

Contravariant and Covariant as Transforms

2.20 Fall 2018 Math Review

MATHEMATICS: SPECIALIST UNITS 3C AND 3D FORMULA SHEET 2015

DIFFERENTIATION RULES

(x 3)(x + 5) = (x 3)(x 1) = x + 5. sin 2 x e ax bx 1 = 1 2. lim

UNDERSTANDING ENGINEERING MATHEMATICS

CALCULUS PROBLEMS Courtesy of Prof. Julia Yeomans. Michaelmas Term

Calculus II Practice Test 1 Problems: , 6.5, Page 1 of 10

Senior Secondary Australian Curriculum

11.4 Dot Product Contemporary Calculus 1

STEP Support Programme. Pure STEP 1 Questions

Vectors. The standard geometric definition of vector is as something which has direction and magnitude but not position.

The Cross Product. In this section, we will learn about: Cross products of vectors and their applications.

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.)

MATH 250 TOPIC 13 INTEGRATION. 13B. Constant, Sum, and Difference Rules

Harbor Creek School District

2.2 The derivative as a Function

a11 a A = : a 21 a 22

Exercises for Multivariable Differential Calculus XM521

FINAL EXAM STUDY GUIDE

Culminating Review for Vectors

Rotational motion of a rigid body spinning around a rotational axis ˆn;

Transcription:

MATH02 Mathematics for Civil and Environmental Engineering 20 Prof. Janne Ruostekoski School of Mathematics University of Southampton September 25, 20

2 CONTENTS Contents Matrices. Why matrices?..................................2 What are matrices?............................... 2.3 Operations on matrices?............................ 3.3. Transposition.............................. 3.3.2 Sum of two matrices.......................... 4.3.3 Product of a matrix and a number.................. 4.3.4 Product of two matrices........................ 5.4 Multiplication properties of matrices..................... 7.5 More about multiplication........................... 8.6 Determinants.................................. 9.6. Determinant of a 2x2 matrix...................... 9.6.2 Determinant of a 3x3 matrix...................... 0.6.3 Determinant of a 4x4 matrix...................... 3.7 Properties of determinants........................... 3.8 Inverse matrices................................. 6.8. The inverse of a 2x2 matrix...................... 6 2 Vectors 8 2. Vectors and Scalars............................... 8 2.2 Symbols..................................... 8 2.3 Operations on vectors.............................. 9 2.3. Equality................................. 9

CONTENTS 3 2.3.2 Vector Addition............................. 9 2.3.3 Scalar Multiplication (=multiplication by a number)........ 20 2.4 Components of a Vector............................ 2 2.5 Standard Basis Vectors............................. 22 2.6 Components and Operations.......................... 23 2.6. Length in Component Form...................... 23 2.6.2 Sum in Component Form........................ 24 2.6.3 Scalar Multiplication.......................... 25 2.7 Dot Product of Two Vectors.......................... 25 2.7. Definition of Dot Product....................... 25 2.7.2 Properties of Dot Product....................... 26 2.7.3 Matrix notation............................. 27 2.7.4 Work................................... 28 2.7.5 Projections............................... 28 2.8 Vectors in more than 2 dimensions...................... 29 2.8. Three dimensions............................ 29 2.8.2 Higher dimensions........................... 30 2.9 Cross and Triple Product............................ 3 2.9. Triple vector product.......................... 33 2.9.2 Triple scalar product.......................... 33 2.9.3 Cross Products and Mechanics..................... 35 2.0 Planes and lines in 3D............................. 36 2.0. Lines in 3D............................... 36 2.0.2 Planes in 3D.............................. 38

4 CONTENTS 3 Derivatives 42 3. Rules for differentiation............................ 44 3.2 Higher derivatives............................... 48 3.3 Newton-Raphson................................ 49 3.4 Functions of Two Variables.......................... 52 3.4. Partial Derivatives........................... 54 3.5 Derivative of a vector.............................. 58 3.5. Derivative of a Dot Product...................... 6 4 Integration Part 62 4. Properties of the Integral........................... 63 4.2 The Fundamental Theorem of Calculus................... 64 4.3 Indefinite Integrals............................... 64 4.4 Some important integrals........................... 65 4.5 Simple examples................................ 65 4.6 Integration using simple substitutions.................... 66 4.7 Integration by parts.............................. 7 4.8 Numerical Integration............................. 73 5 Complex Numbers 78 5. Introduction................................... 78 5.2 Powers of j................................... 79 5.3 Argand Diagrams and Polar Form of A Complex Number.......... 80 5.4 Modulus and Argument of a Complex Number............... 8 5.5 Complex Conjugates.............................. 83

CONTENTS 5 5.6 Addition and subtraction of complex numbers................ 84 5.7 Multiplication of Complex Numbers..................... 86 5.8 Division of Complex Numbers......................... 88 5.9 Further examples on complex number algebra................ 90 5.0 Complex Exponentials and Trigonometric Functions............ 9 5. Further examples of complex numbers in polar form............ 93 5.2 Multiplying Complex Numbers in Exponential Form............ 95 5.3 Dividing complex numbers in exponential form............... 95 5.4 Calculating Powers............................... 96 5.5 de Moivre s Theorem............................. 97 5.6 Solving Equations............................... 97 6 Differential Equations 0 6. Types of Ordinary Differential Equation................... 0 6.2 Simple Differential Equations......................... 02 6.3 Separation of Variables............................ 04 6.4 Second Order Linear Differential Equations.................. 07 6.4. Introduction............................... 07 6.4.2 Homogeneous case f = 0,....................... 08 6.5 Boundary and Initial Conditions........................ 2 7 Functions 4 7. Specifying a function.............................. 4 7.2 Specifying the domain............................. 6 7.3 Algebra of functions.............................. 6

6 CONTENTS 7.4 Multiplication and division.......................... 7 7.5 Composition of functions........................... 7 7.6 Graphs of functions.............................. 8 7.7 One-to-one Functions............................. 20 7.8 Inverse functions................................ 22 7.9 Graphs of inverse functions.......................... 24 7.0 Even and Odd functions............................ 25 7. Periodic functions............................... 28 7.2 Trigonometric functions............................ 28 7.3 Inverse trigonometric functions........................ 29 7.4 Differentiating inverse trigonometric functions................ 32 7.5 The exponential and related functions..................... 34 7.5. Exponential Function......................... 34 7.5.2 Properties of the log and exponential functions........... 36 7.5.3 Derivative of y = a x.......................... 37 7.5.4 Hyperbolic Functions......................... 37 7.5.5 Derivatives............................... 42 7.5.6 Inverse hyperbolic functions...................... 43 7.5.7 Derivatives of Inverse hyperbolic functions.............. 45 8 Differentiation 47 8. Critical points and applications to graph sketching............. 47 8.2 Curve sketching................................ 5 8.3 Parametric, implicit and logarithmic differentiation............. 56 8.3. Parametric differentiation....................... 56

CONTENTS 7 8.3.2 Implicit differentiation......................... 57 8.3.3 Logarithmic differentiation....................... 58 8.4 Maclaurin s series and Taylor s series..................... 59 9 Integration Part 2 62 9. Integration using harder substitutions.................... 62 9.2 Applications of integration.......................... 67 9.2. The area between a curve and the x-axis............... 67 9.2.2 Volumes of Revolution......................... 68 9.2.3 Centre of gravity of solid of revolution................ 70 9.2.4 Mean value............................... 7 9.2.5 Arc length: Length of a curve..................... 7 9.2.6 Area of surface of revolution...................... 73 0 Integration Part 3 74 0. Integration of rational functions....................... 74 0.2 Integration using partial fractions....................... 78 0.3 Improper Integration.............................. 79 Integration Part 4: Multiple Integrals 83. Introduction.................................. 83.2 Evaluation of two dimensional integrals.................... 85.3 Change of coordinates in two dimensional integrals............. 89.3. Introduction............................... 89.3.2 Polar coordinates............................ 90.4 Evaluation of three dimensional integrals................... 92

CONTENTS.5 Applications of integration revisited...................... 93.5. Centroid................................. 93.5.2 Second moment of area......................... 96.5.3 Parallel axis theorem.......................... 97.5.4 Moment of inertia............................ 97.6 Change of coordinates in three dimensional integrals............. 98.6. Cylindrical coordinates......................... 98

Matrices. Why matrices? Sometimes it would be useful to consider rectangular arrays of numbers as a single entity. Consider for example the following equations. 2x 3y =, 2x 3y = 4 4x + 5y = 3, 4x + 5y = The coefficients are the same and the only part that changes is the right-hand side. In a sense we are dealing with only one equation identified by the array of the four coefficients: ( 2 ) 3 4 5 Another example is given by the rotation of a Cartesian coordinatesystem. If we rotate a reference frame by an angle θ, the new coordinates (x, y ) are related to the old ones (x, y) by: x = x cos(φ) + y sin(φ), y = x sin(φ) + y cos(φ). y y y P x y x phi x x For any pair of points (x, y) we can apply this formula to obtain the new coordinates (x, y ). The essential four coefficients can be written in a rectangular block. ( ) cos θ sin θ sin θ cos θ

2 MATRICES.2 What are matrices? An m n matrix A is a rectangular array of mn numbers arranged in m rows and n columns (note the order!). If a ij represents the number (element) in the i th row and j th column, then a a 2 a 3... a n a 2 a 22 a 23... a 2n A =.... a m a m2 a m3... a mn Shorthand notation: A = (a ij ) i m rows, j n columns Examples A = B = ( 4 5 a b c d ) is a 2 2 square matrix is a 4 matrix. It is also a vector and is called a column vector C = ( 3 5 33 00) is a 4 matrix. It is also a vector and is called a row vector D = 7 8 9 0 2 is a 3 2 matrix An extremely important matrix is the square identity matrix I n. 0 0... 0 0 0... 0 I n = 0 0... 0 is a n n square matrix....... 0 0 0... Examples I 2 = ( 0 0 ), I 3 = 0 0 0 0 0 0

.3 Operations on matrices? 3 A matrix can be considered as a group of rows or column vectors. Example : F = ( 2 4 2 3 May be written as 2 row vectors or 3 column vectors ( 2 ), ( 4 2 3 ), or ( 4 ) ), ( 2 2 ), ( 3 ) Equality Two matrices A and B are equal if and only if (i) they have the same order, and (ii) corresponding elements in both matrices are equal (i.e., a ij = b ij for all i and j )..3 Operations on matrices? What sort of operations can be performed on matrices?.3. Transposition The transpose of an m n matrix A is an n m matrix, denoted by A T, whose rows are the columns of A. Example : A = B = ( 2 3 4 5 6 ( 2 2 ), A T = ), B T = 4 2 5 3 6 ( 2 2 Note: B = B T, i.e., b ij = b ji since B is a symmetric matrix. (Here B must be a square matrix.) Definition: A is skew-symmetric if A T = A (again A must be square). )

4 MATRICES For A we may also write its transpose, A T, as (A T ) ij = (A) ji. The above states that the ijth element of A T = jith element of A Example: (A T ) T =A, i.e., transpose of the transpose is the original matrix..3.2 Sum of two matrices Only matrices which have the same number of rows and columns can be summed. For examples it s possible to sum a 5 3 matrix with another 5 3 matrix, but not with a 4 3 one. The sum of two m n matrices A = (a ij ) and B = (b ij ) is a m n matrix C whose elements c ij are given by: c ij = a ij + b ij Example : A = ( 2 3 4 5 6 ) ( ) 3, B = 0 4 3 ( 2 + 3 3 C = A + B = 4 + 0 5 + 4 6 + 3 It is easy to see from the above definition that (i) A + B = B + A, both 2 3 matrices so we can add them ) = (ii) (A + B) + C = A + (B + C). These properties show that matrices can be added in any order. ( 0 5 2 4 9 9 ).3.3 Product of a matrix and a number Let t be a real number and A an m n matrix. Their product is an m n matrix B obtained by multiplying each element of A by t. b ij = ta ij

.3 Operations on matrices? 5 Example : So that B = 4A = A = ( 2 3 4 5 6 ( 4. 4.2 4.3 4.4 4.5 4.6 ), t = 4 ) = ( 4 8 2 6 20 24 ).3.4 Product of two matrices If A = (a ij ) is an m n matrix and B = (b ij ) is an n p matrix, then their product AB is the m p matrix C = (c ij ) with elements given by c ij = n a ik b kj k= That is c ij is the dot product of the i th row of A and the j th column of B. Note: If A is m n and B is p q then the matrix product AB exists if and only if n = p, Example : The product of a 2 3 matrix and a 3 4 matrix is a 2 4 matrix: ( ) 2 0 ( 0 3 0 3 c c = 2 c 3 c 4 2 c 0 4 5 2 c 22 c 23 c 24 Using the above formula one finds for example: c =.2 + 0.0 + 3. = 5 c 2 =. + 0. + 3.0 =. =. c 23 = 2. +.3 +.4 = c 24 = 2.0 +. +.5 = 5 )

6 MATRICES So that C = ( 5 3 5 3 4 ) Properties. The product of two matrices can be zero even though neither matrix is zero: ( ) ( ) ( ) 0 0 0 0 =. 0 0 0 0 0 0 This is in stark contrast with the product of two numbers which is zero if and only if at least one of the two numbers is zero. 2. The identity matrix, I, is the equivalent of the number : the product of a m n matrix A with the n n identity is equal to the matrix A (hence its name!): A I = I A = A. Example : ( 2 3 4 ) ( 0 0 ) = Similarly ( 0 0 (. + 2.0.0 + 2. 3. + 4.0 3.4 + 4. ) ( 2 3 4 ) = ( 2 3 4 ) = ) ( 2 3 4 ) 3. The matrix multiplication is not commutative. First of all, the existence of the product A B does not imply the existence of the product in reversed order, B A. Moreover, even if both exist they are generally different. Example : ( 2 3 0 ( ) ( ) ( 2 3 0 ) = ) = ( 3 3 3 ( 2 2 4 2 ), ). If the orders of the matrices are incompatible, you cannot even multiply them together.

.4 Multiplication properties of matrices 7 Example 2: A = 2 3 4 5 6 7 8 9, B = 0 On the other hand: AB = 3 4 9 7 5 0 BA = Not possible since B is 3 2 and A is 3 3 4. The product of two matrices can be used to represent linear systems of equations. Example : Hence A = Ax = ( 2 3 4 5 ( 2 3 4 5 So that Ax = c is equivalent to ) ( x, x = y ) ( x y ) = 2x 3y = 4x + 5y = 3 ) (, c = 3 ( 2x 3y 4x + 5y This example shows how it is possible to summarise systems of equations. This example is just the right-hand side of the system of equations we wrote down in section 2.. We can write the entire system as: ) ) Ax = c.4 Multiplication properties of matrices ) Distribution law A(B + C) = AB + AC

8 MATRICES (A + B)C = AC + BC 2) Associativity A(BC) = (AB)C 3) Transpose of a product (AB) T = B T A T So the order of multiplication is reversed when one takes the transpose..5 More about multiplication The non-commutativity of matrices AB BA indicates that we can also have a situation where AB = 0 and BA 0. As was also shown in previous examples, AB = 0 does NOT imply that A = 0 or B = 0, and both A and B can have all their elements non-zero. Example : Determine AB and BA for A = AB = ( 0 0 0 0 ( 2 2 ) and B = ( ) (, BA = ) ) It is also important to note that matrices cannot be cancelled in the same way as numbers. Suppose that AC = BC but we know that C 0. The equation can be rearranged as AC BC = (A B)C = 0, but we have seen above that this does NOT usually imply that A B = 0, i.e. A = B. Thus we cannot, in general, cancel the matrix C from both sides of the original equation AC = BC, as one might have hoped. If the matrices A and B are not square matrices, the products AB and BA may both exist, but AB and BA represent matrices of different order. Example 2:

.6 Determinants 9 If A = ( 0 2 2 ) and B = 0 2 2 evaluate AB and BA. Here the matrices A and B have orders 2 3 and 3 2 respectively, and so both products exist. ( ) 0 ( ) 0 AB = 3 2 = 2 2 3 5 2 2 BA = 0 2 2 ( 0 2 2 ) = 0 3 6 2 2..6 Determinants The determinant is only defined for a square matrix. It is a number that gives important information on the nature of the matrix. For example, if we write a system of simultaneous linear equations as the matrix equation Ax = c, this has one unique solution for the unknown elements of x only if the determinant of A is different from zero..6. Determinant of a 2x2 matrix The determinant of a square matrix is a number that depend on the elements of the matrix. The determinant of a 2 2 matrix is given by ( ) ( ) a b a b A =, det(a) = det = c d c d a b c d = ad bc Example : 2 3 4 =.4 2.3 = 2 Example 2:

0 MATRICES 2 2 =.2.2 = 0 Example 3: 7 9 8 2 = 7.2 9.8 = 38 The determinant of any other square matrix can be obtained using a row or column expansion..6.2 Determinant of a 3x3 matrix For a 3 3 matrix the situation is more complicated. The algorithm is as follows. Let the matrix be: a b c d e f g h i ) Write down the following checkboard pattern (a 3 3 grid of alternate plus and minus signs): + + + + + 2) Choose one row (preferably one with a lot of zeros in). The first row in this exampe 3) Build a 2 2 matrix (called a minor) by removing from the 3 3 matrix the row and the column in which the selected element lies. Deleting the first row and column: e f h i ( e f gives h i ) the minor of a

.6 Determinants 4) Evaluate the determinant of this 2 2 matrix and multiply it by the the appropriate sign of the checkboard pattern. This is called the cofactor ( ) e f + det = ei hf h i 5) Multiply the cofactor by the original element +a(ei hf) 6)Chose the second element of the row chosen in ). b 7) Build a 2 2 matrix by removing from the 3 3 matrix the row and the column in which this second selected element lies. Deleting the first row and second column: ( ) d f d f gives the minor of b g i g i 8) Evaluate this 2 2 determinant and multiply it by the sign on the chequerboard to obtain the cofactor. ( ) d f det = (di gf) g i 9) Multiply this by the element chosen b(di gf) 0) Repeat the same procedure for the third element of the row chosen in ). Deleting the first row and third column ( ) d e d e gives the minor of c g h g h ( d e + det f g ) = +(dh eg) gives the cofactor +c(dh eg) gives the element times the cofactor

2 MATRICES ) The determinant of the original 3 3 matrix is the sum of 5), 9) and 0) a b c det d e f = a e f h i b d f g i + c d e g h g h i = a(ei hf) b(di gf) + c(dh eg) Example : Expand in terms of the first row: 4 2 3 0 = 0 2 2 3 2 3 4 3 0 2 3 + ( 2) 3 2 2 = (.( 3) 0.2) 4(( 3).( 3) 0.2) 2(( 3).2.2) = 3 36 + 6 = 23 Remark It is possible to evaluate the determinant by expanding about any row or any column. Example 2: Expand in terms of the second row: 4 2 3 0 = ( 3) 4 2 2 2 3 2 3 + 2 2 3 0 4 2 2 = 3(4.( 3) 2.( 2)) + (.( 3) ( 2).2) 0(.2 4.2) = 24 + 0 = 23 Example 3: Expand in terms of the third column: 4 2 3 0 = +( 2) 3 2 2 3 2 2 0 4 2 2 + ( 3) 4 3 = 2(( 3).2.2) 0(.2 4.2) 3(. 4.( 3)) = 6 0 39 = 23

.7 Properties of determinants 3 Remark The determinant of a n n matrix is evaluated in exactly the same way as the determinant of a 3 3 matrix. You must select one row and divide the matrix into n matrices of dimension (n ) (n ) and so on..6.3 Determinant of a 4x4 matrix Once the 3 3 algorithm has been understood, it can be generalised easily to any size of square matrix, e.g., a 4 4. We select one row and we expand the determinants by the minors of that row, paying attention of a checkboard sign pattern. For a 4 4 matrix, the minors will now be 3 3 determinants. In general the determinant of an n n matrix is calculated by expanding in an appropriately signed series of the chosen-row elements multiplied by their (n ) (n ) determinant minors. Example : We expand in terms of the thrid row (since it contains two zeros) 2 0 0 3 0 0 2 0 = +3 0 0 0 ( = 3 0 ( 2 2 0 0 0 0 0 = 3(( )) 2(( 2 2)) = 6 + 8 = 2 2 0 0 + 0 2 0 0 ) + 0 ) + 0 0 2 2 0 0.7 Properties of determinants There are several properties of determinants which can shorten their calculation:

4 MATRICES )If two rows (or columns) of a determinant are interchanged, the determinant changes sign 0 2 = 2 swap rows 2 0 = 2 swap columns 0 2 = 2 2)If any two rows (or columns) or a determinant are equal, the determinant is zero. = = 0 since the st and 3rd rows are indentical. 3 2 5 4 7 3 0 3 7 = 0 3) If each element of a row (or column) is multiplied by a number k, then the determinant is multiplied by k. 0 2 = 2, multiplying 2nd row by k gives 0 k 2k = 2k 0 2 = 2, multiplying both rows by k gives k 0 k 2k = 2k 2 4) If a scalar multiple of any row (or a column) is added to any other row (or column), then the determinant is unchanged. 5)If one row (or column) can be formed from adding together multiples of the other rows (a linear combination), the determinant is zero: 2 2 4 = 0 Since 2nd row = 2 x st row. 2 3 0 5 9 4 Since 3rd row = 2 x st row + x first row = 0.

.7 Properties of determinants 5 6)The determinants of A and A T are the same. A = ( 5 2 7 det A = 9, det A T = 9 = det A. ) ( 5 7, A T = 2 ) 7) If A and B are two matrices, then det (AB) = det (A) det (B). A = ( 5 2 7 ) ( 0, B = 2 ) ( 5 2, AB = 7 ) ( 0 2 ) = ( 2 5 ) det A = 9, det B =, det(ab) = 9 = det(a) det(b). 8) If all the elements of a row (or column) are zero, then the determinant is zero. 2 3 0 0 0 4 5 6 = 0 2 3 5 6 + 0 3 4 6 0 2 4 5 = 0 9) det (A + B) det(a) + det(b) Properties 4) and 7) are frequently used to simplify the determinants before evaluating them. Let us consider a simple example which illustrates the use of some of the above properties. Example : Evaluate 0 0 20 2 3 4 5 3. Clearly we could evaluate the determinant directly, without too much effort, but here we use the above properties to simplify the matrix so that there are less cofactors to calculate. There is a common factor in the first row, so using property 3)

6 MATRICES 0 0 20 2 3 4 5 3 = 0 2 2 3 4 5 3. Property 4) can be used to produce more zeros in the first row. Making new second and third columns by subtracting (col.) from col.2 and subtracting 2 (col.) from col.3 respectively we deduce that 2 0 2 3 4 5 3 = 0 0 0 2 0 5 4 7. If we expand by the first row there is now only one non-zero element there and hence only one cofactor to evaluate (you could equally well use the third column and its one non-zero element try this and compare the results). Hence 0 0 { ( ) } 0 2 0 5 4 7 = 0 ( ) + 0 4 7 + 0 + 0 = 0 {( 7 0)} = 70. The above example shows the manipulations necessary in order to reduce the number of cofactors to be calculated, but in this case the overall workload is probably higher than calculating the determinant directly. In some situations, however, particularly when letters are involved or the matrix is larger, the simplifications can be useful..8 Inverse matrices Suppose you have two (square) matrices A and B. If AB = I (or BA = I) where I is the identity matrix, then B is said to be the inverse of A. We denote this inverse by A. In this sense finding the inverse is the operation analogous to the division of matrices..8. The inverse of a 2x2 matrix Given a 2 2 matrix A, The inverse is ( ) a b A = c d A = det A ( d ) b c a

.8 Inverse matrices 7 Since A.A = det A ( d b c a ) ( a b c d ) = ( da bc db bd det A ( c)a + a.c ( c).b + a.d ) = ( 0 0 ) A similar calculation shows we also have A.A = I. Importnat note: For the inverse to be defined we need det A 0. Example : A = ( 2 0 2 Checking the answer we find: ( 2 AA = 0 2 ), A = ( 2 2 2 0 ) ( 0 /2 ) = ) = ( 0 0 ( 0 /2 ) = I ) Example 2: A = ( 2 0 0 ), det A = 0 so that A is not defined

8 2 VECTORS 2 Vectors 2. Vectors and Scalars Some quantities, like temperature (and pressure) are identified by their magnitude: they are called scalar quantities, i.e., they are described by numbers: Scalar = number (real or complex). Other quantities, like wind velocity are identified by both magnitude (size or length) and direction. Such quantities are represented geometrically by arrows. Vector = number (its size) and direction. 2.2 Symbols B A The vector that joins point A with point B is indicated by Another, more common symbol is an underlined character v Another symbol is v AB In typed texts this is usually represented as a boldface character, v. The magnitude (modulus) of a vector v is is the length of the arrow and is denoted by the symbol v, mod(v) or AB

2.3 Operations on vectors 9 2.3 Operations on vectors We can add two numbers, we can multiply them. What can we do with vectors? 2.3. Equality Two vectors are equal if they have the same length and the same direction. Example : 2.3.2 Vector Addition To obtain the sum of two vectors u and v draw a parallelogram that has sides u and v. The sum u + v is the vector that joins the tail of u with the vertex of v. Example : u v u+v u v Example 2:

20 2 VECTORS v v u+v u u 2.3.3 Scalar Multiplication (=multiplication by a number) If v is a vector and t is a real number (=scalar) then the scalar multiple tv is a vector with () magnitude t times that of v (2) the same direction as v if t > 0 (3) the opposite direction to v if t < 0 (4) zero length and no direction if t = 0. In the last case we denote it by the zero vector, 0. Example :

2.4 Components of a Vector 2 2v v v 2.4 Components of a Vector The graphical representation of a vector with an arrow can be cumbersome. In order to operate on vectors it is more convenient to develop an alternative notation that only uses numbers. Consider (for the moment) plane vectors, i.e., vectors which lie in a plane. We can introduce a Cartesian coordinate system into the plane and talk of the x and y components of the vector. Example : B (4,3) AB A (,) The vector that joins A(,) with B(4,3) has x-component: 4 = 3

22 2 VECTORS and y-component: 3 = 2 Example 2: A (3,3) v B (,0) The vector v joins (3,3) with (-,0) and has x-component: 3 = 4 and y-component: 0 3 = 3 We indicate the vector w with x-component a and y-component b with the symbol: w = (a, b) 2.5 Standard Basis Vectors In the Cartesian plane there are two vectors that are very important The vector i from the origin to (,0). The vector j from the origin to (0,).

2.6 Components and Operations 23 y (0,) j i (,0) x They are called the standard basis vectors in the plane. If v is a vector of components x and y, we have v = (x, y), but it can also be expressed as: y 3i+2j 2j 3i x We say that we have written v as a linear combination of the standard basis vectors. 2.6 Components and Operations Once we have the components of a vector, we can easily evaluate vector operations. 2.6. Length in Component Form This is a direct application of Pythagoras theorem

24 2 VECTORS Example : y ai+bj bj ai x Definition:A vector of length is called a unit vector and is denoted by ˆv or ˆ v. Given a vector v, the unit vector in the direction of v is ˆv = v v 2.6.2 Sum in Component Form Suppose u = (u, u 2 ) and v = (v, v 2 ) Then the sum of u and v has components: u + v = (u i + u 2 j) + (v i + v 2 j) = (u + v )i + (u 2 + v 2 )j So that u + v has components (u + v, u 2 + v 2 ) y u+v v u x

2.7 Dot Product of Two Vectors 25 2.6.3 Scalar Multiplication Suppose u = (u, u 2 ). The scalar multiplication tu has components: u = (u i + u 2 j) tu = t(u i + u 2 j) = tu i + tu 2 j So that tu has components (tu, tu 2 ) y 2u u x 2.7 Dot Product of Two Vectors 2.7. Definition of Dot Product The dot product (also called the scalar product) of two vectors is defined as follows. Given two vectors: u = u i + u 2 j = (u, u 2 ) v = v i + v 2 j = (v, v 2 ) we define their dot product u v to be the sum of the products of their corresponding components. u v = u v + u 2 v 2. Note that this product is a number (=scalar) and not a vector. Example :

26 2 VECTORS u = (2, ), and v = (, 3) then u v = 2. +. 3 = Example 2: u = (2, ), and v = ( 2, 4) then u v = 2. 2 +.4 = 0 Note that this shows that u v can be zero even though both u and v are non-zero. 2.7.2 Properties of Dot Product. u v = v u 2. u (v + w) = u v + u w 3. v v = v 2 4. (tu) v = t(u v) The dot product has a geometrical interpretation. Result: If θ is the angle between the directions of u and v (0 θ π), then u v = u v cos θ. v theta u

2.7 Dot Product of Two Vectors 27 A consequence of this result is that two vectors are orthogonal (perpendicular) to one another if and only if their dot product is zero. θ = π 2 cos θ = 0 u v = 0. So in example 2 above, u and v are orthogonal. ( 2,4) y (2,) x Example : Find the angle between i + j and i 3j cos θ = u v u v = (i + j) (i 3j) i + j i 3j =. +.( 3) 2 0 = 2 20 5 ( θ = arccos ) 6.6 5 2.7.3 Matrix notation There is a simple connection between the matrix notation and the dot product. Using the matrix notation the dot product between two vectors may be represented as a matrix product between a row vector and a column vector: u = ai + bj v = ci + dj

28 2 VECTORS ( c (a b) d ) = ac + bd = u v 2.7.4 Work Work done by force F over distance (direction) d W = F d Example : Find work done by force F = ( 2) in moving from the origin to the point A = (0 ). F d = ( 2) (0 ) = 2 2.7.5 Projections It is useful to project one vector onto another, i.e., to find the component of a vector u along another vector v. Example : v u theta s

2.8 Vectors in more than 2 dimensions 29 From the picture we can see that the scalar projection s of a vector u in the direction of a nonzero vector v is the dot product of u with a unit vector in the direction of v. Thus it is the number: s = u cos θ = u v v ( ) v = u = u ˆv v The vector projection of u in the direction of v is the scalar multiple of a unit vector ˆv (in the direction of v) by the scalar projection of u in the direction of v: u v = u v u v v ˆv = v v v = u v v v 2 2.8 Vectors in more than 2 dimensions 2.8. Three dimensions If we are in 3 dimensions, we can use the Cartesian coordinate system x, y, z and represent a vector by its 3 components along the coordinate axes. z P (x,y,z) z y x y x All the operations defined in 2D are valid in 3D. Example (length):

30 2 VECTORS v = (, 2, 2) then v = 2 + 2 2 + ( 2) 2 Example 2 (sum): v = (v, v 2, v 3 ) and w = (w, w 2, w 3 ) then v + w = (v + w, v 2 + w 2, v 3 + w 3 ) Example 3 (scalar product): v w = v w + v 2 w 2 + v 3 w 3 = v w cos θ So if v = (,, 0) and w = (2, 2, 3) then v w =.2 + ( ).( 2) + 0.( 3) = 4 The standard basis vectors in 3D are indicated by i, j and k, so that if v has components v, v 2, v 3 along the x, y and z axes respectively, then v = v i + v 2 j + v 3 k 2.8.2 Higher dimensions In principle we can define vectors in any dimensional space, e.g., 4, where we just need to know the 4 components, e.g., v = (, 2, 4, 6), w = (2, 3, 0, 3), etc. Higher dimensional spaces are important for specifying more complicated properties. For example the dynamical state of a classical particle moving in 3 dimensions is 6 dimensional: 3 components to represent the position and 3 components to represent the velocity. Everything we have so far defined can be generalised to higher dimensions in ways similar to how we went from from 2D to 3D. The sum of two 4-vectors is just the sum of the 4-respective components, e.g., v + w = (3, 5, 4, 3). The dot product would be v w =.2 + 2.3 + ( 4).0 + 6.( 3) = 0.

2.9 Cross and Triple Product 3 2.9 Cross and Triple Product These two operations on vectors are defined only in 3D. Definition: Given two vectors u = u i + u 2 j + u 3 k v = v i + v 2 j + v 3 k their cross product is the vector: u v = (u 2 v 3 u 3 v 2 ) i (u v 3 u 3 v ) j + (u v 2 u 2 v ) k u v u θ v Properties:. u v is perpendicular to both u and v 2. u v is the area of the parallelogram with sides u and v u v = u v sin θ 3. The direction of u v is the normal to the parallelogram given by the right hand screw rule going from u to v. 4. u u = 0

32 2 VECTORS 5. u v = v u so the cross product is anti-symmetric. 6. (u + v) w = u w + v w 7. a (b c) (a b) c 8. a (λb) = (λa) b = λ(a b) Example : i i = 0, i j = k, i k = j j j = 0, j k = i, j i = k k k = 0, k i = j, k j = i Example 2: 3i 5k = 5(i k) = 5j) Example 3: let u = 2i + j 3k and v = 2j + 5k then u v = (.5 ( 3).( 2))i (2.5 ( 3).0)j + (2.( 2).0)k = i 0j 4k There is also an easier way to evaluate the cross product than remembering the definition formula. Given two vector u = u i + u 2 j + u 3 k and v = v i + v 2 j + v 3 k then the vector product may be written and evaluated as a determinant where we expand in terms of the first row: u v = i j k u u 2 u 3 v v 2 v 3

2.9 Cross and Triple Product 33 Example : u = 2i + j 3k, v = 2j + 5k. Then i j k u v = 2 3 0 2 5 = i 3 2 5 j 2 3 0 5 + k 2 0 2 = i 0j 4k NB: Don t forget the minus sign in front of the term for j. 2.9. Triple vector product By combining two vector products we obtain a triple vector product, e.g., (a b) c. Here the brackets are essential since a (b c) also exists but gives a different answer. Both expressions lead to results which are vectors. It can be shown, from the component forms of the vectors for instance, that a (b c) = (a c) b (a b) c The above result can sometimes be useful in manipulations but it has no simple physical interpretation. The corresponding result for the triple vector product with brackets in different positions can easily be found using the above identity and known properties for vector products, as follows: (a b) c = c (a b) = {(c b) a (c a) b} = (c a) b (c b) a 2.9.2 Triple scalar product The second possibility to form a product of three vectors is to combine the vector and the dot products. The triple scalar product of the 3D vectors u, v, and w is the scalar: u (v w) The triple product has a geometrical meaning: its absolute value is the volume of the parallelepiped spanned by the three vectors u, v and w. Consequently u, v and w are only coplanar if their scalar product is zero.

34 2 VECTORS w v u By considering the definition of the scalar triple product, u (v w) where w = w i + w 2 j + w 3 k we can write this as the following: i j k u (v w) = u v v 2 v 3 w w 2 w 3 ( ) v = u 2 v 3 w 2 w 3 i v v 3 w w 3 j + v v 2 w w 2 k v = u 2 v 3 w 2 w 3 u 2 v v 3 w w 3 + u 3 v v 2 w w 2 u u 2 u 3 = v v 2 v 3 w w 2 w 3 Hence: u (v w) = u u 2 u 3 v v 2 v 3 w w 2 w 3 Properties:. If two, or more, of the vectors a, b and c are parallel then a b c = 0 (e.g. a b a = 0). 2. If a, b and c are coplanar (i.e. lie in the same plane) then a b c = 0. 3. a b c = a b c (can interchange and )

2.9 Cross and Triple Product 35 4. a b c = b c a = c a b (can keep the operator signs fixed but rotate the three vectors in cyclic order a b, b c, c a) The first two properties are easily understood from the geometric interpretation of the triple scalar product. The last two follow, e.g., from the property of the determinant which states that interchanging two rows changes the sign of the determinant. Hence, interchanging two rows twice leaves the determinant unchanged. 2.9.3 Cross Products and Mechanics Angular motion: If a particle in a rigid body is rotating about an axis with angular velocity w (yes a vector!), then the linear velocity of a particle with position vector r, relative to the axis of motion is v = w r ω r P Angular Momentum: Suppose a planet of mass m is in orbit at position r with linear velocity v. Take the centre of rotation (e.g., the sun) as being the origin of coordinates. The angular momentum of the planet is then L = r (mv). Moment: The moment, or torque, m of a force F applied to a point with position vector r with respect to the origin is m = r F. The moment describes the turning effect of force about a fixed point, as shown in the figure. Note that r denotes the position vector from origin of any point on the line of action of the force. O r θ F θ

36 2 VECTORS 2.0 Planes and lines in 3D We can use vectors to find equations for planes and lines in 3D. 2.0. Lines in 3D Given a point P 0 : (x 0, y 0, z 0 ) and a vector v = ai + bj + ck, there is one and only one line through P 0 parallel to v. z r0 v x y If P : (x, y, z) is a general point on this line, then from the diagram you can see that r r 0 is parallel to v. Thus there is a number t such that r r 0 = tv r = r 0 + tv This is the vector equation of the line. All the points on the line can be obtained by varying t from to +. The vector v is called the direction vector of the line. We can break the vector equation up into a parametric form by considering the components of a general point. Let v = ai + bj + ck then r = xi + yj + zk = x 0 i + y 0 j + z 0 k + t(ai + bj + ck) = (x 0 + ta)i + (y 0 + tb)j + (z 0 + tc)k

2.0 Planes and lines in 3D 37 so that we have: x = x 0 + at y = y 0 + bt < t < + z = z 0 + ct. These are called the parametric equations of the line, since they involve a parameter, t. To obtain the Cartesian equation of the line we simply eliminate t between the above equations and end up with the odd-looking double-equals expression, which is shorthand for two equations: x x 0 a = y y 0 b = z z 0, a, b, c 0 c Example : Find the line through P : (,, ) parallel to v = i + j + 2k in vector, parametric and Cartesian forms. Vector: r = i + j + k + t( i + j + 2k) r = ( t)i + ( + t)j + ( + 2t)k Parametric: Cartesian: Hence: x = t, y = + t, z = + 2t t = x, t = y, t = z 2 x = y = z 2 Example 2: Find the line through P : Cartesian forms. (, 0, ) parallel to v = i + 2j in vector, parametric and

38 2 VECTORS Vector: r = i + k + t(i + 2j) r = ( + t)i + 2tj + k Parametric: Cartesian: Hence: x = + t, y = + t, z = + 2t t = x, t = y 2, z = x = y 2, z = 2.0.2 Planes in 3D We can use vectors to find equations for planes in 3D. The easiest case is the following: Find the equation of the plane which passes through a point A and which is perpendicular to a non-zero vector n. The vector n is called the normal vector to the plane and the key feature of a plane is that we can uniquely define the normal vector at every point. n A P a r O Consider a plane which passes through the point A with position a. If the vector n is perpendicular to the plane and P, with position vector r, is any point on the plane, then

2.0 Planes and lines in 3D 39 the vector AP must always lie in the plane and hence always be perpendicular to n. Now AP = r a, so the vectors being perpendicular implies (r a) n = 0 r n a n = 0 i.e. r n = a n The right-hand side of the above contains two constant vectors and so the general vector equation of a plane is usually written r n = C, where n is the normal to the plane and C is a constant determined by a point on the plane. The vector equation can also be written in scalar form using the Cartesian representations: A : (x 0, y 0, z 0 ), a = x 0 i + y 0 j + z 0 k P : (x, y, z), r = xi + yj + zk n = Ei + F j + Gk 0 = n (r a) 0 = (Ei + F j + Gk) ((x x 0 )i + (y y 0 )j + (z z 0 )k) 0 = E(x x 0 ) + F (y y 0 ) + G(z z 0 ) Hence Ex + F y + Gz = D where D = Ex 0 + F y 0 + Gz 0. If at least one of the coefficients E, F, G, is non-zero, an equation of this type represents the equation of a plane perpendicular to n = Ei + F j + Gk. Example : Find the equation of the plane which passes through the point A (2, 3, ) and is perpendicular to the vector 2 i 2 j + k. The equation of a plane with given normal is r n = C, or r (2, 2, ) = C.

40 2 VECTORS The constant C is determined by recalling that A (2, 3, ) lies on the plane so must satisfy the above equation when the position of the general point is replaced by the position of A. It follows that C = (2, 3, ) (2, 2, ) = 2(2) + 3( 2) + ( )() = 4 6 = 3, and so the required equation of the plane is r (2, 2, ) = 3. The Cartesian equation for the plane is easily found from the above, if required: (x, y, z) (2, 2, ) = 3 or 2x 2y + z = 3. Note that if you were given the latter Cartesian equation of a plane then the coefficients of the unknowns give you the components of the vector which is perpendicular to the plane, namely (2, 2, ) in the above example. Example 2: Find the plane through (2, 0, ) and perpendicular to n = 3i 2j 2k. 0 = n (r a) 0 = (3i 2j 2k) (xi + yj + zk) (2i + k) 0 = (3i 2j 2k) ((x 2)i + yj + (z )k) 0 = 3(x 2) 2y 2(z ) Hence 3x 2y 2z = 4 Example 3: Find the normal vector to 2x 3y 4z = 0. The components of the normal are given by the coefficients of x, y and z in the above equation. Hence n = 2i 3j 4k (or any non-zero multiple of the n given above.) Example 4:

2.0 Planes and lines in 3D 4 Find the equation of the plane that passes through the three points P = (,, 0), Q = (0, 2, ) and R = (3, 2, ). First find P Q and P R P Q = OQ OP = (2j + k) (i + j) = i + j + k P R = OR OP = (3i + 2j k) (i + j) = 2i + j k Next find n n = P Q P R = ( i + j + k) (2i + j k) =... = 2i + j 3k Finally find the equation of the plane through P : (,, 0) with normal n 0 = n (r a) 0 = ( 2i + j 3k) (xi + yj + zk) (i + j) 0 = ( 2i + j 3k) ((x )i + (y )j + zk) 0 = 2(x 2) + (y ) 3z Hence 2x + y 3z =

42 3 DERIVATIVES 3 Derivatives If we consider y = f(x), then: we can define a new function, which we denote as f (x), the derivative of f(x). The derivative f (x) measures the slope of the tangent to the graph of f(x) at x. An alternative notation for the derivative is df/dx. In order to define what we mean by tangent we use the idea of a limit. We can consider the tangent at the point (x, f(x)), which we call P, to be the limit of the slope of the line through the points P and Q (where Q is on the graph of the function) as Q tends to P. P Q This idea gives us the more formal definition of the derivative f (x) df dx = lim f(x + h) f(x) h 0 h A function is said to be differentiable at x if the above limit exists. A function is said to be differentiable if it is differentiable at each point x in its domain. Example Calculate the derivative of f(x) = x 2. Using the above definition

43 f (x) = lim h 0 f(x + h) f(x) h = lim h 0 (x + h) 2 x 2 h = lim h 0 2xh + h 2 h = lim h 0 (2x + h) = 2x Example 2 Calculate the derivative of f(x) = sin x. Using the definition f sin(x + h) sin(x) (x) = lim h 0 h ) ( sin h ) 2 = lim h 0 2 cos ( 2x+h 2 (where we have used the trig. identity sin A sin B = 2 cos ( A+B 2 ( ) x + h cos = lim h 0 h 2 ) sin ( h 2 h 2 = lim k 0 cos(x + k) sin k k sin k = lim cos(x + k) lim k 0 k 0 k = cos x (since lim k 0 sin k k (where k = h 2 ) = ) ) ( sin A B ) 2 ). proceeding in this way one can calculate from first principles a number of important derivatives.

44 3 DERIVATIVES f(x) = x n f (x) = nx n f(x) = sin x f (x) = cos x f(x) = cos x f (x) = sin x f(x) = e x f (x) = e x Examples of these are: f(x) = x 5 f (x) = 5x 4 f(x) = x= x /2 f (x) = 2 x /2 = 2 x 3. Rules for differentiation For more complicated functions we do not work with the definition of the derivative directly. Instead we use the definition to prove a number of rules for calculating derivatives.

3. Rules for differentiation 45 () If f(x) = c then f (x) = 0 where c is a constant (2) If f(x) = x then f (x) = (3) The addition rule (4) The product rule (5) The quotient rule (pf(x) + qg(x)) = pf (x) + qg (x) where p and q are constants (f(x)g(x)) = f (x)g(x) + f(x)g (x) ( ) f(x) = f (x)g(x) f(x)g (x) g(x) (g(x)) 2 (6) The chain rule If y = y(u) and u = u(x) then (7) The inverse function rule dy dx = dy du du dx dy dx = dx/dy (or function of a function rule) Example Find y when y = x 3 sin x. If we take f = x 3 and g = sin x so that f = 3x 2 g = cos x then dy dx = 3x2 cos x (using addition rule) Example 2 Find y when y = x 2 sin x. If we take f = x 2 g = sin x so that f = 2x g = cos x

46 3 DERIVATIVES then dy dx = 2x sin x + x2 cos x (using the product rule) Example 3 then Find y when y = tan x = sin x cos x If we take f = sin x g = cos x so that f = cos x g = sin x dy dx = cos2 x sin x( sin x) cos 2 x = cos 2 x = sec2 x (using the quotient rule) Example 4 then Find y when y = x 2 + x + 4 If we write the problem as y = u with u = x 2 + x + 4 so that dy du = 2 u dy dx = dy du du dx = 2 u (2x + ) = 2x + 2 x 2 + x + 4 du dx = 2x + (using the chain rule) Example 5 Find y when y = cos( x 2 8) If we write the problem as y = cos u with u = x 2 8 dy so that du = sin u We then have to compute du/dx and we do this in a similar manner to before. If we write the function as u = w with w = x 2 8 then so that Hence du dx = du dw du dw = 2 w dw dx = 2x dw dx = 2 w 2x = x x2 8 dy dx = dy du du dx = sin u x x2 8 = x sin( x 2 8) x2 8 (using the chain rule) Example 6: More complicated substitutions

3. Rules for differentiation 47 y = 2x + (x 2 + ) 3 = u v let u = 2x + v = (x 2 + ) 3 z = 2x + dz dx = 2 du dz = 2 z /2 du dx = du dz dz dx = z /2 = 2x + v = (x 2 + ) 3 w = x 2 + dw dx = 2x dv dw = 3w2 dv dx = dv dw dw dx = 6xw2 = 6x(x 2 + ) 2 dy dx = v du u dv dx dx v 2 dy dx = (x2 + ) 3 2x+ 2x + 6x(x 2 + ) 2 = (x 2 + ) 6 6x x2 (x 2 + ) 4 2x +

48 3 DERIVATIVES 3.2 Higher derivatives Given a function f whose derivative is f it may be possible to differentiate f to obtain the second derivative f f (x) = lim h 0 f (x + h) f (x) h We often write f (x) as d2 y dx 2 Carrying on in this way we may define f (x), f (x) and so on. For large order derivatives this notation becomes rather cumbersome so we sometimes use a notation where we write f = f (0), f = f (), f = f (2), f = f (3), f = f (4), and so on Example f(x) = x 3 f (x) = 3x 2 f (x) = 6x f (x) = 6 f (4) (x) = 0

3.3 Newton-Raphson 49 Example 2 g(x) = sin 2x g (x) = 2 cos 2x g (x) = 4 sin 2x g (x) = 8 cos 2x g (4) (x) = 6 sin 2x 3.3 Newton-Raphson This section is concerned with the problem of root location, i.e., finding those values of x which satisfy an equation of the form f(x) = 0 for a given function f(x). We start with some initial estimate x 0 of the root (for instance, it could be found by sketching the function in the neighborhood of the root). This estimate is then improved by using a technique known as the Newton-Raphson method. The method is based on knowing the tangent to the curve near the root. The method is iterative, indicating that it can be used repeatedly to continuously improve the accuracy of the root. y x 0 x 2 x x y=f(x)

50 3 DERIVATIVES We would like to find the values of x that satisfy f(x) = 0. We take the initial guess as x 0. Provided that this guess is sufficiently close to the solution of f(x) = 0, so that the method is converging, we obtain a better approximation to the root from the intersection point of the x axis and the tangent of the curve evaluated at x 0 ; see the figure. We denote this intersection point as x. Since the slope of the tangent to the curve at x 0 is equal to the derivative of the function at x 0, we obtain f(x 0 ) x 0 x = f (x 0 ) i.e. or iteratively, etc. x 0 x = f(x 0) f (x 0 ) x = x 0 f(x 0) f (x 0 ) x 2 = x f(x ) f (x ) The Newton-Raphson formula x n+ = x n f(x n) f (x n ) Note: must use for functions satisfying f(x) = 0. To find solution of f(x) = c must rewrite as f(x) c = 0 and use {f(x) c} as our function. Example An approximate solution of x 2 = 5 is x = 2. Use Newton-Raphson procedure to obtain next two approximations. Write as x 2 5 = 0, f(x) = x 2 5,and f (x) = 2x

3.3 Newton-Raphson 5 Given x 0 = 2, x = x 0 f(x 0) f (x 0 ) = 2 22 5 2(2) = 2.25 x 2 = x f(x ) f (x ) = 2.25 2.252 5 2(2.25) = 2.236 x 3 = x 2 f(x 2) f (x 2 ) = 2.236 2.2362 5 2(2.236) = 2.236 For more complicated functions, we must use reasonable guess sufficiently close to the solution. Example For f(x) = x 4 4x 2 + 2, we find x -3-2 - 0 + +2 +3 f(x) 47 2 - +2 - +2 47 Here, solutions of f(x) = 0 between 2,, say.5, 0, say 0.5 0, +, say +0.5 +, +2, say +.5

52 3 DERIVATIVES As f (x) = 4x 3 8x, for instance for x 0 = 0.5 we obtain x = x 0 f(x 0) f (x 0 ) = 0.5 f(0.5) f (0.5) = 0.8036 3.4 Functions of Two Variables We have already studied functions of one variable, which we often wrote as f(x). We will now look at functions of two variables, f(x, y). For example z = f(x, y) = 2 x 2 y 2 For a function of two variables, the graph is given by a surface: z f(x,y) y (x,y) x

3.4 Functions of Two Variables 53 Note that a surface is the graph of some function if every vertical line cuts the surface in at most one point. For the example given above, the function looks like this: z = 2 - x^2 - y^2 2 0 2 4 6 2 y0 2 2 0x 2 It is not always easy to draw the surface defined by a function of two variables. It is sometimes useful to first draw a two dimensional picture using contour lines. A contour line is a line through those points (x, y) in the x, y-plane such that the height of the surface z = f(x, y) above or below this plane is constant. It is therefore given by z = f(x, y) = h, where h is a constant. In the example above, 2 (x 2 + y 2 ) = h gives a circle centred on the origin of radius 2 h. We can draw the contour lines for equally spaced values of the height h to plot:

54 3 DERIVATIVES The contour lines are thus concentric circles getting closer together. 3.4. Partial Derivatives Given a function z = f(x, y) of two variables, then we define its partial derivative with respect to x by: z x = f { } f(x + h, y) f(x, y) x = f x(x, y) = lim h 0 h This is the derivative of f thought of as a function of one variable, namely x, keeping y constant. In the same way the partial derivative of z = f(x, y) with respect to y is given by:

3.4 Functions of Two Variables 55 z y = f { } f(x, y + k) f(x, y) y = f y(x, y) = lim k 0 k This is the derivative of f thought of as a function of one variable, this time y, with x kept fixed. Example z = 2 x 2 y 2 z x = 2x z y = 2y Example 2 z = e xy sin(x + y) z x = yexy sin(x + y) + e xy cos(x + y) z y = xexy sin(x + y) + e xy cos(x + y) These notions may be extended to functions of three or more variables. The partial derivatives involve differentiating with respect to one variable, keeping all the others fixed. For example: u = f(x, y, z) = xy 2 e xz

56 3 DERIVATIVES u x = y2 e xz + xy 2 ze xz u y u z = 2xye xz = x 2 y 2 e xz Example: the use of chain rule We start by recalling the situation for functions of one variable Let z = f(x) with x = g(t) Then in order to differentiate with respect to t, we differentiate first with respect to x and then multiply by the derivative of x with respect to t. This gives the chain rule: dz dt = dz dx dx dt Often one needs to find the partial derivatives of a composite function f(u), where u = u(x, y). In that case the chain rule may be generalized in a straightforward way f x = df du u x, f y = df u du y

3.4 Functions of Two Variables 57 Example 3 f = f(x, y) = sin(x 2 + y 2 ) = sin u df du = cos u u x = 2x u y = 2y f x = cos u 2x = 2x cos(x2 + y 2 ) f y = cos u 2y = 2y cos(x2 + y 2 ) Example 4 f = f(x, y) = e x2y = e u df du = eu u x = 2xy u y = x 2 f x = df du u x = y 2xyex2 f y = df u du y = x2 e xy