Nonlinear Equations How can we solve these equations? ! = 40 %/' - - PowerPoint PPT Presentation

nonlinear equations
SMART_READER_LITE
LIVE PREVIEW

Nonlinear Equations How can we solve these equations? ! = 40 %/' - - PowerPoint PPT Presentation

Nonlinear Equations How can we solve these equations? ! = 40 %/' Spring force: ! = # $ What is the displacement when - I ! = 2N? F- = Kx o ( XI 0.05M = I = -2N -0.05M x 40 Nlm k How can we solve these equations? Drag force: * ! =


slide-1
SLIDE 1

Nonlinear Equations

slide-2
SLIDE 2

How can we solve these equations?

  • Spring force:

! = # $ What is the displacement when ! = 2N?

! = 40 %/'

  • I

F- = Kx

  • x
= I = -2N -0.05M

( XI 0.05M

k

40 Nlm

slide-3
SLIDE 3

How can we solve these equations?

  • Drag force:

! = 0.5 +( , - .) = /( .) What is the velocity when ! = 20N?

*! = 0.5 %-/'

=

⇐÷H←

,

TRA

to ⇐6.5 mls

F - give

→ it -Ff

→ v -

  • IFA

⇒ E- 6.3 m/s

slide-4
SLIDE 4

0 . = /( .) −! = 0

*! = 0.5 %-/'

Nonlinear Equations in 1D

Goal: Solve 0 $ = 0 for 0: ℛ → ℛ Find the root (zero) of the nonlinear equation 0 . Often called Root Finding E-µ if ⇒FIZ

  • O

f-(v) = 0

IT

tf@loQ6-3m1s0O0r7ooo.s

=

numerical -

iterative

slide-5
SLIDE 5

Bisection method

* Define

interval that

ghastlier

  • interval :[a.b ]

fan

)>

O

l

a=o;b

KH

q

l

to - lb -a 1=10

* Define midpoint:

is 1/1

f

m-ts.az

  • softa

)l0

l

B

Bo !

beto

* check the signs to

A-0

A

iffca.fm)> o :

igneous

tan:c:[

miss

.lt//sinmkqItesIffa).f(

b)so

|

else

new

= Ia, my

=

  • b. = M
slide-6
SLIDE 6

Bisection method

to = lb -al

a- to ,

ti-lb-al-e.to

i

2 2 ma

l

te tf

  • tf

f

l l l

!

I ,

ts

= tf
  • tf
i i

j

i !

!

A=0

:

/

its

b-to

fritz

to = 10

  • * every iteration , the interval

is

divided by

2 !

slide-7
SLIDE 7

Convergence

An iterative method converges with rate 5 if: lim

.→0 ||2!"#|| ||2!||$ = +,

0 < + < ∞ 5 = 1: linear convergence Linear convergence gains a constant number of accurate digits each step (and + < 1 matters!) For example: Power Iteration

=kjm4fItY¥7

constant-8 → linear convergence

& Xz - Xi

→ constant f I

→ show convergence

X, = A Xz

C

= at → faster convergence

as

a

increases

slide-8
SLIDE 8

Convergence

An iterative method converges with rate 5 if: lim

.→0

||>.34|| ||>.||5 = +, 0 < + < ∞ 5 = 1: linear convergence 5 > 1: superlinear convergence 5 = 2: quadratic convergence Linear convergence gains a constant number of accurate digits each step (and + < 1 matters!) Quadratic convergence doubles the number of accurate digits in each step (however it only starts making sense once ||>.|| is small (and + does not matter much)

E'

"" ""

l

L re

2

slide-9
SLIDE 9

Convergence

  • The bisection method does not estimate $., the approximation of the

desired root $. It instead finds an interval smaller than a given tolerance that contains the root.

X* is the root

*

→ ta errox*

¥

tr L

to I

→ stop

'⑤

t

:i÷÷÷÷:¥÷÷.

at

the

lr-Itc-Ige-adienea.nu

.
slide-10
SLIDE 10

Example:

Consider the nonlinear equation 0 $ = 0.5$) − 2 and solving f x = 0 using the Bisection Method. For each of the initial intervals below, how many iterations are required to ensure the root is accurate within 267? A) [−10, −1.8] B) [−3, −2.1] C) [−4, 1.9] in general :

ties lol

1bjgIcto12k2lb-alTJeogzfbIoaT@fkslogzf8z.Ig

)

  • 7.3

flat

flb)

ffa

).f(b) so → ok !

( 8 iterations )

