eng_ana_II

Embed Size (px)

Citation preview

  • 8/8/2019 eng_ana_II

    1/78

    Engineering Analysis 2

    P.D. Ledger

    Civil and Computational Engineering Centre

    Swansea University

    Singleton Park

    Swansea SA2 8PP

    Wales. U.K

    Script to accompany the lecture Engineering Analysis 2 running in the summer term 2007

  • 8/8/2019 eng_ana_II

    2/78

    Contents

    1 Introduction 3

    2 Linear Algebra 5

    2.1 Simultaneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.2 Gauss Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.2.1 Schematic representation . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.2.2 Algorithm for m = n . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2.3 Linear systems of equations with multiple right hand sides . . . . . . . . 13

    2.2.4 The algorithm for m equations and n unknowns . . . . . . . . . . . . . . 132.2.5 Rank of a linear system of equations . . . . . . . . . . . . . . . . . . . . 14

    2.3 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    2.3.1 Matrix definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    2.3.2 Computations with matrices . . . . . . . . . . . . . . . . . . . . . . . . 17

    2.3.3 Matrix notation for linear systems of equations . . . . . . . . . . . . . . 19

    2.3.4 Matrix inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    2.3.5 Rank of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    2.3.6 Linear independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.4 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2.4.1 Definition and properties . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2.4.2 Efficient calculation of determinants . . . . . . . . . . . . . . . . . . . . 24

    2.4.3 Determinants and linear equation systems . . . . . . . . . . . . . . . . . 24

    2.5 Eigenvalue Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    2.5.1 Eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    2.5.2 Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    2.5.3 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    3 Functions of more than one variable 32

    3.1 Visualisation of Functions of Two and Three variables . . . . . . . . . . . . . . . 32

    3.2 Partial Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    3.2.1 Chain rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    3.2.2 Higher order partial derivatives . . . . . . . . . . . . . . . . . . . . . . . 37

    3.2.3 Total differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    3.3 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    3.3.1 Line integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    3.3.2 Surface integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    3.3.3 Volume integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    1

  • 8/8/2019 eng_ana_II

    3/78

    4 Sequences and Series 48

    4.1 Sequences and Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    4.1.1 Graphical representation of sequences . . . . . . . . . . . . . . . . . . . 49

    4.2 Finite sequences and series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    4.2.1 Arithmetical sequences and series . . . . . . . . . . . . . . . . . . . . . 50

    4.2.2 Geometric sequences and series . . . . . . . . . . . . . . . . . . . . . . 51

    4.2.3 Other finite series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    4.3 Limit of a sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    4.3.1 Convergent sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    4.3.2 Proprieties of convergent sequence . . . . . . . . . . . . . . . . . . . . . 54

    4.3.3 Divergent sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    4.3.4 Cauchys test for convergence . . . . . . . . . . . . . . . . . . . . . . . 55

    4.4 Infinite Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    4.4.1 Convergence of an infinite series . . . . . . . . . . . . . . . . . . . . . . 55

    4.4.2 Tests of convergence of positive series . . . . . . . . . . . . . . . . . . . 56

    4.4.3 Absolute convergence of a general series . . . . . . . . . . . . . . . . . 57

    4.5 Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584.5.1 Convergence of power series . . . . . . . . . . . . . . . . . . . . . . . . 58

    4.5.2 Binomial Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    4.5.3 Maclaurin Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    4.5.4 Taylor series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    5 Differential Equations 62

    5.1 Classification of differential equations . . . . . . . . . . . . . . . . . . . . . . . 62

    5.1.1 Ordinary and partial differential equations . . . . . . . . . . . . . . . . . 62

    5.1.2 Independent and dependent variables . . . . . . . . . . . . . . . . . . . 62

    5.1.3 Order of a differential equation . . . . . . . . . . . . . . . . . . . . . . . 635.1.4 Linear and nonlinear equations . . . . . . . . . . . . . . . . . . . . . . 63

    5.1.5 Homogeneous and nonhomogeneous equations . . . . . . . . . . . . . 64

    5.2 First order differential equation . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    5.2.1 Implicit and explicit solutions . . . . . . . . . . . . . . . . . . . . . . . 64

    5.2.2 General and Particular Solutions . . . . . . . . . . . . . . . . . . . . . . 65

    5.2.3 Boundary and initial conditions . . . . . . . . . . . . . . . . . . . . . . 65

    5.2.4 Variable Separable Type . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    5.2.5 Separable after substitution type . . . . . . . . . . . . . . . . . . . . . . 67

    5.2.6 Linear Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    5.2.7 More specialised types . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    5.3 Second Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    5.3.1 Homogeneous equations . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    5.3.2 Linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    5.3.3 Linear equations with constant coefficients . . . . . . . . . . . . . . . . 74

    2

  • 8/8/2019 eng_ana_II

    4/78

    Chapter 1

    Introduction

    This script is intended to accompany the lecture course Engineering Analysis 2 which will run

    during the summer term 2007 and is common for Aerospace, Civil, Chemical, Electrical and

    Mechanical first year undergraduate engineering students. The material contained in the script is

    intended to provide the basis of what students should learn during the course, however, there willalso be occasions when additional material (in particular applications of the theory) which will

    be discussed during the course and it is the students responsibility to make their own notes where

    necessary.

    This lecture course, aims to build on the material taught in Engineering Analysis 1 so that

    students are provided with further mathematical skills that are required to solve real world en-

    gineering problems. Unlike, Engineering Analysis 1, the mathematical concepts that we shall

    discuss will be new to nearly all students. However, if you are already familiar with a particular

    topic, then please treat it as valuable revision, as you will certainly use it again in your other

    engineering courses. If you are having difficulty to understand a particular aspect of the course

    please feel free to ask questions.The course itself will comprise of lecturers and handson MATLAB classes. In the lecture

    classes we will discuss the theory and examples, while in the handson classes you get chance to

    experiment with a computer based mathematics software called MATLAB. This software is very

    useful in solving mathematical problems which would otherwise be difficult, time consuming or

    impossible to solve by hand.

    As well as the lectures and handson classes you are expected to conduct your own private

    study. You should use the private study for reading the lecture notes and text books, attempting

    exercises, completing coursework and preparing for the examination.

    The course will be assessed in terms of both continual assessment and an end of semester

    examination. The continual assessment will be in the form of exercises which students should

    complete (alone) and hand in on a specified date. The weighting is 20% for continual assessment

    and 80% for the examination. Exercise sheets will be issued each week and will state if and

    when exercises are to be submitted. Late submission will normally be awarded zero marks. Late

    submissions due to certified illness will be dealt with according to standard procedures. Further

    details about the exercises will follow later.

    The university has its own set of calculators which are available for use within examinations.

    Only the university owned calculators will be permitted for use within the examination. The

    model numbers for the calculators owned by the university can be found on the link

    http://www.swan.ac.uk/registry/A-ZGuide/E/Examinations/

    There are a range of text books that also discuss the material we shall cover in the course.

    The recommended textbooks for the course are

    G. James, Modern Engineering Mathematics, Third Edition, Prentice Hall, ISBN 0-13-

    3

  • 8/8/2019 eng_ana_II

    5/78

    018319-9

    A. Croft & R. Davison Mathematics for Engineers: An Interactive Approach, Second Edi-tion, Prentice Hall, ISBN 0-13-120193-X

    Copies of these books have been ordered at the university branch of Waterstones and may also

    be found in the university library. If these textbooks are not to your liking or if you are havingdifficulty obtaining a copy, then you may also wish to consult any other book with Engineering

    Mathematics in the title.

    MATLAB is installed on the computers in rooms 42, 43, 43a, 942 and 943 of the Talbot

    Building, but not those in the LIS. If you wish to use MATLAB on your own machine, a student

    version may be purchased from Mathworks

    http://www.mathworks.co.uk/academia/student_version/

    or from Waterstones. There are many textbooks that have been written about MATLAB some

    examples are

    H. Moore, MATLAB for Engineers, Pentice Hall 2007

    A. Biran, M. Breiner, MATLAB 6 for engineers, Prentice Hall 2002 C. VanLoan, Introduction to scientific computing : a matrix-vector approach using MAT-

    LAB, Prentice Hall 2000

    S.R. Otto and J.P. Denier, An introduction to programming and numerical methods in MAT-LAB, Springer 2005.

    Typing MATLAB as a keyword in voyager will reveal many others. A free book published on-

    line written by one of the founders of MATLAB can be found at

    http://www.mathworks.com/company/aboutus/founders/clevemoler.htmlLecture notes and exercise sheets will be issued in PDF format over Blackboard. Blackboard is a

    piece of software that lets you access learning material related to lectures at Swansea University.

    It accessed over the Internet (either on or offcampus) at the following link

    https://blackboard.swan.ac.uk/

    instructions on how to logon can also be found on this site. Once logged on you will be able

    to access details relating to the specific courses that you are attending. For this course, the latest

    version of the lecture notes and exercise sheets will be available on Blackboard as the course

    progresses.

    My office is room 150 in the Talbot building. There will be office hours available for this

    course, please try to restrict your enquires to the office hours, for times see the announcement on

    blackboard.

    4

  • 8/8/2019 eng_ana_II

    6/78

    Chapter 2

    Linear Algebra

    In this chapter we will introduce the concept of Linear Algebra. No doubt you have come across

    set of two or three simultaneous equations. We shall extend the idea of simultaneous equations in

    to the wider field of linear algebra. In doing so, we shall introduce a new notation for representing

    the equations, called matrices and a solution process called Gauss elimination.When exploring solutions to sets of simultaneous equations, we need to know what solutions

    we should expect, a single set of values or no solution, infinitely many solutions and this is where

    are discussions begin.

    2.1 Simultaneous Equations

    Let us start with an example.

    Example

    x1 + 2x2 = 5

    2x1 + 3x2 = 8

    Solution

    This is an example for linear equation system with two equations and two unknowns. We wish to

    find x1 and x2 so that both equations are fulfilled. The values x1 = 1 and x2 = 2, which are foundby substituting one equation in to another, satisfy both equations. They represent the solution of

    the linear equation system.

    Note that in general a linear equation system may have m equations and n unknowns. Letslook at some more examples.

    Example

    x1 + x2 = 4

    2x1 + 2x2 = 5

    Here m = 2 and n = 2.Solution

    This is linear equation system has no solution. If one multiplies the first equation by 2 one obtains2x1 + 2x2 = 8 which disagrees with the second equation.

    5

  • 8/8/2019 eng_ana_II

    7/78

    Example

    x1 x2 + x3 = 22x1 + x2 x3 = 4

    Here m = 2 and n = 3.Solution

    One possible solution is x1 = 2, x2 = 0 and x3 = 0 another is x1 = 2, x2 = 1 and x3 = 1. Ingeneral there are infinitely many solutions, namely x1 = 2, x2 = and x3 = where is anyreal number.

    Example

    x1 + x2 = 2

    x1 x2 = 1x1 = 4

    Here m = 3 and n = 2.Solution

    This is linear equation system has no solution. Through addition of the first two equations, one

    has 2x1 = 3 which disagrees with the last equation.

    The set of all solutions of a linear equation system is called the solution set of the linear

    equation system.

    2.2 Gauss Elimination

    The aim of this section is to describe the development of an efficient strategy for determining

    the solution set of a linear equation system. By efficient, we mean that with the fewest possible

    calculations. The procedure that we describe is called Gauss elimination. The idea of Gauss elim-

    ination is to transform the linear system so that it is easier to solve. Note that the transformation

    is performed so that the solution set is not changed during the process.

    The following two operations transform a linear equation system in to an equivalent system.

    Exchanging equations

    x1 + 2x2 = 52x1 + 3x2 = 8

    is equivalent to2x1 + 3x2 = 8

    x1 + 2x2 = 5

    It is clear that both equation systems posses the same solution set.

    Addition of factored equation to another equation

    x1 + 2x2 = 52x1 + 3x2 = 8

    is equivalent tox1 + 2x2 = 5

    x2 =

    2

    Here, the first equation remains the same. To obtain the revised second equation, we must multi-

    plied the first equation by 2 and then subtracted it from the second equation in the original system.

    6

  • 8/8/2019 eng_ana_II

    8/78

    The solution set of the left equation system is the same as solution set of the equation system on

    the right.

    A linear equation with n equations and n unknowns is easier to solve when it is has a trian-gular form. In this case, one can easily obtain the solution set by back substitution.

    Example

    3x1 + 2x2 + x3 = 1

    x2 x3 = 22x3 = 4

    Here m = n = 3.Solution

    From the third equation we have x3 = 2. Substituting this in to the second equation gives x2 = 4and finally using both values in the first equation gives x1 = 3.

    Lets now attempt to solve a linear equation system using these ideas.

    Example

    2x2 + 2x3 = 1

    2x1 + 4x2 + 5x3 = 9

    x1 x2 + 2x3 = 3

    Here m = n = 3.Solution

    First we exchange the first and second equations

    2x1 + 4x2 + 5x3 = 9

    2x2 + 2x3 = 1

    x1 x2 + 2x3 = 3

    Next we multiply the first equation by 12

    and subtract it from the third equation

    2x1 + 4x2 + 5x3 = 9

    2x2 + 2x3 = 1

    3x2 12

    x3 = 32

    Finally we multiply the second equation by 32

    and add it from the third equation, giving

    2x1 + 4x2 + 5x3 = 9

    2x2 + 2x3 = 15

    2x3 = 0

    Then by back substitution we find the solution x1 =72

    , x2 =12

    and x3 = 0. It therefore followsthat this is the only solution to the linear system, i.e. the linear set contains only this solution.

    7

  • 8/8/2019 eng_ana_II

    9/78

    What we have just performed is the Gauss elimination algorithm, to explain it in more details

    let us consider a system where m = n = 3

    a11x1 + a12x2 + a13x3 = b1

    a21x1 + a22x2 + a23x3 = b2

    a31x1 + a32x2 + a13x3 = b3

    here the values aij , i = 1, , 3 and j = 1, , 3 and bi, i = 1, , 3 are known real numbers.The values aij are the coefficients of the unknown xj in the ith equation of the system. Thenumber bi is the right hand side of the ith equation.

    2.2.1 Schematic representation

    To aid the application of the Gauss elimination algorithm, we express the system in the form

    x1 x2 x3 1

    a11 a12 a13 b1a21 a22 a23 b2a31 a32 a33 b3

    The coefficients are written in the main part of the schematic, in the headerrow stand the

    respective unknowns x1, x2 and x3. The righthand side is labelled the 1column. The schematicis just another way of writing the linear system. When we wish to perform operations on the

    equations, we just perform the analogue on the schematic.

    Step 1

    Assumption: One ofai1, i = 1, , 3 is not zero, in other words at least one values in the firstcolumn isnt zero.

    a) If a11 = 0 then swap the first row with a row whose first element isnt zero. Next were-name the coefficients according to the position in which they are now lying in. Continue

    to case b).

    b) If a11 = 0 we create a new equivalent scheme in which the coefficients in the secondrow are given by their original value minus the value in the first row factored by a21/a11.Similarly, the values in the third row are given by their original value minus the value in

    the first row factored by a31/a11.

    As a result of this operation the first number in the second and third row, will now be zero. To

    highlight the fact that the values in the second and third column have changed we label them

    with the superscript (2). We have now eliminated the unknown x1 from the second and thirdequations:

    x1 x2 x3 1

    a11 a12 a13 b10 a

    (2)22 a

    (2)23 b

    (2)2

    0 a(2)32 a

    (2)33 b

    (2)3

    8

  • 8/8/2019 eng_ana_II

    10/78

    Step 2

    Assumption:One ofa(2)i2 , i = 2, 3 is non zero.

    a) Ifa(2)22 = 0 we swap rows and then proceed to b).

    b) Ifa

    (2)

    22 = 0 we create a new equivalent system whose entries in the third row are given bytheir original values minus the values in the second row factored by a

    (2)32 /a

    (2)22 .

    We have now eliminated the unknown x2 from the third equation, resulting in a scheme withtriangular form

    x1 x2 x3 1

    a11 a12 a13 b10 a

    (2)22 a

    (2)23 b

    (2)2

    0 0 a(3)33 b

    (3)3

    Step3

    The equivalent system is

    a11x1 + a12x2 + a13x3 = b1

    a(2)22 x2 + a(2)23 x3 = b

    (2)2

    a(3)33 x3 = b

    (3)3

    The solution set can be found by back substitution.

    2.2.2 Algorithm for m = n

    What we have just performed can be expressed in terms of an algorithm. In the algorithm we use

    the construction For j = 1, , n which means that all the lines which follow this statement areevaluated with j = 1 until the statement End is reached. At this point the lines are then executedagain, in turn, but this time with j = 2 until End is reached. The process is repeated until j = n.This enables us to write the Gauss elimination algorithm in a concise way and will turn out to be

    useful for The algorithm for the case where we have n equations and n unknowns is as follows:Perform the elimination process:

    For j = 1, , n 1:

    Determine the row index p j, , n for which a(j)pj = 0Ifp = j exchange rows and renumber coefficients according to their new locations.For k = j + 1, , n :

    Compute lkj = a(j)kj /a

    (j)jj

    For p = j, , n:Set a

    (j+1)kp = a

    (j)kp lkja(j)jp

    End

    Set b(j+1)k = b(j)k lkjb(j)jEnd

    9

  • 8/8/2019 eng_ana_II

    11/78

    End

    Determine the solution by back substitution.

    Set xn = bn/annFor j = n 1, , n

    Set v = bj

    For k = j + 1, , nCalculate v = v ajkxk

    End

    Set xj = v/ajj

    End

    Example

    x1 + 2x2 + 3x3 + x4 = 5

    2x1 + x2 + x3 + x4 = 3

    x1 + 2x2 + x3 = 4

    x2 + x3 + 2x4 = 0

    Solution

    First we write the equation in schematic representationx1 x2 x3 x4 1

    1 2 3 1 52 1 1 1 3

    1 2 1 0 4

    0 1 1 2 0

    We now proceed with the Gauss elimination algorithm:

    x1 x2 x3 x4 1

    1 2 3 1 50 -3 -5 -1 -7

    0 0 -2 -1 -1

    0 1 1 2 0

    x1 x2 x3 x4 1

    1 2 3 1 50 -3 -5 -1 -7

    0 0 -2 -1 -1

    0 0

    23

    53

    73

    x1 x2 x3 x4 1

    1 2 3 1 50 -3 -5 -1 -7

    0 0 -2 -1 -1

    0 0 0 63

    63

    We then determine the solution through back substitution giving x4 = 1, x3 = 1, x2 = 1 andx1 = 1

    What happens when we apply the Gauss elimination algorithm to a system that has no solu-

    tion? Lets consider the following example

    10

  • 8/8/2019 eng_ana_II

    12/78

    Example

    x1 + x2 = 4

    2x1 + 2x2 = 5

    Solution

    First we write the equation in schematic representationx1 x2 1

    1 1 42 2 5

    Then we proceed with the Gauss elimination algorithm, givingx1 x2 1

    1 1 40 0 -3

    Clearly 0x1 + 0x2=

    3 so the linear system has no solution.

    Let us now look at an example in which the right hand side vector contains a unknown pa-

    rameter.

    11

  • 8/8/2019 eng_ana_II

    13/78

  • 8/8/2019 eng_ana_II

    14/78

  • 8/8/2019 eng_ana_II

    15/78

    End

    Set b(j+1)k = b

    (j)k lkib(j)i

    End

    Set i = i + 1 and j = j + 1 , goto *.

    End

    Compute the solution set by back substitution

    2.2.5 Rank of a linear system of equations

    The rank of a linear equation system is defined as the number, r, of nonzero rows after perform-ing the Gauss elimination algorithm. Using the rank, one can immediately describe the solution

    set of the linear system of equations: A linear equation system has at least one solution if

    r = m, or

    r < m and ci = 0, i = r + 1, , m where c is the right hand side vector after Gausselimination.

    Example

    x1 x2 + x3 = 22x1 + x2 x3 = 4

    Solution

    First we write the equation in schematic representationx1 x2 x3 1

    1 1 1 22 1 -1 4

    Then we proceed with the Gauss elimination algorithm, givingx1 x2 x3 1

    1 1 1 20 3 -3 0

    The rank of this system is therefore r = 2 and we have at least one solution, explicitly

    x2 = x3

    x1 = 2 + x2 x3 = 2

    which means that x3 is a free parameter. Thus we have infinitely many solutions, x1 = 2,x2 = x3 = where is any real number.

    14

  • 8/8/2019 eng_ana_II

    16/78

    Example

    x1 + x2 = 2

    x1 x2 = 1

    x1 = 4

    Solution

    First we write the equation in schematic representationx1 x2 1

    1 1 21 -1 1

    1 0 4

    Then we proceed with the Gauss elimination algorithm, givingx1 x2 1

    1 1 20 -2 -10 -1 2

    x1 x2 1

    1 1 20 -2 -10 0 5

    2

    The rank of this system is r = 2 < m = 3 and c3 = 0 so that the system has no solution.

    2.3 Matrices

    In the last section we introduced the Gauss elimination method for solving linear equations. To

    simplify the way we write large systems of equations a new notation is introduced called matrix

    notation. Matrices can be used not only in connection with linear systems of equations, but also

    in mappings and in the solution of systems of differential equations.

    2.3.1 Matrix definitions

    A m n matrix is a schematic of mn numbers ordered in to m rows and n columns. The mnnumbers are called elements of the m n matrix.

    In these lecture notes we shall use capital letters to represent matrices. The element of a

    matrix A which lies on the ith row and jth column is denoted by aij or (A)ij. We write a matrixas follows

    A =

    a11 a12

    a1n

    a21 a22 a2n...

    ...

    am1 am2 amn

    For example

    A =

    2 3 15 1 2

    is a 2 3 matrix. In the first row is the second element (A)12 = a12 = 3.

    A n n matrix has an equal number of rows and columns and is called a square matrix.The two matrices A and B are said to be equal when they have the same number of rows and

    columns and when the respective elements of the two matrices are the same

    Aij = Bij for all i, j

    15

  • 8/8/2019 eng_ana_II

    17/78

    For example the following two matrices are equal5 12 4

    =

    10/2 13 1 22

    Below we introduce some common matrices which are used in engineering:

    A m n matrix is called the null matrix (or zero matrix) if every element of the matrix iszero. For example, the matrix

    0 0 00 0 0

    is 2 3 null matrix.

    A square matrix U is called a upper triangular matrix if(U)ij = 0 for i > j. For example

    U =

    1 3 10 2 40 0 3

    A square matrix L is called a lower triangular matrix if(L)ij = 0 for i < j. For example

    L =

    2 0 0 03 4 0 01 2 2 01 0 0 3

    A nn matrix is called a diagonal matrix if(D)ij = 0 for i = j. The elements (D)ii = diiare called the diagonal elements. For a diagonal matrix with given diagonal elements,

    d11, d22, , dnn we write D = diag(d11, d22, , dnn). For example 5 0 00 2 0

    0 0 3

    = diag(5, 2, 3)

    The n n matrix In = diag(1, 1, , 1) is called the identity matrix. For example

    I3 =

    1 0 00 1 0

    0 0 1

    A further class of matrices are the 1-column or n

    1 matrices. The n

    1 matrix are

    commonly known as column vectors. We write column vectors using lower case letters.The elements of column vectors are called components. Components are only identified

    with a single index. For example, the 4 1 matrix

    b =

    24

    70

    is a column vector. We also have that b =

    b1b2

    b3b4

    with b1 = 2, b2 = 4, b3 = 7 and

    b4 = 0.

    16

  • 8/8/2019 eng_ana_II

    18/78

    2.3.2 Computations with matrices

    Addition

    Consider two m n matrices A and B. To add the matrices A and B together, we add therespective elements ofA and B together. Written more precisely: the m n matrix A + B with(A)ij + (B)ij is called the sum of matrices A and BExample

    A =

    3 1 02 2 1

    B =

    1 2 00 1 1

    Find A + B.Solution

    A + B =

    3 1 02 2 1

    +

    1 2 00 1 1

    =

    4 3 02 1 2

    Multiplication by a scaler

    If a m n matrix is multiplied by scaler number , this means that every element of the matrix ismultiplied by . The matrix A with (A)ij = (A)ij is called the multiple of the matrix A.

    Multiplication of two matrices

    Let A be an m n matrix and B a n p matrix. The m p matrix AB, with (AB)ij =

    nk=1(A)ik(B)kj is called the matrix product of matrices A and B.

    Note that the matrix product AB can only be computed when the number of columns of matrix

    A is exactly the same as the number of rows of matrix B. An illustration of matrix multiplicationis shown in Figure 2.1. In this figure, we observe how row i of matrix A is multiplied by column

    m

    n

    n

    p

    p

    m

    B ABA

    x =

    ith row

    jth column

    (AB) ith row

    jth column

    ij

    Figure 2.1: Illustration of matrix multiplication

    j of matrix B to obtain the element (AB)ij of matrix AB. Explicitly this given as

    (AB)ij = ai1b1j + ai2b2j + + ainbnj

    17

  • 8/8/2019 eng_ana_II

    19/78

    Example

    A =

    3 1 02 2 1

    is a 2 3 matrix and B =

    1 1 0 01 2 2 1

    2 1 1 2

    is a 3 4 matrix

    Find AB.Solution

    AB =

    4 5 2 12 3 5 0

    . The two elements in the first column were computed as follows

    (AB)11 = a11b11 + a12b21 + a13b31 = 3 1 + 1 1 + 0 2 = 4(AB)21 = a21b11 + a22b21 + a23b31 = 2 1 + (2) 1 + 1 2 = 2

    Rules

    When computing with matrices, the following rules should be obeyed: For m n matrices A and B, the commutative law of addition holds

    A + B = B + A

    For m n matrices A, B and C the associative law of addition holds(A + B) + C = A + (B + C)

    For every m n matrix A, n p matrix B and p q matrix C, the associative law ofmultiplication holds

    (AB)C = A(BC) For m n matrices A and B and n p matrices C and D, the distributive law of multipli-

    cation holds

    (A + B)C = AC+ BC

    A(C+ D) = AC+ AD

    Note, however that the commutative law of multiplication does NOT hold for matrices.That is to say that in general for two matrices A and B

    AB

    = BA

    Example

    A =

    2 61 3

    B =

    1 45 2

    Find AB and BASolution

    AB =

    32 2016 10

    = BA =

    6 18

    12 36

    (2.1)

    For every m n matrix A, it holds that ImA = AIn = A. Thus giving the name for theidentity matrix Im and In.

    18

  • 8/8/2019 eng_ana_II

    20/78

    Transpose

    Let A be a m n matrix. Then the n m matrix AT with (AT)ij = (A)ji is called the transposeofA. A matrix is called symmetric if AT = A holds.

    Example

    Determine the transpose of the following matrices

    A =

    1 2 3 45 6 7 8

    B =

    2 3 53 1 2

    5 2 7

    Solution

    AT =

    1 52 63 74 8

    = A is NOT symmetric BT =

    2 3 53 1 2

    5 2 7

    = B is symmetric

    The matrix transpose obeys the following rules

    For general m n matrices A and B, (A + B)T = AT + BT holds For every m n matrix A and every n p matrix B, (AB)T = BTAT holds.

    2.3.3 Matrix notation for linear systems of equations

    We are now in a position to write the linear equation system

    a11x1 + a12x2 + + a1nxn = b1... ...am1x1 + am2x2 + + amnxn = bm

    (2.2)

    in a much shorter way. To enable us to do this, we define the matrix

    A =

    a11 a1n...

    ...

    am1 amn

    and the column vectors

    x =

    x1...xn

    b = b1...

    bm

    (2.3)The matrix A is called the coefficient matrix and b is called the right hand side of the linearequation system. The equation system( 2.2) is equivalent to the matrix equation

    Ax = b (2.4)

    To solve this linear system of equations we use the Gauss elimination method discussed ear-

    lier.

    19

  • 8/8/2019 eng_ana_II

    21/78

    2.3.4 Matrix inverse

    The matrix inverse only makes sense for square matrices. It is defined as follows: The n nmatrix X is called the inverse of matrix A ifAX = In. If the matrix A has an inverse, the matrixA is called invertible or regular, if the matrix has no inverse it is called singular. For a regularn

    n matrix A, we denote its inverse by A1.

    Let A and B be invertible n n matrices, then A1A = In A1 is invertible and (A1)1 = A AB is invertible and (AB)1 = B1A1

    AT is invertible and (AT)1 = (A1)T

    The following statements are equivalent:

    A is invertible The linear equation system Ax = b is solvable for every b The linear equation system Ax = 0 has only the trivial solution x = 0The matrix inverse is very rarely computed as it is an expensive computation. In theory, one

    could compute the solution to a n n linear equation system Ax = b using the matrix inverse,since A1Ax = A1b and A1A = In so that A1Ax = Inx = x = A1b. However, this is notrecommended and Gauss elimination should be used.

    To compute the matrix inverse for a regular nn matrix A we proceed as follows: We denotethe matrix inverse by X and note that

    AX =

    a(1) a(n) x(1) x(n) = In = b(1) b(n) where a(1), , a(n) are column vectors which make up the columns of matrix A and x(1), , x(n)are column vectors which make up the inverse of A. To determine x(1), , x(n), we can solvelinear systems Ax(1) = b(1), , Ax(n) = b(n) for x(1), , x(n) where b(1), , b(n) are columnsof the identity matrix In. Then, the inverse of A is given by the matrix whose columns arex(1), , x(n).

    20

  • 8/8/2019 eng_ana_II

    22/78

  • 8/8/2019 eng_ana_II

    23/78

    In practise, we perform Gauss elimination on the matrix A to decide whether the vectors arelinearly independent or not. In particular for a m n matrix we have

    Ifr = n the vectors are linearly independent. Ifr < n the vectors are linearly dependent. Ifr = m the vectors are called generating. Ifr = n = m the vectors are generating and linearly independent and form a basis.

    Example

    Determine whether the following vectors are linearly dependent or not

    111

    and

    000

    SolutionWe form the matrix whose columns are the two vectors

    A =

    1 01 0

    1 0

    Next, we perform Gauss elimination on the system Ax = 0x1 x2 111 0 0

    1 0 01 0 0

    x1 x2 111 0 0

    0 0 00 0 0

    We observe that r = 1, m = 3 and n = 2. This means that r < n so that the system is linearlydependent and not generating.

    2.4 Determinants

    The determinate of a square matrix is an important aspect of linear algebra. It enables one to

    characterise whether a matrix is regular or singular. With help of determinants one can discuss

    linear equation systems. There also lies a connection between determinants and volumes. Further

    topics of linear algebra such as eigenvalues and eigenvectors require the use of determinants.

    2.4.1 Definition and properties

    A determinate is a number which can be computed from each square matrix A. The number iswritten as det A or |A|. Below, we illustrate some simple examples a11 a12a21 a22

    = a11a22 a12a21 (2.5)

    a11 a12 a13a21

    a22

    a23a31 a32 a33 = a11

    a22 a23

    a32 a33 a12

    a21 a23

    a31 a33

    + a13 a21 a22

    a31 a32 (2.6)

    22

  • 8/8/2019 eng_ana_II

    24/78

    To determine the explicit value for the case given in equation (2.6) we use the result from equa-

    tion (2.5).

    The definition of a determinate is a follows

    For a 1 1 matrix A = (a)det A = |A| = a

    Set

    A =

    a11 a12 a1na21 a22 a2n

    ......

    an1 an2 ann

    to be a n n matrix with n 2. For i = 1, 2, , n set A1i to be the (n 1) (n 1) matrixthat one obtains when the first row and the ith column has been deleted. Then the number

    det A = |A| = a11det A11 a12det A12 + a13det A13 + (1)n+1a1ndet A1n (2.7)

    is called the determinate ofA.ExampleDetermine the determinants of the following matrices

    A =

    3 21 2

    B =

    1 2 12 3 2

    4 1 2

    C =

    1 0 1 00 4 1 22 0 2 11 0 2 2

    Solution

    det A = 3 21 2 = 3 2 2 1 = 4

    det B =

    1 2 12 3 24 1 2

    = 1

    3 21 2 2

    2 24 2 + 1

    2 34 1

    = 1 4 2 (4) + 1 (10) = 2

    det C =

    1 0 1 02 4 1 22 0 2 11 0 2 2

    = 1

    4 1 20 2 10 2 2

    0

    2 1 22 2 11 2 2

    + 1

    2 4 22 0 11 0 2

    0

    2 4 12 0 21 0 2

    = 1 4 2 1

    2 2 1

    0 1

    0 2 + 2 0 2

    0 2+

    +1

    2

    0 10 2 4

    2 11 2 + 2

    2 02 0

    = 1[4 2 1 0 + 2 0] + 1[2 0 4 3 + 2 0]= 4

    Some important proprieties of determinants are listed below

    If two row of a square matrix are interchanged, the determinate changes sign

    aj bj cj

    ai bi ci

    =

    ai bi ci

    aj bj cj

    23

  • 8/8/2019 eng_ana_II

    25/78

    If a one row is multiplied by a constant factor and added to another row, the determinateremains unaltered

    ai + aj bi + bj ci + cj

    aj bj cj

    =

    ai bi ci aj bj cj

    If a row of a matrix is multiplied by a factor , the determinate also becomes multiplied bythat factor.

    ai bi ci

    =

    ai bi ci

    The determinate of a triangular matrix is equal to the product of the diagonal terms.

    For every n n matrix A, it holds that det A = det AT If the n n matrix A is invertible then det A = 0 and det A1 = 1

    detA

    2.4.2 Efficient calculation of determinants

    We have seen that the multiples of other rows of a matrix can be added to other rows without

    altering the determinate of a matrix. Also, we noted that when the matrix is in triangular form,

    the determinate is just simply the product of the diagonal terms. This means that we can use

    Gauss elimination to achieve efficient calculation of the determinate. After performing Gauss

    elimination, the determinate is just simply the product of the diagonal entries. Note that if rowsare exchanged during Gauss elimination, the determinate changes sign.

    Example

    Determine the determinant of the following matrix using Gauss elimination

    A =

    0 3 24 2 1

    2 1 1

    (2.8)

    Solution

    det A =

    0 3 24 2 12 1 1

    =

    2 1 14 2 10 3 2

    =

    2 1 10 0 10 3 2

    =

    2 1 10 3 20 0 1

    The determinate is then the product of the diagonal terms det A = 2 3 (1) = 6

    2.4.3 Determinants and linear equation systems

    The first thing to note is that when A is a n n matrix, then performing the Gauss eliminationprocedure leads one to the conclusion that det A = 0 exactly when a matrix has full rank (r = n).

    24

  • 8/8/2019 eng_ana_II

    26/78

    Furthermore the following statements are equivalent:

    The matrix A is invertible det A = 0

    After performing Gauss elimination r = n The linear equation system is solvable for every b. The solution of the linear equation system Ax = b is unique. The linear equation system Ax = 0 has only the trivial solution x = 0.If we set A to be a n n matrix, then the following holds The homogeneous linear equation system Ax = 0 has only the trivial solution when

    det A = 0. The linear equation system Ax = b is solvable for any right hand sides when det A = 0. The solution of the linear equation system Ax = b is unique when det A = 0.Now if we consider the solution set of a linear equation system with n equations and n un-

    knowns we have the following

    If det A = 0 the homogeneous linear equation system Ax = 0 has only the trivial solution. If det A = 0 the homogeneous linear equation system Ax = 0 has infinitely many solutions.

    If det A = 0 the linear equation system Ax = b has for a general right hand side vectorexactly one solution. If det A = 0 the linear equation system Ax = b has no solution or infinitely many solutions,

    depending on the right hand side vector.

    2.5 Eigenvalue Problems

    The eigenvalue problem is one of the most important exercises in linear algebra. In what follows

    we shall describe how eigenvalues and eigenvectors may be computed by hand for small matrices.

    2.5.1 Eigenvalues

    Let us consider a n n matrix A. We now ask the question, does a a (column) vector exist thatallows us to write the matrix vector product Ax in a particularly simple way? In other words, isthere a vector such that we can write Ax as a number multiplied by x?

    Eigenvalues and eigenvectors are defined as follows

    The number is called an eigenvalue of matrix A, if there exists a vector x such thatAx = x holds.

    If is an eigenvalue of the matrix A, then the vector x, for which Ax = x holds, is calledthe eigenvector of matrix A corresponding to eigenvalue .

    25

  • 8/8/2019 eng_ana_II

    27/78

    For the moment, we just want to characterise the eigenvalue of matrix A. As we describedabove, the value is an eigenvalue of A when there is a vector x = 0 such that Ax x = 0holds. The equation can also be written as Ax Inx = 0 or (A In)x = 0. The number istherefore the eigenvalue of the matrix A when the homogeneous equation system (AIn)x = 0has a nontrivial solution. It follows from the previous section, that this is exactly the case when

    det (A

    In

    ) = 0.

    Example

    Determine the eigenvalues of the following matrix

    A =

    2 1 01 2 1

    0 1 2

    Solution

    A

    In =

    2 1 01

    2

    1

    0 1 2 Next, we compute the determinate of this matrix

    det (A I) = (2 ) (2 )2 1 1 [(2 ) 0]= (2 ) (2 )2 2 = (2 + )(2 + 4 + 2)

    The cubic equation det (A I) = 0 has the following roots, 1 = 2, 2 = 2 +

    2 and3 = 2

    2 which are also in turn the eigenvalues of matrix A.

    In general for a nn matrix A we observe that det (AIn) is a polynomial ofnth degree in. We call the polynomial det (A

    In) the characteristic polynomial of matrix A and denote

    it by PA(). If the polynomial PA() has a root which is repeated k times, we call k thealgebraic multiplicity of eigenvalue .

    We have the following properties

    Every n n matrix has at least one eigenvalue. Every n n matrix has at most n eigenvalues. The algebraic multiplicity of every eigenvalue is greater or equal to 1 and less than or equal

    to n.

    Every n n matrix has exactly n eigenvalues when the algebraic multiplicity of eacheigenvalue is taken in to account.

    For every real matrix the coefficients of the characteristic polynomial are real. In this case,the eigenvalues are either real or appear in complex conjugate pairs.

    The following holds for the characteristic polynomial PA() = cnn + cn1n1 + +c1 + c0

    cn = (1)ncn1 = (

    1)n1(a11 + a22 +

    + ann)

    c0 = det A

    26

  • 8/8/2019 eng_ana_II

    28/78

    Example

    Determine the eigenvalues of the following matrix

    A =

    2 1 11 2 11 1 2

    Solution

    This time we use Gauss elimination to compute det (A In)

    det (A In) =

    2 1 11 2 11 1 2

    =

    1 1 2 1 2 1

    2 1 1

    =

    1 1 2 0 1 1 + 0 1 + 1 (2 )2

    =

    1 1 2 0 1 1 + 0 0 4 + 5 2

    = (1 )(4 5 + 2

    )

    Therefore we have PA() = ( 1)(4 5 + 2) = ( 1)2( 4). Therefore there aretwo eigenvalues 1 and 4.

    The eigenvalue = 1 has algebraic multiplicity 2.The eigenvalue = 4 has algebraic multiplicity 1.

    2.5.2 Eigenvectors

    Let us set A to be an n n matrix and to be an eigenvalue of this matrix. We have seen, thatwhen the determinate of the matrix (A

    In) is equal to zero, there exists an eigenvector x

    = 0

    to matrix A corresponding to the eigenvalue , if

    (A In)x = 0 (2.9)

    The set of eigenvectors corresponding to eigenvalue is equal to set the set of nontrivial so-lutions to the equation system (2.9). We call this set of nontrivial solutions the eigenspace of

    A corresponding to eigenvalue and is given the symbol E. The dimension ofE is calledthe geometric multiplicity of the eigenvalue . The geometric multiplicity is always greater orequal to 1.

    The span is the set of all linear combinations of a set of vectors which make up the eigenspace.

    27

  • 8/8/2019 eng_ana_II

    29/78

  • 8/8/2019 eng_ana_II

    30/78

    Example

    Given the following matrix

    A =

    2 1 11 2 11 1 2

    For which we have already found that its eigenvalues are 1 = 2 = 1, and 3 = 4, now computethe corresponding eigenspaces

    Solution

    Eigenspace for = 1. With help of Gauss elimination we havex1 x2 x3 1

    1 1 1 01 1 1 01 1 1 0

    x1 x2 x3 1

    1 1 1 00 0 0 00 0 0 0

    The solution set is {x3 = , x2 = , x1 = |, R}, thus

    E1 =

    |, R

    =

    10

    1

    +

    11

    0

    |, R

    = span

    10

    1

    ,

    11

    0

    This solution set has two free parameters. The dimension of E1 is therefore 2, we say that thegeometric multiplicity of eigenvalue = 1 is 2.Eigenspace for = 4. With help of Gauss elimination we have

    x1 x2 x3 1-2 1 1 01 2 1 01 1 2 0

    x1 x2 x3 11 2 1 00 3 3 00 3 3 0

    x1 x2 x3 11 2 1 00 3 3 00 0 0 0

    The solution has the form x3 = , x2 = , x1 = , R

    E4 =

    11

    1

    | R

    = span

    11

    1

    (2.10)

    The geometric multiplicity of = 4 is 1.

    2.5.3 Application

    We now consider the application of eigenvalues to the vibration of a simple 2 degree of freedom

    system. Consider a system in which two particles are joined by 3 springs shown in Figure 2.2.

    The equations of motion for particles 1 and 2 are

    m1u1 = k1u1 + k2(u2 u1)m2u2 = k3u2 k2(u2 u1)

    which we can rearrange as

    m1u1 + (k1 + k2)u1 k2u2 = 0m2u2 k2u1 + (k2 + k3)u2 = 0

    29

  • 8/8/2019 eng_ana_II

    31/78

  • 8/8/2019 eng_ana_II

    32/78

    Thus the solution is of the form x2 = , x1 = , R so that

    Ekm

    =

    11

    | R

    = span

    11

    The final solution to the problem is given by superposition of the different modes

    u1u2

    =

    2j=1

    Cju(j)

    where u(j) = x(j) sin(jt + j) and Cj is a constant and x(j) is thejth eigenvector. Thus we have

    u1u2

    = C1

    11

    sin

    k

    mt + 1

    + C2

    1

    1

    sin

    3k

    mt + 2

    where C1, C2, 1 and 2 are found from initial conditions.

    31

  • 8/8/2019 eng_ana_II

    33/78

    Chapter 3

    Functions of more than one variable

    Last semester we looked at differentiation and integration for functions of a single variable. We

    saw how we could differentiate and integrate a variety of functions and looked at their importance

    in engineering. However, many of the functions that we come across in engineering depend on

    more than one variable, for example the area of a rectangular plate of width x and breadth y isgiven by

    A = xy (3.1)

    The variables x and y are clearly independent of each other, so we say that the dependent variableA is a function of the two independent variables x and y. This is expressed by writing A = f(x, y)or A(x, y). Let us now consider the volume of a plate given by

    V = xyz (3.2)

    where the thickness of the plate is z. In this case V is the dependent variable and x , y and z are

    independent variables. We write V = f(x,y,z) or V(x,y,z).In general if we have a variable t which is a function ofn independent variables x1, x2, x3, , xn

    we can express this as

    t = f(x1, x2, x3, , xn) (3.3)As for functions of one variable f(x) which we discussed last semester, the function ofn variableshas an associated domain in ndimensional space, a range and a rule that assigns each ntupleof real numbers (x1, x2, x3, , xn) in the ndimensional domain with a real number z in therange.

    We do not wish to pursue deeper in to these issues as our interest here lies with the differenti-

    ation and integration of functions of more than one variable. We begin this chapter with looking

    at how we visualise functions of more than one variable, then we move on to the topic of partialdifferentiation. We finish the chapter by considering integrals of surfaces and volumes.

    3.1 Visualisation of Functions of Two and Three variables

    For purposes of illustration we restrict ourselves to functions of two or three independent vari-

    ables. Let us consider the function

    z = f(x, y) (3.4)

    which is a function of two independent variables x and y. We have two ways of visualising

    such a function: The first way uses level curves which curves in the x, y domain on which thefunction f(x, y) has a constant value. Level curves follow the same ideas as contours which areused to show elevation on a ordnance survey map. The second alternative is to plot the points

    32

  • 8/8/2019 eng_ana_II

    34/78

    corresponding to (x,y,z) with z = f(x, y) in a rectangular coordinate system with axis x,y,z.By doing this we end up with function being represented as a surface.

    Example

    We wish to visualise the function

    z = x2 + y2

    SolutionBy using MATLAB, we can make level surface plots and surface plots of this functions. Illustra-

    tions of both are shown below

    10 8 6 4 2 0 2 4 6 8 1010

    8

    6

    4

    2

    0

    2

    4

    6

    8

    10

    64

    20

    24

    6

    5

    0

    5

    0

    20

    40

    60

    80

    x

    x2+y

    2

    y

    Note that for functions of three independent variables, eg w = f(x , y, z) we cannot plotsurfaces like we did for functions of two variables. We can, however, plot level surfaces. Level

    surfaces are like level curves, they represent a surface on which w is constant.

    3.2 Partial Differentiation

    We recall from last semester that the derivative of a function f(x) of one variable measures theslope of the tangent to the graph of the function. If we now consider a function z = f(x, y)of two variables, slope no longer makes sense because z = f(x, y) defines a surfaces in threedimension. Consider the following two cases:

    Lets start with the simplest surface z = 0 ie, a surface which is flat in both the x and ydirections, as shown in Figure 3.1 (a). If we move along a line for which y is fixed and x

    is increasing, the slope of this line will be 0. Similarly if we move along a line for which xis fixed and y is increasing this line will also have zero slope.

    Next we consider the surface z = x + 2y, as shown in Figure 3.1 (b). For this example,the slope is equal to 1 if we move along a line of fixed y and increasing x. If, however,we move along a line for which x is fixed and y is increasing then we find that the slope isequal to 2.

    It turns out that for a general surface the slope will be different depending on which direction

    we move in. To measure this a new kind of derivative is introduced called the partial derivative.

    Formally the partial derivative off(x, y) with respect to x is defined as

    limx0

    f(x + x, y) f(x, y)x

    (3.5)

    33

  • 8/8/2019 eng_ana_II

    35/78

    5

    0

    5

    5

    0

    5

    1

    0.5

    0

    0.5

    1

    0

    xy5

    0

    5

    5

    0

    5

    20

    10

    0

    10

    20

    x

    x+2 y

    y

    (a) (b)

    Figure 3.1: Visualisation surfaces for z = 0 and z = x + 2y

    This means that we differentiate f(x, y) with respect to x while keeping y constant (fixed). Thepartial derivative off(x, y) with respect to x is the same as measuring the slope in the x direction.We denote this partial derivative by

    f

    xor f/x

    Note the use of curly dees to distinguish between partial differentiation and normal differ-

    entiation. In writing care must be taken to distinguish between

    df

    dx ,

    f

    x and

    f

    x (3.6)

    In a similar way to the partial derivative of f(x, y) with respect to x, we define the partialderivative off(x, y) with respect to y as

    f

    y= lim

    x0f(x, y + y) f(x, y)

    y(3.7)

    which we determine by differentiating f(x, y) with respect to y by keeping x constant. Thispartial derivative is the same as measuring the slope in the y direction.

    If we know both fx

    and fy

    we can work out slope of the surface for any direction. If we

    consider a direction at an angle to the x axis the slope is given by

    f

    xcos +

    f

    ysin (3.8)

    we call this the directional derivative.

    34

  • 8/8/2019 eng_ana_II

    36/78

    Example

    Given the function f(x, y) = x2y3 + 3y + x, determine its partial derivative with respect to x andy. Hence determine its directional derivative for a direction at angle to the x axis.Solution

    To find the partial derivative of f(x, y) with respect to x, we differentiate f(x, y) and keep yconstant. Thus

    fx

    = 2xy3 + 1

    Similarly, we obtain the partial derivative of f(x, y) with respect to y, by differentiating f(x, y)while keeping x constant

    f

    y= 3x2y2 + 3

    We obtain the directional derivative by applying formula (3.8), giving

    (2xy3 + 1) cos + (3x2y2 + 3) sin

    Here are some more examples

    Example

    Determine f/x and f/y when f(x, y) is

    a) x2y2 + 3xy x + 2 b) sin(x2 3y)

    Solution

    a) For f(x, y) = x2y2 + 3xy x + 2 we havef

    x = 2xy2

    + 3y 1f

    y = 2x2

    y + 3x

    b) For f(x, y) = sin(x2 3y) we havef

    x= cos(x2 3y)

    x(x2 3y) = 2x cos(x2 3y) f

    y= 3cos(x2 3y)

    In the examples we have considered so far we have used partial differentiation in the context

    of function of two variables. However, the concept may be extended to functions of as many

    variables as we please. For a function f(x1, x2, xn) ofn variables, the partial derivative withrespect to xi is given by

    f

    xi= lim

    xi0f(x1, x2, , xi + xi, xi+1, , xn) f(x1, x2, , xn)

    xi

    in practise we obtain this by differentiating the function with respect to xi while keeping all othern 1 variables constant.

    35

  • 8/8/2019 eng_ana_II

    37/78

    Example

    Determine f/x, f/y and f/z when

    f(x , y, z) = xyz2 + 3xy z

    Solution

    We obtain that

    f

    x= yz2 + 3y

    f

    y= xz2 + 3x

    f

    x= 2xyz 1

    3.2.1 Chain ruleWe already came across the chain rule when we performing standard differentiation for functions

    of a single variable. We now wish to extend these ideas to functions of more than one variable.

    Lets consider the case where z = f(x, y) and x and y are themselves functions of two indepen-dent variables s and t. This means that we can also write z as a function of s and t, say F(s, t).If we want to differentiate z with respect to s or t we have

    z

    s=

    z

    x

    x

    s+

    z

    y

    y

    s

    z

    t=

    z

    x

    x

    t+

    z

    y

    y

    t(3.9)

    We can write this in matrix notation as followszszt

    =

    xs

    ys

    xt

    yt

    zxzy

    (3.10)

    This result is called the chain rule.

    36

  • 8/8/2019 eng_ana_II

    38/78

    Example

    Find T/r and T/ when

    T(x, y) = x2 + 2xy + y3x2

    and x = r cos and y = r sin

    SolutionBy the chain rule

    T

    r=

    T

    x

    x

    r+

    T

    y

    y

    r

    In this exampleT

    x= 2x + 2y + 2xy3

    T

    y= 2x + 3x2y2

    andx

    r= cos

    y

    r= sin

    so that

    T

    r= (2x + 2y + 2xy3)cos + (2x + 3x2y2)sin

    = (2r cos + 2r sin + 2r4 cos sin3 )cos + (2r cos + 3r4 cos2 sin2 )sin

    Similarly

    T

    = (2x + 2y + 2xy3)r sin + (2x + 3x2y2)r cos =

    (2r cos + 2r sin + 2r4 cos sin3 )r sin + (2r cos + 3r4 cos2 sin2 )r cos

    Example

    Find dR/ds whenR(s) = cosh(x2 + 3y)

    and x = s2 + 3s and y = sin sSolution

    For this example, x and y are functions ofs only so

    dR

    ds=

    R

    x

    dx

    ds+

    R

    y

    dy

    ds

    which gives

    dR

    ds= 2x(2s + 3) sinh(x2 + 3y) + 3 cos s sinh(x2 + 3y)

    = 2(s2 + 3s)(2s + 3) sinh((s2 + 3s)2 + 3 sin s) + 3 cos s sinh((s2 + 3s)2 + 3 sin s)

    = 2(2s3 + 9s2 + 9s) sinh((s2 + 3s)2 + 3 sin s) + 3 cos s sinh((s2 + 3s)2 + 3 sin s)

    3.2.2 Higher order partial derivatives

    So far we have considered functions like f(x, y) and found its partial derivatives fx and fy . Ifthe partial derivatives are also functions of x and y, they can also be differentiated with respect

    37

  • 8/8/2019 eng_ana_II

    39/78

    to x an y. We define higher order partial derivatives as follows

    2f

    x2=

    x

    f

    x

    2f

    y2 =

    yf

    y

    2f

    xy=

    x

    f

    y

    2f

    yx=

    y

    f

    x

    If fx

    , fy

    , 2f

    xyand

    2fyx

    exist and are continuous, then it follows that

    2f

    xy

    =2f

    yx

    (3.11)

    Note, however, that if the conditions are not fulfilled these so called mixed partial deriva-

    tives are not equal.

    Example

    For the function

    f(x, y) = sin x cos y + x3ey (3.12)

    find all the second order partial derivatives

    Example

    First we find the first order partial derivatives

    fx

    = cos x cos y + 3x2eyfy

    = sin x sin y + x3ey

    Then by differentiating these expressions again we can find the second order derivatives

    2f

    x2= sin x cos y + 6xey

    2f

    y2= sin x cos y + x3ey

    2f

    xy

    =

    cos x sin y + 3x2ey

    2f

    yx= cos x sin y + 3x2ey

    In this case, we have that 2f

    xy=

    2fyx

    3.2.3 Total differentiation

    Let us consider the function z = f(x, y) which is a function of two variables x and y. Now letx represent a small change in x, y a small change in y and z a small change in z.

    It follows thatz = f(x + x, y + y) f(x, y)

    38

  • 8/8/2019 eng_ana_II

    40/78

    we can rewrite this as the sum of two terms, the first of which shows the change in z due to achange in x and the second which shows the change in z due to a change in y

    z = [f(x + x, y + y) f(x, y + y)] + [f(x, y + y) f(x, y)]

    Next, we multiply the first term by x/x = 1 and the second term by y/y = 1

    z =[f(x + x, y + y) f(x, y + y)]

    xx +

    [f(x, y + y) f(x, y)]y

    y

    By letting x, y and z tend to zero we get

    dz =f

    xdx +

    f

    ydy (3.13)

    In this expression dx, dy and dz are called differentials. If z = f(x) so that it is a function ofone variable, the formula takes the form

    dz =df

    dxdx (3.14)

    Ifw = f(x,y,z) is a function of three variables we have

    dw =f

    xdx +

    f

    ydy +

    f

    zdz (3.15)

    We can use the idea of differentials to calculate errors. If z = f(x, y) and x and y areerrors in x and y, then the error in z is approximately given by

    z fx

    x + fy

    y (3.16)

    Example

    We want to estimate

    (3.01)2 + (3.97)2

    Solution

    Let z = f(x, y) =

    x2 + y2. If we set x = 3 and y = 4 we can easily compute z =

    32 + 42 =

    5. Now

    (3.01)2 + (3.97)2 is z when x is increased by x = 0.01 and when y is decreased by0.03, ie y = 0.03

    z f

    x x +

    f

    y y

    =1

    22x(x2 + y2)1/2x +

    1

    22y(x2 + y2)1/2y

    =x

    x2 + y2x +

    yx2 + y2

    y

    =

    3

    5 0.01

    +

    4

    5 (0.03) = 0.018

    So

    (3.01)2 + (3.97)2 5 + z = 5 0.018 4.98

    39

  • 8/8/2019 eng_ana_II

    41/78

    Example

    The height of a cylinder is under measured by 3% and the raduis is over measured by 2% we wishto estimate the percentage error in the volume.

    Solution

    The volume of a cylinder is given by V = r2h so

    Vr

    = 2rh Vh

    = r2

    So that the error in the volume may be written as

    V Vr

    r +V

    hh

    = 2rhr + r2h

    As we are interested in the percentage error, we divide this equation by V

    V 2rhr2h

    r + r2

    r2hh

    =2r

    r+

    h

    h

    From the question we know that rr

    = 2100

    and hh

    = 3100

    giving VV

    = 1100

    . This means that the

    volume is overestimated by 1%.

    3.3 Integration

    As well as being able to differentiate multivariate functions we also need to be able to integratethem. In engineering, three types of integrals commonly occur: line integrals, surface integrals

    and volume integrals. In this section we shall look at how these may be performed.

    3.3.1 Line integrals

    Let us consider the integral ba

    f(x, y)dx where y = g(x) (3.17)

    we can perform the integration in the usual way, once we have substituted y for g(x)ba

    f(x, g(x))dx (3.18)

    Clearly the value of the integral depends on the function y = f(x). We can interpret it as

    evaluatingba

    f(x, y)dx along the curve y = g(x), as shown in Figure 3.2. The result of thisintegral is no longer the area under the curve and to distinguish it from our earlier integrals we

    call it a line integral.

    This isnt the only type of line integral, other examples are

    C

    f(x, y)dxC

    f(x, y)dsC

    f(x, y)dtC

    [f1(x, y)dx + f2(x, y)dy]

    40

  • 8/8/2019 eng_ana_II

    42/78

    a b

    AB

    C

    x

    y

    Figure 3.2: Illustration of a line integral

    Note that in the above the symbol C, this means that the integral is evaluated along the curve orpath C. The path is not restricted to two dimensions and may be in as many dimensions as weplease. It is generally preferred to use C instead of the usual limits a and b when talking aboutline integrals, as the limits of integration are usually clear from how C is defined.

    ExampleEvaluate

    C

    xydx from (1, 0) to (0, 1) along the curve C that is the portion ofx2 + y2 = 1 in thefirst quadrant.

    (1,0)

    (0,1)

    x

    y

    C

    SolutionOn this curve y =

    1 x2 so that

    C

    xydx =

    01

    x

    1 x2dx =1

    2

    2

    3(1 x2)3/2

    01

    = 13

    Example

    Evaluate the integral

    I =

    C

    [(x2 + 2y)dx + (x + y2)dy]

    from (0, 1) to (2, 3) along the curve C defined by y = x + 1Solution

    Since y = x + 1 then dy = dx and

    I =

    20

    [(x2 + 2(x + 1)) + (x + (x + 1)2)]dx

    =

    20

    (2x2 + 5x + 3)dx =

    2

    3x3 +

    5

    2x2 + 3x

    20

    =64

    3

    41

  • 8/8/2019 eng_ana_II

    43/78

    Example

    Evaluate C

    (zdx + x2dy 2ydz)

    along the curve C which is specified parametrically as x = t, y = t2 and z = t3 from (0, 0, 0) to

    (1, 1, 1).SolutionOn the curve C, dx = dt, dy = 2tdt and dz = 3t2dt. Also at the point (0, 0, 0) t = 0 and at thepoint (1, 1, 1) t = 1 so that

    C

    (zdx + x2dy 2ydz) =10

    (t3dt + 2t3dt 6t4dt)

    =

    10

    (3t3 6t4)dt

    = 34

    t4

    6

    5

    t51

    0

    =

    9

    20

    As we mentioned earlier, some line integrals may be given in the formC

    f(x, y)ds where sindicates the arc length along the curve defined by y = g(x). One of the simplest examples ofsuch integrals is

    C

    ds which is equal to the length of the curve C. To evaluate this kind integralswe note that ds is given by

    ds =

    1 +dydx

    2dx in Cartesian form

    ds = dxdt

    2+ dydt

    2dt in parametric form

    ds =

    r2 +drd

    2d in polar form

    Furthermore, if a line integral is such that the integration is performed around a closed (sim-

    ple)curve, then we denote this type of integral byC

    ds with the convention that the integral isevaluated by travelling around C in an anticlockwise direction.

    42

  • 8/8/2019 eng_ana_II

    44/78

    Example

    Evaluate the integral C

    dsx2 + y2

    where C is the unit square with vertices (1, 1), (1, 1), (1, 1), (1, 1).

    x

    y

    (1,1)(1,1)

    (1,1)(1,1)

    AB

    D E

    Solution

    We can break the integral into four partsC

    =

    BA

    +

    DB

    +

    ED

    +

    AE

    Along AB y = 1 and ds = dx Along BD x = 1 and ds = dy Along DE y = 1 and ds = dx

    Along EA x = 1 and ds = dyThus the integral becomes

    C

    dsx2 + y2

    =

    11

    dx1 + x2

    +

    11

    dy1 + y2

    +

    11

    dx1 + x2

    +

    11

    dy1 + y2

    = 4

    11

    dt1 + t2

    = 4[sinh1 t]11 = 8 sinh1 1

    3.3.2 Surface integralsWe recall the definition of an integral of a function f(x) from Engineering Analysis 1,

    ba

    f(x)dx = limn

    xi 0

    ni=1

    f(xixi

    where a = x0 < x1 < < xn = b, xi = xi xi1 and xi1 xi xi. We remember thatthis integrals is equal to the area under the curve f(x) between x = a and x = b, as shown inFigure 3.3.

    We now wish to extend this to integrals of functions of more than one variable. Next we

    consider z = f(x, y) and a region R of the xy plane, as illustrated in Figure 3.4. We define the

    43

  • 8/8/2019 eng_ana_II

    45/78

    *r

    n10

    ba

    f(x )

    rx

    *

    rx

    r1x xxx0 x

    f(x)

    Figure 3.3: Integral of a function of a single variable

    integral off(x, y) over R by

    R

    f(x, y)dA = limn

    Ai 0

    ni=1

    f(xi, yi)Ai (3.19)

    where Ai is an elemental area of R and (xi, yi) is a point in Ai. As we have already seenf(x, y) represents a surface and so f(xi, yi)Ai = ziAi is the volume between the z = 0 andz = zi whose base cross section is Ai. The integral is the limit of the sum of all such volumesand so it is the volume under the surface of z = f(x, y) above R.

    A

    x

    y

    z

    i

    Figure 3.4: Integral of a function of two variables

    If we introduce a series of lines which are parallel to the x and y axis, as shown on Figure 3.5,we can write Ai = xiyi, giving

    R

    f(x, y)dA =

    R

    f(x, y)dxdy = limn

    ni=1

    f(xi, yi)xiyi (3.20)

    Note that we can evaluate integrals of the type R f(x, y)dxdy as repeated single integrals in xand y and consequently they are usually called double integrals. For the particular case of theintegral

    R

    dA we note that this equal to the area of region R.

    44

  • 8/8/2019 eng_ana_II

    46/78

  • 8/8/2019 eng_ana_II

    47/78

    Example

    Evaluate the integral 10

    31

    (x2 + y2)dxdy

    Solution

    If we integrate with respect to x first, then we obtain10

    31

    (x2 + y2)dxdy =

    10

    1

    3x3 + y2x

    x=3x=1

    dy

    =

    10

    26

    3+ 2y2

    dy =

    26

    3y +

    2

    3y310

    =28

    3

    Alternatively with respect to y first

    1

    0

    3

    1

    (x2 + y2)dxdy = 3

    1x2y +

    1

    3

    y3y=1

    y=0

    dx

    =

    31

    x2 +

    1

    3

    dx =

    28

    3

    Example

    Evaluate

    R(x2 + y2)dA over a triangle with vertices (0, 0), (2, 0) and (1, 1).

    Solution

    x

    y

    1 2

    y=2xy=x1

    x

    y

    1 2

    1

    x

    y

    1 2

    1

    First, integrating with respect to x first gives R

    (x2 + y2)dA =

    10

    x=2yx=y

    (x2 + y2)dxdy

    =

    10

    1

    3x3 + y2x

    x=2yx=y

    dy =

    10

    8

    3 4y + 4y2 8

    3y3

    dy =4

    3

    Next integrating with respect to y first R

    (x2 + y2)dA =

    10

    y=xy=0

    (x2 + y2)dydx +

    21

    y=2xy=0

    (x2 + y2)dydx

    Here the integrals are10

    y=xy=0

    (x2 + y2)dydx =

    10

    x2y +

    1

    3y3y=xy=0

    dx =

    10

    4

    3x3dx =

    1

    3

    2

    1

    y=2x

    y=0

    (x2 + y2)dydx = 2

    1x2y +

    1

    3

    y3y=2x

    y=0

    dx = 2

    1

    8

    3 4x + 4x2

    4

    3

    x3dx = 1So

    R

    (x2 + y2)dA = 1 + 13

    = 43

    .

    46

  • 8/8/2019 eng_ana_II

    48/78

    3.3.3 Volume integrals

    Volume integrals are evaluated by carrying out three successive integrals. Volume integrals are

    of the form V

    dV (3.22)

    and are called triple integrals. They are evaluated in the same way as double integrals, westart by evaluating the inner integral and work outwards. The main difficulty is associated with

    determining the correct limits for the integration. To aid, this one may make a sketch of the region

    to be integrated. Also useful to note that if integrals are evaluated in the order x, y, z then thelimits on the y integral may depend on z but not on x.Example

    A cube 0 x,y,z 1 has a variable density given by = 1 + x + y + z, what is the total massof the cube

    Solution

    The total mass is given by

    M =

    V

    dV

    =

    10

    10

    10

    (1 + x + y + z)dxdydz =

    10

    10

    x +

    x2

    2+ xy + xz

    10

    dydz

    =

    10

    10

    3

    2+ y + z

    dydz =

    10

    3y

    2+

    y2

    2+ yz

    10

    dz

    =

    10

    (2 + z)dz =

    2z +

    z2

    2

    10

    =5

    2

    47

  • 8/8/2019 eng_ana_II

    49/78

    Chapter 4

    Sequences and Series

    This chapter investigates sequences and series and there importance in engineering. Sequences

    are important and arise if a continuous function is measured or sampled at periodic intervals.

    They also arise when attempts are made to find approximate solutions of equations that model

    physical phenomena. Closely related to sequences are series. They are important as certainmathematical problems can expressed as series. Two well known series that we shall consider

    are the Taylor and Maclaurin series.

    4.1 Sequences and Series

    A sequence is a set of numbers which are written down in a specific order. Examples of se-

    quences are 2, 4, 6, 8 and 7, 9, 11, 13. We call each number a term of the sequence. Thecontinuation dots are sometimes used to illustrate that the sequence continues.

    Often sequences arise from the evaluation of a function, for example if we consider the set

    of whole number {0, 1, 2, 3, }, the set of values {f(0), f(1), f(2), f(3), } which arise fromevaluating the function on the set of whole numbers is also called a sequence. In this case, we give

    the identify terms in the sequence as follows f0 = f(0), f1 = f(1) and so on. Thus the first termin the sequence is f0, the second term in the sequence is f1. If the sequence has a given numberof terms such as {f0, f1, , fn} we call it a finite sequence. Sequences like {f0, f1, , f}which extend to infinity are called infinite sequences.

    If the next term in a sequence can be generated from some combination of previously com-

    puted terms, the formula which gives the next term is called a recurrence relation.

    48

  • 8/8/2019 eng_ana_II

    50/78

    Example

    One way to compute square roots is Newton formula. This states that if x is an approximationto the square root ofa, then a/x is also an approximation to

    a. A better approximation can be

    obtained by taking an average of the two values. Thus ifx0 is an approximation to

    a then

    x1 =

    1

    2

    x0 +

    a

    x0

    similarly

    x2 =1

    2

    x1 +

    a

    x1

    is a better approximation than x0. In general xn+1 given by

    xn+1 =1

    2

    xn +

    a

    xn

    is better approximation than xn, this is an example of recurrence relation. If we wish to compute2 then starting with x0 = 1 gives the sequence

    x0 = 1 x1 =3

    2= 1.5 x2 =

    17

    12= 1.416666(6dp) x3 =

    577

    408= 1.414216(6dp)

    A series is obtained when terms of a sequence are added. For example, if a sequence contains

    2, 4, 6, 8, 10, then by adding the terms we obtain the series

    2 + 4 + 6 + 8 + 10

    We can use sigma notation to write a series more concisely. For example, if a sequence contains

    the integers 0, 1, 2, , n a series is given by

    Sn = 0 + 1 + 2 + + n =n

    k=0

    k

    Example

    Use summation notation to write the series consisting of a) the first six odd numbers and b) the

    first seven even numbers.

    Solution

    a) A series which sums the first six odd numbers is given by

    6k=1

    (2k 1) = 1 + 3 + 5 + 7 + 9 + 11

    b) A series which sums the first seven even numbers is given by

    7k=1

    2k = 2 + 4 + 6 + 8 + 10 + 12 + 14

    4.1.1 Graphical representation of sequences

    Sometimes it helpful to display a sequence graphically. We can do this by plotting each term in

    the sequence on a standard x, y graph. For example, terms in a particular sequence are defined

    49

  • 8/8/2019 eng_ana_II

    51/78

    by xn = 1 + (1)n/n, starting with n = 1 and considering terms up to n = 10 gives to 2dp0, 1.50, 0.67, 1.25, 0.80, 1.17, 0.86, 1.12, 0.89, 1.10

    By plotting each term of the sequence as a graph, where the terms index is used as the x coor-dinate and the terms value is used as the y coordinate, gives the plot shown in Figure 4.1. From

    1 2 3 4 5 6 7 8 9 10

    0

    0.5

    1

    1.5

    x

    xn

    Figure 4.1: Graph of the sequence xn = 1 + (1)n/n

    this figure, we can observe that values of the sequence oscillate around 1 and become closer to 1as n increases. Thus plotting a sequence can often give us valuable insights in to its behaviour.

    4.2 Finite sequences and series

    We now wish to look at finite sequences and series in more detail.

    4.2.1 Arithmetical sequences and series

    An arithmetical sequence is a sequence in which the difference between successive terms is a

    constant number. Examples of arithmetical sequences are {0, 3, 6, 9, 12, 15} and {1, 0, 1, 2, 3}.Traditionally arithmetical series were called arithmetical progressions, however the former

    name is now preferred. We can write arithmetical sequences as {a + kd}n1k=0 where a is thefirst term, d is the difference between the terms and n is the number of terms in the sequence. So,for the first example a = 0, d = 3 and n = 6, for the second example a = 1, d =

    1 and n = 5.

    The sum of terms in an arithmetical sequence is an arithmetical series. In general this canbe written as

    Sn = a + (a + d) + (a + 2d) + + [a + (n 1)d] =n1k=0

    (a + kd) (4.1)

    We can obtain an expression for the sum ofn terms in the series. If we expand the summationand then write it in reverse order we have

    Sn = a + (a + d) + (a + 2d) + + [a + (n 1)d]Sn = [a + (n 1)d] + [a + (n 2)d] + [a + (n 3)d] + a

    Now if we add these expressions we obtain

    2Sn = [2a + (n 1)d] + [2a + (n 1)d] + [2a + (n 1)d] + [2a + (n 1)d]

    50

  • 8/8/2019 eng_ana_II

    52/78

    Thus giving

    Sn =1

    2n[2a + (n 1)d] (4.2)

    as the sum ofn terms of an arithmetical series.Example

    How many terms of the arithmetical sequence 2, 4, 6, 8,

    will give rise to 420?

    SolutionFor this example, a = 2, d = 2, Sn = 420, we need to find n

    Sn = 420 =1

    2n[4 + 2(n 1)] = 2n + n(n 1)

    Thus

    n2 + n 420 = 0 n = 1

    1 4(420)2

    Hence n = 20 or n = 22, since n must be a positive number, n = 20Example

    A building company offers to place a foundation pile at a cost of 100 pounds for the first metre,110 pounds for the second metre and increasing at a cost of 10 pounds per metre thereafter. It is

    decided to set piles at 5 metres.

    a) What is the the total cost of the piling?

    b) What is the cost of piling the last metre?

    Solution

    a) The cost is the sum of the arithmetic series where a = 100, b = 10 and n = 40

    Sn = 52

    [2(100) + (5 1)10] = 600 pounds

    b) The cost of piling the last metre is given by the fifth term in the sequence. This 100 + (5 1)10 = 140 pounds.

    4.2.2 Geometric sequences and series

    A geometric sequence is one in which the ratio of successive terms is a constant number. Ex-

    amples of geometric sequences are {3, 6, 12, 24, 48} and {1, 12

    , 14

    , 116

    , 132

    }. A geometricsequence always takes the form

    {ark

    }n1k=0 where a is the first term in the sequence, r is the ratio

    between the terms and n is the number of terms in the sequence. Thus in the first example a = 3,r = 2 and n = 5, for the second example a = 1, r = 1

    2and n = 5. Geometric sequences are

    sometimes still called geometric progressions. The sum of a geometric sequence is a geometric

    series. The general geometric series has the form

    Sn = a + ar + ar2 + ar3 + + arn1 =

    n1k=0

    ark (4.3)

    To obtain the sum Sn, we first multiply the equation by r

    rSn = ar + ar2 + ar3 + ar4 + + arn

    then if we subtract this from Sn we obtain

    (1 r)Sn = a arn

    51

  • 8/8/2019 eng_ana_II

    53/78

    so that

    Sn =n1k=0

    ark = a1 rn1 r (4.4)

    Example

    An insurance company garantees that, for a fixed annual premium payable at the beginning of

    each year, for a period of 25 years, the return will be equal to the premium paid together with 3%compound interest. For an annual premuim of 250 pounds what is the guaranteed sum at the end

    of25 years?Solution

    The first year premium earns interest for 25 years and so grantees 250(1 + 0.03)25

    The second year premium earns interest for 24 years and so grantees 250(1 + 0.03)24

    ...

    The final year premium earns interest for 1 year and so grantees 250(1 + 0.03)The total sum is therefore

    250[(1.03) + (1.03)2 + + (1.03)25]the term inside the square brackets is a geometric sequence. Taking a = 1.03, r = 1.03 andn = 25 gives the total cost as

    250

    1.03

    (1 1.0325)(1 1.03)

    = 9388 pounds

    4.2.3 Other finite series

    Sometimes engineers are required to use finite series other than arithmetical and geometrical

    sequences. We investigate a method that can be generalised to finding the sums of different finite

    series and apply it to the case of finding the sum of squares.

    We wish to find the summation of squares

    Sn = 12 + 22 + 32 + + n2 =

    nk=1

    k2

    To do this we use the identity (k + 1)3 k3 = 3k2 + 3k + 1. This means we can writen

    k=1[(k + 1)

    3

    k3

    ] =

    nk=1(3k

    2

    + 3k + 1)

    In this expression, we can expand the left hand side to find that

    23 13 + 33 23 + 43 33 + + (n + 1)3 n3 = (n + 1)3 1and the right hand side is equal to

    3n

    k=1

    k2 + 3n

    k=1

    k +n

    k=1

    1

    We already know that nk=1 k = 12n(n + 1) and nk=1 1 = n so this means that(n + 1)3 1 = 3

    nk=1

    k2 +3n

    2(n + 1) + n

    52

  • 8/8/2019 eng_ana_II

    54/78

    a

    a+

    a

    nN

    an

    Figure 4.2: Convergence of a sequence

    which finally gives

    Sn =n

    k=1

    k2 = 16

    n(n + 1)(2n + 1) (4.5)

    4.3 Limit of a sequence

    4.3.1 Convergent sequences

    We previously saw how we could use Newtons formula to gain an ever improving approximation

    to the square root of a value. Starting with 1 we obtained the following improving approximationsto

    2

    x0 = 1x1 = 1.50x2 = 1.42

    if the process is continued we would obtain

    x22 = 1.41x23 = 1.41

    indeed for n 22 we have xn = 1.41 to 2dp. We observe that the difference between x22 andx23 is indistinguishable when the numbers are expressed to two decimal places, in other wordsthe difference is less than the rounding error. When this happens, we say that the sequence tends

    to a limit or has a limiting value or converges or that it is convergent.Given a general sequence {ak}k=0 we say it has the limiting value a as n becomes large, if

    given a small positive number , an differs from a by less than for all sufficiently large n, ie

    an a as n if, given any > 0 , there is a numberN such that |a an| < for alln > N

    We remark that stands for tend to the value or converges to the limit. An alternativenotation would be to write

    limn

    an = a (4.6)

    We illustrate this process graphically in Figure 4.2.Note that the limit of a sequence need not actually be an element of the sequence. For example

    {n1}n=1 has the limit of0, but 0 is not an element of the sequence.

    53

  • 8/8/2019 eng_ana_II

    55/78

    4.3.2 Proprieties of convergent sequence

    It turns out that a convergent sequence satisfies a number of properties which are given below

    Every convergent sequence is bounded; that is, if {an}n=0 is convergent then there is apositive number M such that |an| < M for all n.

    If{an} has limit a and {bn} has limit b then {an + bn} has limit a + b {an bn} has limit a b {anbn} has limit ab {an/bn} has limit a/b for bn = 0 and b = 0.

    Example

    Find the limits of the sequence {xn}n=0 when xn is given by

    a) xn =n

    n + 1b) xn =

    2n2 + 3n + 1

    5n2 + 6n + 2

    Solution

    a) xn = n/(n + 1) leads to the sequence {0, 12 , 34 , 45 , }. Already from these values it seams thatxn 1 as n . We can prove this by rewriting xn as

    xn = 1 1n + 1

    As n increases 1/(n + 1) becomes smaller and smaller, thus we have

    limn

    n

    n + 1= 1

    b) Now considering xn =2n2+3n+15n2+6n+2

    it is easiest to divide the numerator and denominator by the

    highest power ofn, giving

    xn =2 + 3

    n+ 1

    n2

    5 + 6n

    + 2n2

    We have that limn 2 + 3n +1n2

    = 2 and limn 5 + 6n +2n2

    = 5. Hence we have that

    limn 2n

    2

    + 3n + 15n2 + 6n + 2 = 25

    4.3.3 Divergent sequences

    To illustrate the fact that not all sequences converge we consider the following geometric se-

    quence

    an = rn r constant (4.7)

    For this sequence we have

    limn an = 0 (1 < r < 1)1 (r = 1)

    54

  • 8/8/2019 eng_ana_II

    56/78

    ifr > 1 the sequence increases without bound as n and we say that it diverges. Ifr = 1the sequence has takes the values of alternating 1, and has no limiting value. If r < 1 thesequence is unbounded and the terms alternate in sign.

    4.3.4 Cauchys test for convergence

    The following test for convergence is used in a computational context. If we do not know the limit

    a to which a sequence {an} converges we cannot measure |a an|. However, in a computationalcontext where we often use a recurrence relationship to compute the sequence {an}, we say thatis has converged when all subsequent terms yield the same level of approximation required. We

    say that a sequence of finite terms is convergent if for any n and m > N

    |an am| < (4.8)

    where is specified. This means that a sequence terns to a limit if all the terms of the sequencefor n > N are restricted to an interval that can be made arbitrarily small by making N arbitrarily

    large. This is called Cauchys test for convergence.

    4.4 Infi nite Series

    We must exercise care when dealing with infinite series as mistakes can be made if they are not

    dealt with correctly. If we consider the series

    S = 1 2 + 4 8 + 16 32 +

    then by multiplying it by 2 we obtain

    2S = 2 4 + 8 16 + 32 64 +

    if we add these equations we might come to the conclusion that 3S = 1 or S = 13

    , however this

    result is clearly incorrect. To avoid making such mistakes we have introduce methods for dealing

    with infinite series correctly.

    4.4.1 Convergence of an infinite series

    We have already seen that series and sequences are closely related. When the sum Sn of a seriesofn terms tends to a limit as n

    we say it is convergent. Provided that we can express Sn

    is a simple form it is usually easy to say whether or not the series converges. When considering

    infinite series, the sequence of partial terms is taken to the limit.

    55

  • 8/8/2019 eng_ana_II

    57/78

    Example

    We wish to examine the following series for convergence

    a) 1 + 3 + 5 + 7 + 9 + b) 12 + 22 + 32 + 42 +

    c) 1 +1

    2+

    1

    4+

    1

    8+

    1

    16+

    d)1

    1 2 +1

    2 3 +1

    3 4 +1

    4 5 +

    a) The first case is an arithmetic sequence which we can write as

    Sn =n1k=0

    (2k + 1) = 1 + 3 + 5 + + (2n 1) = n2

    we can see that Sn as n and the series does not converge to a limits. It is an exampleof a divergent series.

    b) The second case can be written as

    Sn = 12 + 22 + 32 + + n2 = 1

    6n(n + 1)(2n + 1)

    This is another example where Sn as n , ie the series is divergent.c) For the third example

    Sn = 1 +1

    2+

    1

    4+ + 1

    2n1

    we have a geometric sequence, the sum can be written as

    Sn =1 1

    2n

    1 12

    = 2

    1 1

    2n

    we have that as n , Sn 2, hence the sum converges to 2.d) In the final example we have

    Sn =1

    2+

    1

    6+

    1

    12+

    1

    20+ + 1

    n(n + 1)=

    nk=1

    1

    k(k + 1)=

    nk=1

    1

    k

    nk=1

    1

    k + 1

    Expanding we have

    Sn = 1 12

    +1

    2 1

    3+

    1

    3 1

    4+ + 1

    n 1

    n + 1= 1 1

    n + 1

    thus as n , Sn 1, hence the sum converges to 1.

    4.4.2 Tests of convergence of positive series

    Unfortunately the sum of a series cant always be expressed in a closed form expression. For

    such cases we use a series of tests to examine the convergence of a series.

    56

  • 8/8/2019 eng_ana_II

    58/78

    Comparison Test

    Given a sequence

    k=0 ck which consists of positive terms (ck 0 for all k) which is convergent,then if we have a different