2/2/2016 1 secant method electrical engineering majors authors: autar kaw, jai paul

18
06/10/22 http:// numericalmethods.eng.usf.edu 1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates

Upload: andrea-murphy

Post on 18-Jan-2018

266 views

Category:

Documents


2 download

DESCRIPTION

3 Secant Method – Derivation Newton’s Method Approximate the derivative Substituting Equation (2) into Equation (1) gives the Secant method (1) (2) Figure 1 Geometrical illustration of the Newton-Raphson method.

TRANSCRIPT

Page 1: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

05/03/23http://

numericalmethods.eng.usf.edu 1

Secant Method

Electrical Engineering Majors

Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM

Undergraduates

Page 2: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

Secant Method

http://numericalmethods.eng.usf.edu

Page 3: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu3

Secant Method – Derivation

)(xf)f(x - = xx

i

iii 1

f ( x )

f ( x i )

f ( x i - 1 )

x i + 2 x i + 1 x i X

ii xfx ,

1

1 )()()(

ii

iii xx

xfxfxf

)()())((

1

11

ii

iiiii xfxf

xxxfxx

Newton’s Method

Approximate the derivative

Substituting Equation (2) into Equation (1) gives the Secant method

(1)

(2)

Figure 1 Geometrical illustration of the Newton-Raphson method.

Page 4: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu4

Secant Method – Derivation

)()())((

1

11

ii

iiiii xfxf

xxxfxx

The Geometric Similar Triangles

f(x)

f(xi)

f(xi-1)

xi+1 xi-1 xi X

B

C

E D A

11

1

1

)()(

ii

i

ii

i

xxxf

xxxf

DEDC

AEAB

Figure 2 Geometrical representation of the Secant method.

The secant method can also be derived from geometry:

can be written as

On rearranging, the secant method is given as

Page 5: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu5

Algorithm for Secant Method

Page 6: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu6

Step 1

0101

1 x

- xx = i

iia

Calculate the next estimate of the root from two initial guesses

Find the absolute relative approximate error)()())((

1

11

ii

iiiii xfxf

xxxfxx

Page 7: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu7

Step 2Find if the absolute relative approximate error is greater than the prespecified relative error tolerance.

If so, go back to step 1, else stop the algorithm.

Also check if the number of iterations has exceeded the maximum number of iterations.

Page 8: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

3843 ln10775468.8ln10341077.210129241.11 RRT

http://numericalmethods.eng.usf.edu8

Example 1Thermistors are temperature-measuring devices based on the principle that the thermistor material exhibits a change in electrical resistance with a change in temperature. By measuring the resistance of the thermistor material, one can then determine the temperature.

Figure 3 A typical thermistor.

For a 10K3A Betatherm thermistor, the relationship between the resistance, R, of the thermistor and the temperature is given by

where T is in Kelvin and R is in ohms.

Thermally conductive epoxy coating

Tin plated copper alloy lead wires

Page 9: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu9

Example 1 Cont.For the thermistor, error of no more than ±0.01oC is acceptable. To find the range of the resistance that is within this acceptable limit at 19oC, we need to solve

and

Use the Newton-Raphson method of finding roots of equations to find the resistance R at 18.99oC.

a) Conduct three iterations to estimate the root of the above equation.

b) Find the absolute relative approximate error at the end of each iteration and the number of significant digits at least correct at the end of each iteration.

3843 ln10775468.8ln10341077.210129241.115.27301.19

1 RR

3843 ln10775468.8ln10341077.210129241.115.27399.18

1 RR

Page 10: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu10

Example 1 Cont.

3384 10293775.2ln10775468.8ln10341077.2)( RRRf

11000 12000 13000 14000 15000

0.00006

0.00004

0.00002

0.00002

Entered function on given interval

Figure 4 Graph of the function f(R).

Page 11: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu11

13014 107563.1105383.3

1400015000105383.315000

55

5

1

10

10001

R

RfRfRRRfRR

12000 14000 16000 18000 20000

0.00005

0.00005

0.0001

Entered function on given interval with two initial guesses and estimated root

Example 1 Cont.Initial guesses: 15000,14000 01 RR

Iteration 1The estimate of the root is

Figure 5 Graph of the estimate of the root after Iteration 1.

%257.15

10013014

1500013014a

The absolute relative approximate error is

The number of significant digits at least correct is 0.

Page 12: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu12

13083 105383.3102658.1

1500013014102658.113014

R

56

6

2

01

01112

R

RffRRRfRR

12000 14000 16000 18000 20000

0.00005

0.00005

0.0001

Entered function on given interval with two initial guesses and estimated root

Example 1 Cont.Iteration 2The estimate of the root is

Figure 6 Graph of the estimate of the root after Iteration 2.

The absolute relative approximate error is

The number of significant digits at least correct is 1.

%52422.0

10013083

1301413083a

Page 13: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

12000 14000 16000 18000 20000

0.00005

0.00005

0.0001

Entered function on given interval with two initial guesses and estimated root

http://numericalmethods.eng.usf.edu13

13078 102658.1108911.8

1301413083108911.813083 R

R

68

8

3

12

12223

RffRRRfRR

%034415.0

10013078

1308313078a

Example 1 Cont.Iteration 3The estimate of the root is

Figure 7 Graph of the estimate of the root after Iteration 3.

The absolute relative approximate error is

The number of significant digits at least correct is 3.

Page 14: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu14

Advantages

Converges fast, if it converges Requires two guesses that do not need

to bracket the root

Page 15: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu15

Drawbacks

Division by zero

10 5 0 5 102

1

0

1

2

f(x)prev. guessnew guess

2

2

0f x( )

f x( )

f x( )

1010 x x guess1 x guess2

0 xSinxf

Page 16: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.edu16

Drawbacks (continued)

Root Jumping

10 5 0 5 102

1

0

1

2

f(x)x'1, (first guess)x0, (previous guess)Secant linex1, (new guess)

2

2

0

f x( )

f x( )

f x( )

secant x( )

f x( )

1010 x x 0 x 1' x x 1

0Sinxxf

Page 17: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

Additional ResourcesFor all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit

http://numericalmethods.eng.usf.edu/topics/secant_method.html

Page 18: 2/2/2016  1 Secant Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul

THE END

http://numericalmethods.eng.usf.edu