Muffat.fCbI2o→hot0k!k

> logzf5.fi/-

6.56

f-(a) fasho → on !

G- iterations )

slide-11
SLIDE 11

Bisection method

Algorithm: 1.Take two points, ! and ", on each side of the root such that #(!) and #(") have

  • pposite signs.

2.Calculate the midpoint & = !"#

$
  • 3. Evaluate #(&) and use & to replace either ! or ", keeping the signs of the

endpoints opposite.

.

i

. .

''Ii iii.

slide-12
SLIDE 12

Bisection Method - summary

q The function must be continuous with a root in the interval L, M q Requires only one function evaluations for each iteration!

  • The first iteration requires two function evaluations.

q Given the initial internal [L, M], the length of the interval after # iterations is 869

)!

q Has linear convergence

=

e

slide-13
SLIDE 13

Newton’s method

  • Recall we want to solve ! " = 0 for !: ℛ → ℛ
  • The Taylor expansion:

! "! + ℎ ≈ ! "! + !′ "! ℎ gives a linear approximation for the nonlinear function ! near "!.

linear approximation

  • ff Cx)

EE -

  • = Ich)

f-(xnth)

= O

Ich) ⇒ → fan) t f

'Au) h = O

Neawetgoritnm

:

fh=-s¥;I

→Newtons

×. = random tininess )#→ Newton update

f-Go), f'Go) → h → ftp.ti-Xkth

slide-14
SLIDE 14

Newton’s method

:"

Find x# s .t . f#too

ft

(

Stx)

  • line atxn

fed-

  • - -
  • -
  • - •- slope.IS#-O---ftxn)J

g.

tangent

Xin

  • Xktl

°

. .

t

'

O

/

Yeti

g

x

f'Gr)

×* *FfHH=×k-f¥ITy

slide-15
SLIDE 15

Example

Consider solving the nonlinear equation 5 = 2.0 /" + "# What is the result of applying one iteration of Newton’s method for solving nonlinear equations with initial starting guess "$ = 0, i.e. what is "%? A) −2 B) 0.75 C) −1.5 D) 1.5 E) 3.0

X ,

= ?

Xo

=

O

↳→

ffxf-2ettx-5.gl/kti=Xrthh=-fCXn)DftXI=2e+zxf'Cxn

)

Xo → ffto) - I -5=-3

six, - a

h=¥÷fI

h -4.5

x , = Xo th - Ot 1.5 -71×1=1.57

slide-16
SLIDE 16

Newton’s Method - summary

q Must be started with initial guess close enough to root (convergence is

  • nly local). Otherwise it may not converge at all.

q Requires function and first derivative evaluation at each iteration (think about two function evaluations) q Typically has quadratic convergence lim

.→0

||>.34|| ||>.||) = +, 0 < + < ∞ q What can we do when the derivative evaluation is too costly (or difficult to evaluate)?

  • ④ re
slide-17
SLIDE 17

Secant method

Also derived from Taylor expansion, but instead of using 0′ $. , it approximates the tangent with the secant line: $.34 = $. − 0 $. /0′ $.

If ⇒ approximation for f'(x)

→ Xkt, = Xk - f(X#

§

df(

xn)

Tzpointss

!

1×0,57

*÷⇒;/

:::÷÷÷¥

far)

  • - - -
  • -
  • 9
  • t
, XkH=Xk-f§¥÷#¥
  • t
!

y*

Xk

Xk-l

re

slide-18
SLIDE 18

Secant Method - summary

q Still local convergence q Requires only one function evaluation per iteration (only the first iteration requires two function evaluations) q Needs two starting guesses q Has slower convergence than Newton’s Method – superlinear convergence lim

.→0

||>.34|| ||>.||5 = +, 1 < 5 < 2

f

' → df

slide-19
SLIDE 19

1D methods for root finding:

Method Update Convergence Cost Bisection Check signs of & ' and & ( )! = |( − '| 2! Linear (/ = 1 and c = 0.5) One function evaluation per iteration, no need to compute derivatives Secant 6!"# = 6! + ℎ ℎ = −& 6! /&′ 6! Superlinear / = 1.618 , local convergence properties, convergence depends on the initial guess One function evaluation per iteration (two evaluations for the initial guesses only), no need to compute derivatives Newton 6!"# = 6! + ℎ ℎ = −& 6! />&' >&' = & 6! − & 6!$# 6! − 6!$# Quadratic / = 2 , local convergence properties, convergence depends on the initial guess Two function evaluations per iteration, requires first order derivatives