Lecture16 - Newtons Method -Matlab code > newtraph(@(x)...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Newton’s Method --Matlab code >> newtraph(@(x) 3*x+sin(x)-exp(x), @(x) 3+cos(x)-exp(x),1) ans = 0.360421702960200
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Newton’s Method Quadratic convergence: = constant e n /e 2 n-1 x 0 =3 Illustration of quadratic convergence: 1.E-09 1.E-08 1.E-07 1.E-06 1.E-05 1.E-04 1.E-03 1.E-02 1.E-01 1.E+00 1.E+01 0 1 2 3 4 5 6 7 8 9 n Error xn-x_exact f(x)=exp(x)-2 parabola (Linear)
Background image of page 2
Bungee Jumper Problem Newton-Raphson method Need to evaluate the function and its derivative 2 ( ) tanh ( ) ( ) 1 tanh sech 2 2 d d d d d gc mg f m t v t c m gc gc df m g g t t t dm mc m m m = - = - Given c d = 0.25 kg/m, v = 36 m/s, t = 4 s, and g = 9.81 m 2 /s,
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Bungee Jumper Problem >> y=inline( 'sqrt(9.81*m/0.25)*tanh(sqrt(9.81*0.25/m)*4)-36' , 'm' ) y = Inline function: y(m) = sqrt(9.81*m/0.25)*tanh(sqrt(9.81*0.25/m)*4)-36 >> dy=inline( '1/2*sqrt(9.81/(m*0.25))*tanh(sqrt(9.81*0.25/m)*4)- 9.81/(2*m)*4*sech(sqrt(9.81*0.25/m)*4)^2' , 'm' ) dy = Inline function: dy(m) = 1/2*sqrt(9.81/(m*0.25))*tanh(sqrt(9.81*0.25/m)*4)- 9.81/(2*m)*4*sech(sqrt(9.81*0.25/m)*4)^2 >> format short; root = newtraph(y,dy, 140 ,0.00001) root = 142.7376 Initial guess for xr Tolerance es
Background image of page 4
Newton-Raphson Method Examples of poor convergence or failure
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Secant Method Use secant line instead of tangent line at f ( x i )
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 18

Lecture16 - Newtons Method -Matlab code > newtraph(@(x)...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online