engineering mathematics with examples and applications

16

Upload: xin-she-yang

Post on 14-Apr-2017

216 views

Category:

Engineering


27 download

TRANSCRIPT

Page 1: Engineering Mathematics with Examples and Applications
Page 2: Engineering Mathematics with Examples and Applications

Engineering Mathematicswith Examplesand Applications

Xin-She YangMiddlesex UniversitySchool of Science and TechnologyLondon, United Kingdom

Page 3: Engineering Mathematics with Examples and Applications

Academic Press is an imprint of Elsevier125 London Wall, London EC2Y 5AS, United Kingdom525 B Street, Suite 1800, San Diego, CA 92101-4495, United States50 Hampshire Street, 5th Floor, Cambridge, MA 02139, United StatesThe Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom

Copyright © 2017 Elsevier Inc. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or anyinformation storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about thePublisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can befound at our website: www.elsevier.com/permissions.

This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein).

Notices

Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods,professional practices, or medical treatment may become necessary.

Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, orexperiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whomthey have a professional responsibility.

To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons orproperty as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in thematerial herein.

Library of Congress Cataloging-in-Publication DataA catalog record for this book is available from the Library of Congress

British Library Cataloguing-in-Publication DataA catalogue record for this book is available from the British Library

ISBN: 978-0-12-809730-4

For information on all Academic Press publicationsvisit our website at https://www.elsevier.com

Publisher: Nikki LevyAcquisition Editor: Graham NisbetEditorial Project Manager: Susan IkedaProduction Project Manager: Mohanapriyan RajendranDesigner: Matthew Limbert

Typeset by VTeX

Page 4: Engineering Mathematics with Examples and Applications

Contents

About the Author ixPreface xiAcknowledgment xiii

Part IFundamentals

1. Equations and Functions

1.1. Numbers and Real Numbers 31.1.1. Notes on Notations and

Conventions 31.1.2. Rounding Numbers and Significant

Digits 51.1.3. Concept of Sets 61.1.4. Special Sets 8

1.2. Equations 81.2.1. Modular Arithmetic 10

1.3. Functions 111.3.1. Domain and Range 121.3.2. Linear Function 121.3.3. Modulus Function 141.3.4. Power Function 15

1.4. Quadratic Equations 161.5. Simultaneous Equations 19Exercises 20

2. Polynomials and Roots

2.1. Index Notation 212.2. Floating Point Numbers 232.3. Polynomials 242.4. Roots 25Exercises 28

3. Binomial Theorem and Expansions

3.1. Binomial Expansions 313.2. Factorials 323.3. Binomial Theorem and Pascal’s Triangle 33Exercises 35

4. Sequences

4.1. Simple Sequences 374.1.1. Arithmetic Sequence 384.1.2. Geometric Sequence 39

4.2. Fibonacci Sequence 404.3. Sum of a Series 414.4. Infinite Series 44Exercises 45

5. Exponentials and Logarithms

5.1. Exponential Function 475.2. Logarithm 485.3. Change of Base for Logarithm 53Exercises 54

6. Trigonometry

6.1. Angle 556.2. Trigonometrical Functions 57

6.2.1. Identities 586.2.2. Inverse 596.2.3. Trigonometrical Functions of Two

Angles 596.3. Sine Rule 626.4. Cosine Rule 62Exercises 63

Part IIComplex Numbers

7. Complex Numbers

7.1. Why Do Need Complex Numbers? 677.2. Complex Numbers 677.3. Complex Algebra 687.4. Euler’s Formula 717.5. Hyperbolic Functions 72

7.5.1. Hyperbolic Sine and Cosine 727.5.2. Hyperbolic Identities 747.5.3. Inverse Hyperbolic Functions 74

Exercises 75

v

Page 5: Engineering Mathematics with Examples and Applications

vi Contents

Part IIIVectors and Matrices

8. Vectors and Vector Algebra8.1. Vectors 798.2. Vector Algebra 808.3. Vector Products 838.4. Triple Product of Vectors 85Exercises 86

