lect_4 - Introduction to Numerical Analysis for Engineers...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Numerical Analysis for Engineers • Roots of Non-linear Equations – Heron’s formula – Stop criteria – General method • Convergence • Examples – Newton-Raphson’s Method Convergence Speed • Examples – Secant Method Convergence and efficiency • Examples – Multiple roots – Bisection Lecture 7 Roots of Nonlinear Equations Example – Square root Heron’s Principle Guess root Mean is better guess Iteration Formula ( )/2 ( )/2 a=2; n=6; heron.m g=2; % Number of Digits dig=5; sq(1)=g; for i=2:n sq(i)= 0.5*radd(sq(i-1),a/sq(i-1),dig); end ' i value ' [ [1:n]' sq'] hold off plot([0 n],[sqrt(a) sqrt(a)],'b') hold on plot(sq,'r') plot(a./sq,'r-.') plot((sq-sqrt(a))/sqrt(a),'g') grid on i value 1.0000 2.0000 2.0000 1.5000 3.0000 1.4167 4.0000 1.4143 5.0000 1.4143 6.0000 1.4143 Lecture 7 Roots of Nonlinear Equations General Method Example: Cube root % f(x) = x^3 - a = 0 % g(x) = x + C*(x^3 - a) cube.m a=2; Non-linear Equation n=10; g=1.0; C=-0.1; sq(1)=g; for i=2:n sq(i)= sq(i-1) + C*(sq(i-1)^3 -a); end hold off plot([0 n],[a^(1./3.) a^(1/3.)],'b') hold on plot(sq,'r') plot( (sq-a^(1./3.))/(a^(1./3.)),'g') grid on Goal: Converging series Rewrite Problem Example Iteration Lecture 7 Roots of Nonlinear Equations...
View Full Document

This note was uploaded on 02/27/2012 for the course MECHANICAL 2.29 taught by Professor Henrikschmidt during the Spring '07 term at MIT.

Page1 / 17

lect_4 - Introduction to Numerical Analysis for Engineers...

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

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