Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Modern Education Soociety’s

College of Engineerin
E ng, Pune
NAM
ME OF STUUDENT: CLASS:
SEM
MESTER/YYEAR: ROLL NO:
N
DAT
TE OF PER
RFORMAN NCE: DATE OF
O SUBMIISSION:
EXA
AMINED BY:
B EXPERRIMENT 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 Unnderstand diff
fference betweeen algebraic and transcenndental equatioons
o Identify variouus numerical methods forr roots of alggebraic and transcendentaal
quations
eq
o Unnderstand graaphical representation of rooot
o Abble 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.

Exaample: You u are workking for “D DOWN THE E


TOIILET COM MPANY” that t makes floats foor
commmodes. 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:
5x2 + 0.39933 × 10–3 = 0
f(x) = x3 – 0.165

mputer Oriented Numericcal Methods


Comp Paage 1 of
Whyy Numericcal Method
ds?

Analyytical metho
ods exist for some speciffic equationss only. E.g.,
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
Regula falsi)
o Faalse positionn method (R

Compputer Orientted Numericaal Method Page 2 of


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

Step 2:
Estimate the root xr of
o f(x) = 0 as
a the mid-
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 signss 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 shortcooming 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
obtain an improved esstimate of th
he root.

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.

False Position Method Secant Method


Convergence Always Converges Sometimes diverts
Speed Slower Quicker (if converge)

Computer Oriented Numerical Method Page 4 of


OPE
EN METHO
ODS:
• Open metthods are baased on form mulas that require
r eitheer:
– onnly a single starting
s valuue of x; or
– Twwo starting values
v that do
d not necesssarily brackeet a root.

New
wton-Raphsson Methodd:

mula for New


Form wton-Raphson Method:

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 thhis 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. Result by
Method Error
No. Calculations Program

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

You might also like