9. Matrices9.1. Matrices 879.2. Matrix Addition and Multiplication 909.3. Transformation and Inverse 939.4. System of Linear Equations 989.5. Eigenvalues and Eigenvectors 99

9.5.1. Distribution of Eigenvalues 1049.5.2. Definiteness of a Matrix 107

Exercises 108

Part IVCalculus

10. Differentiation10.1. Gradient and Derivative 11110.2. Differentiation Rules 11410.3. Series Expansions and Taylor Series 117Exercises 120

11. Integration11.1. Integration 12111.2. Integration by Parts 12511.3. Integration by Substitution 128Exercises 130

12. Ordinary Differential Equations12.1. Differential Equations 13112.2. First-Order Equations 13212.3. Second-Order Equations 13612.4. Higher-Order ODEs 14212.5. System of Linear ODEs 143Exercises 144

13. Partial Differentiation13.1. Partial Differentiation 14513.2. Differentiation of Vectors 14613.3. Polar Coordinates 14713.4. Three Basic Operators 149Exercises 152

14. Multiple Integrals and SpecialIntegrals14.1. Line Integral 15314.2. Multiple Integrals 15314.3. Jacobian 15514.4. Special Integrals 157

14.4.1. Asymptotic Series 15714.4.2. Gaussian Integrals 15814.4.3. Error Functions 159

Exercises 161

15. Complex Integrals15.1. Analytic Functions 16315.2. Complex Integrals 165

15.2.1. Cauchy’s Integral Theorem 16615.2.2. Residue Theorem 168

Exercises 169

Part VFourier and Laplace Transforms

16. Fourier Series and Transform16.1. Fourier Series 173

16.1.1. Fourier Series 17316.1.2. Orthogonality 17516.1.3. Determining the Coefficients 176

16.2. Fourier Transforms 17916.3. Solving Differential Equations Using

Fourier Transforms 18216.4. Discrete and Fast Fourier Transforms 183Exercises 185

17. Laplace Transforms17.1. Laplace Transform 187

17.1.1. Laplace Transform Pairs 18917.1.2. Scalings and Properties 18917.1.3. Derivatives and Integrals 191

17.2. Transfer Function 19217.3. Solving ODE via Laplace Transform 19417.4. Z-Transform 19617.5. Relationships between Fourier, Laplace

and Z-transforms 197Exercises 197

Part VIStatistics and Curve Fitting

18. Probability and Statistics18.1. Random Variables 201

Page 6: Engineering Mathematics with Examples and Applications

Contents vii

18.2. Mean and Variance 20218.3. Binomial and Poisson Distributions 20318.4. Gaussian Distribution 20718.5. Other Distributions 20918.6. The Central Limit Theorem 21118.7. Weibull Distribution 212Exercises 214

19. Regression and Curve Fitting

19.1. Sample Mean and Variance 21519.2. Method of Least Squares 217

19.2.1. Maximum Likelihood 21719.2.2. Linear Regression 217

19.3. Correlation Coefficient 21919.4. Linearization 22119.5. Generalized Linear Regression 22219.6. Hypothesis Testing 225

19.6.1. Confidence Interval 22519.6.2. Student’s t -Distribution 22619.6.3. Student’s t -Test 227

Exercises 228

Part VIINumerical Methods

20. Numerical Methods

20.1. Finding Roots 23120.2. Bisection Method 23220.3. Newton-Raphson Method 23320.4. Numerical Integration 23420.5. Numerical Solutions of ODEs 237

20.5.1. Euler Scheme 23720.5.2. Runge-Kutta Method 237

Exercises 241

21. Computational Linear Algebra

21.1. System of Linear Equations 24321.2. Gauss Elimination 24421.3. LU Factorization 24721.4. Iteration Methods 249

21.4.1. Jacobi Iteration Method 25021.4.2. Gauss-Seidel Iteration 25321.4.3. Relaxation Method 253

21.5. Newton-Raphson Method 25421.6. Conjugate Gradient Method 254Exercises 255

Part VIIIOptimization

22. Linear Programming22.1. Linear Programming 25922.2. Simplex Method 260

22.2.1. Basic Procedure 26122.2.2. Augmented Form 262

