Www.le.ac.uk Numerical Methods: Finding Roots Department of Mathematics University of Leicester

Preview:

Citation preview

www.le.ac.uk

Numerical Methods: Finding Roots

Department of MathematicsUniversity of Leicester

Content

Motivation

Change of sign method

Iterative method

Newton-Raphson method

Reasons for Finding Roots by Numerical Methods• If the data is obtained from observations,

it often won’t have an equation which accurately models

• Some equations are not easy to solve

• Can program a computer to solve equations for us

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solving equations by change of sign

• This is also known as ‘Iteration by Bisection’

• It is done by bisecting an interval we know the solution lies in repeatedly

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

METHOD

• Find an interval in which the solution lies

• Split the interval into 2 equal parts

• Find the change of sign

• Repeat

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Example: Find a root of the equation

given there is a solution close to x=-2

Step 1: Find the interval

So we know the solution lies between -2 and -1

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Step 2: We now half the interval and find the

value of f at the half way point

Now we know the solution lies between and

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑓 (−1.5 )=2 (−1.5 )3−2 (−1.5 )+7=6.625

Step 3: Now we just keep repeating the process

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

So to 3 s.f. the solution is

Solving equations by change of sign

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑥=−1.74

Solving equations by change of sign

Number of dp:

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Find a solution

Clear information box

Solving using iterative method

• ‘Iteration’ is the process of repeatedly using a previous result to obtain a new result

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

METHOD

• Rearrange the equation to make the highest power the subject

• Use the power root to leave on its own on the LHS

• Make on the LHS

• Make on the RHS

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

• Now that the function is in the form

we can use the value for to calculate , then we can use the value , and so on...

• When we eventually get a value repeating we have reached the solution

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑥𝑛+1= 𝑓 (𝑥𝑛)

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Click on a seed value to see the cobweb:

start

here

start

here

start

here

start

here

start

here

start

here

𝑦=𝑥

𝑦= 𝑓 (𝑥 )

Clear Cobwebs

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Example: Find a root of the equation

given that there is a solution close to

STEP 1: Rearrange the equation

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Step 2: We can now input (taken from the

question)

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

This gives us the solution

to 3 d.p.

Solving using iterative method

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑥=−1.893

Solving using iterative method

Starting value:

Number of d.p.:

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Solve

Clear

Newton-Raphson Method

• Sometimes known as the Newton Method

• Named after Issac Newton and Joseph Raphson

• Iteratively finds successively better approximations to the roots

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Newton-Raphson Method

The formula is

We start with an arbitrary and wait for the

iteration to converge

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑥𝑛+1=𝑥𝑛−𝑓 (𝑥𝑛)𝑓 ′ (𝑥𝑛)

Newton-Raphson Method

𝑥0𝑥1𝑥3

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Newton-Raphson Method

Example: Use the Newton-Raphson Method to

approximate the cube root of 37

The equation we use is

Now we need to evaluate

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Newton-Raphson Method

We then obtain the formula

Choose

Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

𝑓 (𝑥𝑛+1 )=𝑥𝑛−(𝑥𝑛)3−373 (𝑥𝑛 )2

Newton-Raphson Method

So this means that the cube root of 37 is approximately 3.3322 Next

Iterative method

Newton-Raphson

Change of sign methodMotivation

Recommended