1_roots Of Algebraic Equations

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 1_roots Of Algebraic Equations as PDF for free.

More details

  • Words: 1,028
  • Pages: 7
Modern Education Soociety’s

College of Engineerin E ng, Pune NAM ME OF STU UDENT: SEM MESTER/Y YEAR: DAT TE OF PER RFORMAN NCE: EXA AMINED BY: B

CLASS: ROLL NO: N DATE OF O SUBMIISSION: EXPER RIMENT NO:

TITLE: Numeerical Soluution of Alggebraic andd Transcenndental equuations. AIM M: To write a program onn Numerical Solution off Algebraic and a Transcenndental equaations by using braccketing methhods and opeen methods.

OBJJECTIVES: Student must m be able to: o Deevelop probllem solutionn skills usingg computers and numericcal methods o o o o

Un nderstand diff fference betweeen algebraic and transcenndental equatioons Identify variouus numerical methods forr roots of alggebraic and transcendentaal quations eq Un nderstand graaphical representation of rooot Ab ble to draw flow chart, com mputer prograam in C/C++

PRE E-REQUIS SITES: Given a function f of a variabble x, find a vaalue r such thhat: f(r ) = 0 • The T value r is i called: – a rooot of the equuation f(x) = 0. – a zerro of the funnction f. u are workking for “D DOWN THE E Exaample: You TOIILET COM MPANY” that t makes floats foor com mmodes. Thee ball has a sppecific gravity of 0.6 annd has a radius off 5.5cm. Yoou are askedd to find thhe distaance to whicch the ball will w get subm merged wheen floatting in waterr. Matthematical Model: Thee equation that gives thhe deptth x to whicch the ball iss submergedd under wateer is giiven by: f(x) = x3 – 0.165 5x2 + 0.39933 × 10–3 = 0

mputer Oriented Numericcal Methods Comp

Paage 1 of

Whyy Numericcal Method ds? ods exist for some speciffic equationss only. E.g., Analyytical metho Wherre,

Whatt about equattions like: and

Braccketing Methods: M • • •

Two initiaal guesses foor the root arre required. The two guesses g mustt “bracket” the root i.e.,, on either side of the rooot Two bracketing methods to be inttroduced: o Biisection metthod o Faalse positionn method (R Regula falsi)

Compputer Orientted Numericaal Method

Page 2 of

Biseection Meth hod: Proceedure Step 1: and as two guessees Choose for the roott such that   In other words, w f(x) changes c siggn between and

Step 2: o f(x) = 0 as a the midEstimate the root xr of ween xl and xu as: point betw

Step 3: Now N check thhe followingg: • If f(xl)f(xr) = 0 then thee root is xr; (BINGO!) ( • stop the alggorithm. – If f(xl)f(xr) < 0 theen • the root lies in interval (xl, xr); upddate xu as xr; • go to step 2. 2 – If f(xl)f(xr) > 0 theen • the root lies in interval (xr, xu); • update xl as xr; •

go to step 2 2. 

Featuures of Bisecction Methodd: • Guaranteeed to converrge - The braacket gets haalved with eaach iteration. • Only the signs s of the computed fuunction values are used. • Relatively y slow convvergence: Eaach iterationn gains one binary digitt in accuracyy. (Roughly one decimaal digit per 3..3 iterations..)

Falsee Position Method: • •

A shortco oming of thee bisection method m is thaat, in dividinng the intervaal (xl, xu) intto halves, no o account is taken of the magnitudess of f(xl) andd f(xu). The false position meethod (or reegula falsi inn Latin) expploits such innformation to t improved es stimate of th he root. obtain an

Compputer Orientted Numericaal Method

Page 3 of

Procedure: Step 1: Join f(xl) and f(xu) by a straight line. The x-intercept of this line gives an improved estimate of the root. Step 2: Equation of the straight line (using two-point form):

Substituting y=0 and  

 

  ,

Step 3: Check the following: – If f(xl)f(xr) = 0 then BINGO! • If f(xl)f(xr) < 0 then Update xu as xr; go to step 2. • If f(xl)f(xr) > 0 then Update xl as xr; go to step 2. Difference in Bisection and False Position Method: • The only difference between the two methods lies in step 2: Mid-point vs linear interpolation • False position method generally performs better than bisection method.

Secant’s Method: Almost identical with False Position Method, but some critical differences: • Secant’s Method is Open Method (discussed in next session) • Secant method does not require the two guesses to bracket a root. • Formula for False Position and Secant Method is same. • Difference between False Position and Secant method is in Step#3 only. • Only one of the old guess values is replaced by the new guess.

Convergence Speed

False Position Method Always Converges Slower

Computer Oriented Numerical Method

Secant Method Sometimes diverts Quicker (if converge)

Page 4 of

OPE EN METHO ODS: •

Open metthods are baased on form mulas that require r eitheer: – on nly a single starting s valuue of x; or – Tw wo starting values v that do d not necesssarily brackeet a root.

New wton-Raphsson Methodd:

mula for New wton-Raphson Method: Form

Pit falls fa for Neewton Raphhson Methhod:

Compputer Orientted Numericaal Method

Page 5 of

Succcessive Approximatioon Methodd: • • • • •

Requires only one guess value Simplest method m for programmin p ng If function n y=f(x) is given, g then rooot is at f(x)) = 0 Convert th his function or rewrite function fu as x = g(x) New valu ues of x are found f out byy following equation e

• ALG GORITHM M/FLOWC CHART:

Compputer Orientted Numericaal Method

Page 6 of

CONCLUSION: Comparison between results obtained by calculations and programs: Sr. No.

Method

Result by Calculations Program

Error

Difference in result is due to following reasons:

QUESTIONS FOR REVIEW: 1) What is the principle of Least Square regression 2) Derive normal equations for evaluating the parameters a and b to fit data to a. Power function model of the form b. Population growth model of the form

Using the principle of Least Squares. 3) Draw flow chart to illustrate the steps involved in developing a program for multistep regression. 4) Write condition for convergence for Newton-Raphson method and Successive Approximation Method. 5) Write realistic applications of this experiment in brief (at least two applications).

Computer Oriented Numerical Method

Page 7 of

Related Documents