22.3. A Worked Example 263Exercises 265

23. Optimization23.1. Optimization 26723.2. Optimality Criteria 269

23.2.1. Feasible Solution 26923.2.2. Optimality Criteria 269

23.3. Unconstrained Optimization 27023.3.1. Univariate Functions 27023.3.2. Multivariate Functions 271

23.4. Gradient-Based Methods 27523.4.1. Newton’s Method 27523.4.2. Steepest Descent Method 276

23.5. Nonlinear Optimization 27823.5.1. Penalty Method 27823.5.2. Lagrange Multipliers 279

23.6. Karush-Kuhn-Tucker Conditions 28023.7. Sequential Quadratic Programming 281

23.7.1. Quadratic Programming 28123.7.2. Sequential Quadratic

Programming 282Exercises 283

Part IXAdvanced Topics

24. Partial Differential Equations24.1. Introduction 28724.2. First-Order PDEs 28824.3. Classification of Second-Order PDEs 29024.4. Classic Mathematical Models: Some

Examples 29124.4.1. Laplace’s and Poisson’s

Equation 29124.4.2. Parabolic Equation 29224.4.3. Hyperbolic Equation 293

24.5. Solution Techniques 29424.5.1. Separation of Variables 29424.5.2. Laplace Transform 29624.5.3. Fourier Transform 29624.5.4. Similarity Solution 29724.5.5. Change of Variables 298

Exercises 299

Page 7: Engineering Mathematics with Examples and Applications

viii Contents

25. Tensors25.1. Summation Notations 30125.2. Tensors 302

25.2.1. Rank of a Tensor 30325.2.2. Contraction 30325.2.3. Symmetric and Antisymmetric

Tensors 30425.2.4. Tensor Differentiation 305

25.3. Hooke’s Law and Elasticity 306Exercises 307

26. Calculus of Variations26.1. Euler-Lagrange Equation 309

26.1.1. Curvature 30926.1.2. Euler-Lagrange Equation 311

26.2. Variations with Constraints 31426.3. Variations for Multiple Variables 316Exercises 317

27. Integral Equations27.1. Integral Equations 319

27.1.1. Fredholm Integral Equations 31927.1.2. Volterra Integral Equation 320

27.2. Solution of Integral Equations 32127.2.1. Separable Kernels 32127.2.2. Volterra Equation 322

Exercises 324

28. Mathematical Modeling28.1. Mathematical Modeling 32528.2. Model Formulation 32628.3. Different Levels of Approximations 32828.4. Parameter Estimation 33028.5. Types of Mathematical Models 332

28.5.1. Algebraic Equations 33228.5.2. Tensor Relationships 33328.5.3. Differential Equations: ODE and

PDEs 333

28.5.4. Functional and IntegralEquations 335

28.5.5. Statistical Models 33628.5.6. Fuzzy Models 33728.5.7. Learned Models 33728.5.8. Data-Driven Models 338

28.6. Brownian Motion and Diffusion:A Worked Example 338

Exercises 340

A. Mathematical FormulasA.1. Differentiation and Integration 341A.2. Complex Numbers 341A.3. Vectors and Matrices 341A.4. Fourier Series and Transform 342A.5. Asymptotics 343A.6. Special Integrals 343

B. Mathematical Software PackagesB.1. Matlab 345

B.1.1. Matlab 345B.1.2. MuPAD 346

B.2. Software Packages Similar to Matlab 347B.2.1. Octave 347B.2.2. Scilab 348

B.3. Symbolic Computation Packages 348B.3.1. Mathematica 348B.3.2. Maple 348B.3.3. Maxima 349

B.4. R and Python 350B.4.1. R 350B.4.2. Python 350

C. Answers to Exercises

Bibliography 381Index 383

Page 8: Engineering Mathematics with Examples and Applications

Chapter 4

SequencesChapter Points

• Sequences will be discussed in detail, including both arithmetic progression and geometric progression.

• The difference equation for Fibonacci sequences and its solution techniques will be explained in detail. The link with the goldenratio will also be highlighted.

• Show the ways of calculating the sums of both arithmetic and geometric series, especially the sum of infinite geometrical series.

4.1 SIMPLE SEQUENCESThe simplest sequence is probably the natural numbers

1, 2, 3, 4, 5, ... (4.1)

where we know that the next numbers should be 6, 7 and so on and so forth. Each isolated number is called a term. So 1is the first term, and 5 is the 5th term. Mathematically speaking, a sequence is a row of numbers that obey certain rules,and such rules can be either a formula, a recursive relationship (or equation) between consecutive terms, or any otherdeterministic or inductive relationship.

In general, we have a sequence

a1, a2, a3, ..., an, ... (4.2)

where a1 is the first term and the nth term is an. It is worth pointing out that it is sometimes more convenient to write thesequence as a0, a1, a2, a3, ..., an, ..., depending on the context. In this case, we have to be careful to name the term. Thefirst term should be a0 and the nth term is an−1.

Example 4.1

All positive even integers

2,4,6,8,10, ...,

form a simple sequence, which can be expressed as

an = 2n, (n= 1,2,3, ...).

In addition, all the positive odd integers

1,3,5,7,9, ...,

can be written as

bn = 2n− 1, (n= 1,2,3, ...).

It is interesting to note that the differences between any two consecutive terms for both sequences are 2, that is a2 − a1 = a3 − a2 =a4 − a3 = 2 and b2 − b1 = b3 − b2 = b4 − b3 = 2. In general, we have

an+1 − an = 2, bn+1 − bn = 2,

Engineering Mathematics with Examples and ApplicationsCopyright © 2017 Elsevier Inc. All rights reserved. 37

Page 9: Engineering Mathematics with Examples and Applications

38 PART | I Fundamentals

or

an+1 = an + 2, bn+1 = bn + 2.

The terms in the above example are all linear in terms of n. However, the term (nth term) can in general be nonlinear. Forexample, the sequence

2, 5, 10, 17, 26, ..., (4.3)

can be described by the formula for the nth term

an = n2 + 1, (n= 1,2,3, ...).

Example 4.2

The sequence −1, 1, 3, 5, 7, ... corresponds to the formula an = 2n− 3 for (n= 1,2,3, ...). It can also be described by the recursiveformula

an+1 = an + 2, a1 =−1, (n= 1,2,3, ...).

There is a constant difference between consecutive terms an and an+1.On the other hand, the sequence

2, 1,1

2,

1

4,

1

8, ...

has a constant ratio r = 1/2. The general formula is

an = 2rn−1, (n= 1,2,3, ...),

which is also equivalent to the recursive relationship

an+1 = anr, a1 = 2, (n= 1,2,3, ...).

There are two special classes of widely-used sequences. They are arithmetic sequences and geometric sequences. In theprevious example, the formula an = 2n−3 (n= 1,2,3, ...) is an arithmetic sequence because there is a common differenced = 2 between an+1 and an. On the other hand, the formula an = 2rn−1 describes a geometric sequence with a commonratio r .

4.1.1 Arithmetic SequenceIn general, an arithmetic sequence, also called arithmetic progression, can be written as

an = a + (n− 1)d, (4.4)

where a is a known constant (often the first term), and d is the common difference (also called the step). We often assumed �= 0, otherwise we have a trivial sequence with every term being the same number.

Example 4.3

For example, the formula an = 2n− 3 for the sequence −1,1,3,5, ... can be written as

an = 2n− 3=−1+ 2(n− 1), (4.5)

which gives a =−1 and d = 2.Let us try to figure out the formula for the following sequence:

2,7

2, 5,

13

2, 8,

19

2, 11, ...

Page 10: Engineering Mathematics with Examples and Applications

Sequences Chapter | 4 39

First, it is easy to check that the difference between the first two terms is 7/2− 2= 3/2. This difference is the same between any twoconsecutive terms. Thus, we can conclude that d = 3/2.

We also know that the first term is 2, so we can set a = 2. From the above general formula (4.4), we have

an = 3

2(n− 1)+ 2, (n= 1,2,3,4, ...).

4.1.2 Geometric SequenceOn the other hand, a geometric sequence, or geometric progression, is defined by a1 = a and an+1 = ran(n= 1,2,3, ...),where the common ratio r �= 0 or 1. This definition gives

a1 = a, a2 = ar, a3 = ar2, ..., an = arn−1, ..., (4.6)

whose nth term is simply

an = arn−1, (n= 1,2,3, ...). (4.7)

Example 4.4

Let us try to figure out the formula for the following sequence:

2,2

3,

2

9,

2

27,

2

81, ...

It is easy to see that there is a factor of 2 in each term. Thus, we can be sure that a = 2. The ratio between the second term to thefirst term is

r = 2

3/2= 1

3.

Similarly, the ratio of the third term to the second term is

r = 2

9/

2

3= 1

3,

which is the same ratio for all the other two consecutive terms. Thus, from the above general formula, we can write

an = arn = 2(1

3

)n

, (n= 1,2,3, ...).

But we should check if this formula can indeed produce the original sequence. For n = 1, we get a1 = 2/3, which is the secondterm, not the first term. Thus, there is something wrong with the formula. If we look carefully at the sequence, we should start withn= 0 instead of n= 1. With this minor modification, we have a correct formula

an = 2(1

3

)n

, (n= 0,1,2, ...).

Alternatively, if we insist to start with n= 1, we can modify the formula as

an = 2(1

3

)n−1, (n= 1,2,3, ...).

Obviously, r can be negative if necessary. For example, for a = 1 and r =− 23 , we have

1, −2

3,

4

9, − 9

27,

16

81, ..., (4.8)

whose nth term is

an = (−2

3)n−1, (n= 1,2,3, ...). (4.9)

Page 11: Engineering Mathematics with Examples and Applications

40 PART | I Fundamentals

4.2 FIBONACCI SEQUENCENow the question is which form of formula we should use? In general, we should use the formula for the nth term becausewe can easily calculate the actual number for each term. If we try to study the relationship between terms (often amongconsecutive terms, though not always), we should use the recursive relationship. It is worth pointing out that the relationshipcan be complicated in some cases. Let us look at a classic example.

Example 4.5

A famous classic sequence is the Fibonacci sequence

0, 1, 1, 2, 3, 5, 8, 13, 21, ...

whose recursive relationship (or equation) is

an+1 = an + an−1, (n= 1,2,3, ...),

with a0 = 0 and a1 = 1. The formula for the nth term is not simple at all, and its construction often involves the solution to arecurrence equation.

In order to get the general expression of nth term for the Fibonacci sequence, we have to solve its correspondingrecurrence equation

an+1 = an + an−1. (4.10)

This is a second-order equation because it involves the relationship among three consecutive terms. Mathematically speak-ing, this equation is a linear recursive equation or linear recurrent equation.

First, we can assume that the general term consists of a generic factor an = Bλn where λ is the unknown value to bedetermined, and B is an arbitrary constant (readers can refer to more advanced textbooks such as Yang XS, MathematicalModelling for Earth Sciences, Dunedin Academic, 2008, and its bibliography).

Substituting an = Bλn, equation (4.10) becomes

Bλn+1 = Bλn +Bλn−1. (4.11)

By dividing Bλn−1 (assuming it is not zero, otherwise the solution is trivial, that is zero), we have a characteristic equation

λ2 − λ− 1= 0. (4.12)

This is a quadratic equation for λ, and its solution can be obtained easily. We have

λ1 = 1+√5

2, λ2 = 1−√5

2. (4.13)

It is obvious to see that λ1 is the golden ratio φ, while λ2 is the golden ratio conjugate � as discussed in Chapter 1.The trick here is again to assume that the generic form of the solution is a linear combination of the two possible basic

solutions

an = αλn1 + βλn

2 = α(1+√5

2

)2 + β(1−√5

2

)n

, (4.14)

where α and β are undetermined coefficients. Now we have to determine α and β using the initial two terms a0 = 0 anda1 = 1.

For n= 0 (the first term), we have

a0 = 0= α+ β, (4.15)

which means β =−α. For n= 1 (the second term), we have

a1 = 1= α(1+√5

2

)+ β

(1−√5

2

)= α

(1+√5

2

)− α

(1−√5

2

). (4.16)

Page 12: Engineering Mathematics with Examples and Applications

Sequences Chapter | 4 41

Its solution is simply α = 1/√

5. Subsequently, we have β =−α =−1/√

5. Therefore, the general formula for the nth termin the Fibonacci sequence is

an = 1√5

[(1+√5

2

)n −(1−√5

2

)n]. (4.17)

This formula is almost impossible to guess from the relationship of the sequence itself. It leaves us with the task of verifyingthat this formula indeed provides the right terms for the Fibonacci sequence.

Example 4.6

For the general formula (4.17), we can now check if the first three terms are indeed 0,1,1. For n= 0, we have [(1+√5)/2]0 = 1 and[(1−√5)/2]0 = 1, so we get

a0 = 1√5[1− 1] = 0.

For n= 1, we have

a1 = 1√5

[1+√5

2− 1−√5

2

]= 1√

5

[2√

5

2

]= 1.

For n= 2, we have

a2 = 1√5

[(1+√5

2

)2 −(1−√5

2

)2]= 1√

5

[1+ 2√

5+ (√

5)2

4− 1− 2

√5+ (

√5)2

4

]= 1√

5

[6+ 2√

5

4− 6− 2

√5

4

]= 1√

5[4√

5

4] = 1√

5[√5] = 1.

4.3 SUM OF A SERIESSometimes, we have to calculate the sum of all the terms of a sequence. For example, when German mathematician Carl F.Gauss was a child, he was able to add all the natural numbers from 1 to 100 in an amazingly short time

1+ 2+ 3...+ 99+ 100= 5050. (4.18)

This is because the sum of all the numbers from 1 to n is

1+ 2+ ...+ n= n(n+ 1)

2. (4.19)

In this case, we are in fact dealing with the sum of all the terms of a sequence. Traditionally, we often refer to a sequenceas a series when we are dealing with the sum of all the terms (usually, a finite number of terms).

Conventionally, we use the sigma notation,∑

from the Greek capital letter S, to express the sum of all the terms in aseries

n∑i=1

ai = a1 + a2 + ...+ an, (4.20)

where ai denotes the general term, and the sum starts from i = 1 until the last term i = n.For the sum of an arithmetic series with the ith term of ai = a + (i − 1)d , we have

S =n∑

i=1

ai = a1 + a2 + ...+ an = a︸︷︷︸=a1

+(a + d)+ (a + 2d)+ ...+ (a + (n− 1)d)︸ ︷︷ ︸=an

= a1 + (a1 + d)+ (a1 + 2d)+ ...+ (an − d)+ an. (4.21)

Page 13: Engineering Mathematics with Examples and Applications

42 PART | I Fundamentals

We can also write this sum from the back (last term an) to the front (first term a1 = a), and we have

S = an + (an − d)+ (an − 2d)+ ...+ (an − (n− 2)d)+ a

= an + (an − d)+ (an − 2d)+ ...+ (a1 + 2d)+ (a1 + d)+ a1. (4.22)

Adding these above two expressions and grouping the similar terms, we have

2S = (a1 + an)+ (a1 + d + an − d)+ ...+ (an − d + a1 + d)+ (an + a1)

= (a1 + an)+ (a1 + an)+ ...+ (a1 + an)= n(a1 + an). (4.23)

Therefore, the sum S is

S = n

2(a1 + an). (4.24)

As a1 = a and an = a + (n− 1)d , we also have

S = n

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

2d]. (4.25)

Example 4.7

In the case of the sum of all natural numbers 1+ 2+ 3+ ...+ n, we have a = 1 and d = 1, so the sum is

S = 1+ 2+ 3+ ...+ n= n

2[2× 1+ (n− 1)× 1] = n(n+ 1)

2.

For the sum of S = 1+ 3+ 5+ ...+ (2n− 1), we have a = 1, d = 2 and an = 2n− 1. Now we have

S = 1+ 3+ 5+ ...+ (2n− 1)= n

2[1+ (2n− 1)] = n2.

For the sum of a geometric series, we have

S =n∑

i=1

ai = a +︷ ︸︸ ︷ar + ar2 + ...+ arn−2 + arn−1 . (4.26)

Multiplying the above equation by r on both sides, we have

rS =︷ ︸︸ ︷ar + ar2 + ar3 + ...+ arn−2 + arn−1+arn. (4.27)

Now if we subtract the first from the second equation, we have

rS − S = arn − a, (4.28)

or

(r − 1)S = a(rn − 1), (4.29)

which leads to

S = a(rn − 1)

(r − 1)= a(1− rn)

(1− r). (4.30)

It is worth pointing out that it may cause problems when r = 1 becomes the division by zero. In fact, when r = 1, all theterms in the series are the same (as the first term a), so the sum is now a + a + ...+ a = na.

Another special case is when r =−1; then we have an oscillatory series a,−a,+a,−a, ..., and the sum will be S = 0when n is even, or S = a when n is odd. Both r = 1 and r =−1 are thus trivial and we will not discuss them any further.

Page 14: Engineering Mathematics with Examples and Applications

Sequences Chapter | 4 43

Example 4.8

To calculate the sum of a geometric series

1+ 1

2+ 1

4+ 1

8+ 1

16+ 1

32+ 1

64+ · · · + 1

1024,

we first have to figure out the ratio. It is easy to check that the ratio is r = 1/2. In fact, the above sum of the series can be written as

1+ 1

2+ (

1

2)2 + (

1

2)3 + (

1

2)4 + (

1

2)5 + · · · (1

2)10.

Thus, we have a = 1 and r = 1/2. However, n= 11 (not 10) because there are 11 terms in the sum. So the sum can be calculated by

S = a(1− rn)

1− r= 1× [1− ( 1

2 )11]1− 1

2

= [1− 12048 ]

12

= 2× 2048− 1

2048= 2× 2047

2× 1024= 2047

1024.

Where r < 0 is negative, we can do the same, but care should be taken to avoid any mistake. Let us look at an example.

Example 4.9

For the sum of the geometric series

S = 1− 2

3+ 4

9− 8

27+ ...+ (−1)n−12n−1

3n−1,

which can be written as

S = 1+ (−2

3)+ (

−2

3)2 + ...+ (

−2

3)n−1.

Thus, we have a = 1 and r =−2/3, so we have

S = 1× [1− (−23 )n]

1− (− 23 )

= 1− (−23 )n

53

.

For example, when n= 10, we have

S = 1− 2

3+ 4

9− 9

27+ ...− 512

19683= 1− (−2/3)10

5/3= 11605

19683.

Because the addition of any two numbers is interchangeable, that is a + b = b+ a, it is easy to verify that the sum oftwo series follows the addition rule

n∑i=1

(ai + bi)= (a1 + b1)+ (a2 + b2)+ ...+ (an + bn)

= (a1 + ...+ an)+ (b1 + ...+ bn)=n∑

i=1

ai +n∑

i=1

bi. (4.31)

Similarly, for any non-zero constant β , we have

n∑i=1

βai = βa1 + βa2 + ...+ βan = β(a1 + ...+ an)= β

n∑i=1

ai . (4.32)

These properties become useful in calculating the sum of complicated series. Let us look at an example.

Page 15: Engineering Mathematics with Examples and Applications

44 PART | I Fundamentals

Example 4.10

We now try to calculate the sum of the series

S = 5+ 10+ 18+ 32+ 58+ 108+ ...+ 1556.

The general formula to generate this sequence is

an = 2n+ 3× 2n−1.

The sum can be written as

S =n∑

i=1

ai =n∑

i=1

(2i + 3× 2i−1)= 2n∑

i=1

i + 3n∑

i=1

2i−1.

The first part is twice the sum of an arithmetic series, while the second part is the sum of a geometric series multiplied by a factorof 3. Using the sum formula for arithmetic and geometrical series, we have the sum

S = 2× n(n+ 1)

2+ 3× 1× (2n − 1)

(2− 1)= n(n+ 1)+ 3(2n − 1).

In the case of n= 10, we have

S = 5+ 10+ 18+ 32+ ...+ 1556= 10× (10+ 1)+ 3× (210 − 1)= 3179.

4.4 INFINITE SERIES

For an arithmetic series, the sum S = n[a+ n−12 d]will increase as n increases for d > 0, and this increase will be unbounded

(to any possible large number).On the other hand, the sum of a geometrical series

S = a(1− rn)

1− r, (4.33)

will have interesting properties as n increases to very large values. For r > 1, rn will increase indefinitely as n tends toinfinity, and the magnitude or the absolute value |S| of the sum S will also increase indefinitely. In this case, we say thesum diverges to infinity. Similarly, for r < −1, rn also increase indefinitely (to large negative when n is odd, or to largepositive when n is even). As mentioned earlier, both r = 1 and r =−1 are trivial cases. So we are now only interested inthe case −1 < r < 1, or |r|< 1 where |r| is the absolute value of r . For example, | − 0.5| = 0.5 and |0.5| = 0.5.

As n increases and tends to infinity, we use the notation n→∞. In the case of −1 < r < 1, the interesting feature isthat rn becomes smaller and smaller, approaching zero. We denote this by rn → 0 as n→∞. As the number of terms inthe series increases to infinity, we call the series an infinite series. Therefore, the sum of an infinite geometrical series with|r|< 1 will tend to a finite value (the limit), and we will use the following notation

S = a + ar + ar2 + ...+ ari−1 + ...

= limn→∞

n∑i=1

ai = limn→∞

a(1− rn)

1− r= a

1− r. (4.34)

Let us look at some applications.

Example 4.11

The classic example is the sum of

S = 1+ 1

2+ 1

4+ 1

8+ 1

16+ ...,

Page 16: Engineering Mathematics with Examples and Applications

Sequences Chapter | 4 45

where a = 1 and r = 1/2. So we have

S = a

1− r= 1

1− 1/2= 2.

For the infinite series

S = 3− 3 · 1

5+ 3 · 1

25− 3 · 1

125+ ...,

we have to change the series into

S = 3× [1− 1

51+ 1

52− 1

53+ ...] = 3

n∑i=1

(−1

5)i−1 = 3× 1

1− (−15 )

= 5

2.

Series and infinite series will become useful when approximating a complex function using Taylor series which will beintroduced in later chapters concerning advanced calculus.

EXERCISES

4.1. Find the general terms for the following sequences:

• 1, 8, 15, 22, 29, 36, 43, 50, · · · .• 5, 6, 9, 14, 21, 30, 41, 54, · · · .• 2, 6, 12, 20, 30, 42, 56, 72, · · · .• 4, 2, 1, 1

2 , 14 , 1

8 , 116 , · · · .

Hint. They partially contain 7(n− 1), (n− 1)2, n2, and 1/2n, respectively.

4.2. The famous mathematician Euler once claimed that n2 + n+ 41 will give all prime numbers for n = 0,1,2,3, · · · .Verify if it is always true. Will n2 − n+ 41 also give all prime numbers?

Hint. Check up to n= 40.

4.3. Find the sum of the following series:

• 710 + 7

100 + 71000 + 7

10000 + 7100000 + · · · .

• 1+ 14 + 1

16 + 164 + 1

256 + · · · .• 1+ 0.09+ 0.0009+ 0.000009+ 0.00000009+ · · · .• 12+ 8+ 16

3 + 329 + · · · .• 64− 32+ 16− 8+ 4− 2+ 1+ · · · .

Hint. Answers: 9/7,4/3,12/11,36,128/3.

4.4. Discuss and find the sum of the series:

1+ (1

2+ 1

3)+ (

1

4+ 1

9)+ (

1

8+ 1

27)+ (

1

16+ 1

81)+ · · · ,

and

1+ (1

2− 1

3)+ (

1

4− 1

9)+ (

1

8− 1

27)+ (

1

16− 1

81)+ · · · .

Hint. Try to write into the sum of two independent series, then find the sum for each series. Answers are 2 12 and 1 1

2 ,respectively.