You are on page 1of 24

Name - Sagar Kavindra Raut

RoW no - S2 Divisiom - 8.

PR ne- 202134161L026
Sub - NMME

List o expeiments.
Sr. no. Nameof ex peadmenks
denmon stoue h e ound ofP error
opaume of
and Signi kCant number.

Progme otnd he seal Single àoot et an equcion


by Bisecion method

Propme to ind eal Sinale aoot ot an equcion by


Neoton Rophson method
Poume to Solve linea Simwtaneous algebaic
equions

oume to Solve the integuion using muli

taapezoidal Rule.

6) ooprme to Solve the integukon using Simpsons


Rule
Prodamme o Solve h e Simple pducicad Problem
using inite ailloence method
Progumme o Solve o0E
inPoyamme to demnskrate the /tiet sf' 7cund y

CYOY< Syrficant nanbr

Fiouwchart
Stot
t-vad, a- value

Cakak
ads,cel,

abs cis Cto

stoP Stop StoP


.wite a C
Protrm led o fird Ahsohude
ErrOY pedenteege Eoy En, Relutve
# iluds sldio.h>
#ickede <math. h>
F/oat naim C)
Plout oks_m red_er, p-
print F \m INPUT TRUE VALU vel-
E:') em,t.vu,a-vali
Stonfl F ,2a-va),
pri ntf n INPUT
fant C" % F",
2a-WAPPROXIMATEVALUE:'
);
J
ubs- err - faks lt -vaw.avs
Tdem=
P-*el
ahs-crli- val;
-

er=rel -Cr* 100


printf ("n RBSoLUTE ERROR =% F,aks
p1nefF C\n RE LATIVE ERROR CaJs
Prind C" n PERCENTAGE =Yof"ye.emi RELATIVE ERROR
, P-Ter ); =% f,

/* Quee pus
1) INPUT TRUEVALUE :37.46235
INPUT
APPROXIMATEVALWE
APsoLUTE ERROR =0.00235o 37.46 0aD
RELATIVE ERROR =

0.000063
AERCENTAGE RELATIVE ERROR =0.00627
2)INPUT TRUE VALwE 865250d
INPUT APPROXIMATEVA LVE 866200 '

ABSolWTE ERROR =
S0.00D0OD
RELATIVE ERROR 0.0000 58=

PERCENTA6HE RELATIVG ERKROR =


0005719
3) NPUT TRVEVALVE : 3.26425
INPUT APPROXLMATE VALUE 3264
ABSoLUTE ERROR =0.000250
RELATIVE ERRGR 0.000077
PERCENTAGE RELATIVE ERROR =
0.00 1662
4) INPUT TRUEVALVE : 2.16 435
INPUT APPROXIMATE VALDE:21644
ABoLUTE ERROR 0.0000sD
RELATIVE ERROR 0. 0000 23
ERRR-0002313
PERCEN 7PaE REA TIVE

S) INPUT TRUEVALVG: 45
INPUT APPR OXIMATEVALUE 47
ABSoLUTE ERROR 2 . 0 0 0 0 0 0

RELATIVE ERROR =0.044444


PERCENTPE RELATIVE ERRIR =
4 4444 45

6 TNPUT TRUEVALUE: 0666666


NPUT APPROXIYIATEVALU6 0664
E ERROR 0 000 334
HBsoLUT
RELAT1/E ERR OR = 0.000 SOI
RELATTVE ERROR = 0.0S0B4
PERCENTRIE

) INPUT TRUE VALDE 625. 463 625


PUT HPPROXEMATE VALD6
INABSOLUTE ERROR -0.4827
RELATIVE ERROR -0.000 712 0.01726 *7
PERCENTAIE RELATIVE ERROR =
Bisrchbn mehod
Pburhuct
Start

bnOh.Bisecdindewul
ND KF(aF)lko
Check syn

NO a-clKe
- theck Coryznie
yes
oulal: Re b

StoP
2.Wntc al prorom (ade to solve xx 2 0y
Bisecdm ehod.
# mchude<stho .h>
#mrlede <dath h>
F loat furn tFloat x)

velustn (x*x"x-x-23
Void bisechon (tload x, Flaah b, imt *jtv)
the vesull ofont ileveio/
this RuncHon peforms ornd ptrds
* =Ca+b}/2
+(*it);
1PrtF itraton mo. h adx= 7.5/\n i,"x);
vod mam ()

jnst itr= o, manoitj


ploak X, a, b, alerr, X1 altoued enror a
prilF("\» Entere vdues af a, b,
maxmum iteyrui OnS: \m"); &momitr )};
Stun F(b PF YF%d ta,z6 A allesr,
bisecfion (4x,a ^b, &it)j

e Crun la"fun x)ko)


else
bisechonC&x1, a, b, a itr»
if CPabs Cx-x) <alltr)
printf C"Afer % d iteruhtors,rood = %6.4A'ixU
Yeurn b,
whle (itY < muxmbr )
primtf (The Soldlorn dots not overge o
itevoibns ore
net sulficient"2
vetum 1

oulpt
nter the valus of a,b ,albued erorRmazimu iteratin,
1.S 2 1s
0
teratidm mo.1 X= 1:15000 tevuHO) no. 2X=1.62so0
esut Dn no.3 X l'56 250
=
Iteru n no. 4X=LSE
Heration mo. 5x =15 IS62. Hesuion no.6 X = 152344
Herutidn mo.7 X =1.Si953 HerutiBn no.8 *=4.S2448
eruhon mo. 9 -1-J20S1 IheroHon mo Ao X =1. 52100
terah On no. 1x-152/24 Iteruttn no 2 =1:s439
Heruh bn mo. 13X-I.S2142 |4eruhan o. 14X-1s7y
Hertono. 15 X= 1-578 Herutidn no .4X= 1.5213
Itrution nd. GX- I.52136
Pho
Programme to demonsthaks
the Ar cted of round
oFf oror 2 signipiarnd rumber

roguTa
#indude <stdo. h >
#imgude smath. h>

#modt sinio h
voidmaml)
double ahs-e, reem P-rd. erg tval,a-vau
Printf (n INPUT TRUEVALE: "
StantC'yle'tE_val
APPROaTEVA WE"
primbFnzNPUT
aks-efaks Ct-val-a -yul)
Ted -7=dk-ent/ttu
Pre-e7=vel-olO
\rABbUTE ERRR-%f abs_e
prirvtf ERRR =
lf rel-er
prnetFC"nRELATIVE RELATIVE ERRoR-61P

Paintf"p»PERCENTAGHE
Prd-er)
getch ()j

nput TRUVAWE
Input ArFROImATBVALUE

ABSol oE ERROR
PERCEN TAGE RELATIVE ERROR=
6 Neuon- Ruphon mebhod.

Fbwchwt
STARD
ene fncHdn F(x)
elhn Fueton df6:)
oneuevuht ofke,Aer",M

Loophov -1
h-f o)Jdrr}
h

/prhdity

End lo dt
/pri Sokuton/
/Pmsalndog
not (onye97
STOP
SrOP
PROGHRA Dwhite a c progrom ide toSde cask-2
by Neulbon[ Rephsons nethod.cn aSx-2x=ky 0
reluce <skdio .h>
# mdude < math h>
Ploat FCFloaf x)
vchsn cos Cx)-2*X ;
Ploat df (Pbadx)
gekcrn Csink)D,
void main)
tit,Tmanm,
ploat hx0, x1,duler).dalnedl err und mawrnum itonslisn
Polat F(" \anenter Xo,
ero7
4ud mawmum
ito
SCanf l"% P'% Pydlåxo,2aller, 2rmaxmils )

h-FCao Vd Gta) Png)hxi);


Xo-h no hb 8 d X = % 4
Ricrahdn
prnF"pt
iF(Fabs Ch) allenr)

pivtf"After Ys ad iteraBions,ppf-86Fm'"
ft,xl)
yekurno
3 or

Primt 1herefud solaton Joes ondt cnvega


ikeratton ote maufinnt \m"),
eharn1;
0.45062
At lHecahon m.1,X=
AtHerution 0 2X 0.450 184
Pt Herattan n o 3,X-0 45oIR4
l 1ectin na.4X= 045014
nt
The vequred Soludfon doeg conveatgt o Horcdions or

Hratlbns r e matficie>f.
An prorun to Sake the jmleyodd tuaihu
Simpson's /sxde
rogram

Hnchude Stdio .h>


#mrlude < Condo .h
Ploat fCploadx)
zehunCi/a+x);
void main C)
i i
Flout xo, x, h,y 2], se, se aJ,X E2d5
pohtr Eter values of xo,*n, h:");
SenfC"% F» f % Fyhxo, Rxn &h}
n-(m-ko)/hj
C n 2 - 1)

-mt
h- Cm-Xo)mj
Refncd valse ofn ond hae pd
prtF C'»

peritfC"n yvelues: \m");


for(i-0 k=v, it+)

XEIJ=xoti*h;
Y13 Poxci);

prmtf"m f » ) yti);
So
Se 0 it )
frCi kn,
if ci2 =71)

So-So tyTi3,

else
SE =SetYLu
ans= h/3*(ycO+ytni+4so 42se)
print fCn fina inegsadionis £, 'ns
glth C)

Inpd ladret
Emdey valu of xo,Xn,h: 240.6
Refined valu ofm *ndh are : 4 0. 500000
Yvalues
0.33333
0.245714
0.250000
0.222222
0.2000po
Pinal idepeibn 0S10847
tules's neihod
Flotuchant:
START
Fs)--xT|

n(X7m-0)T|

or i-1,n

pu xo,yo

STOP
q r a m e fo solve 00E ty Eues's pithed.
Pgur
*mdude <stlio h.
Flod fn (Fladtx, Ploady)
1 float F

f-X+Y
J
ekom
mun)

Fladt a,b, X, Y,h,t, K;


PrinF Erter Xop, h,xn; ");
SCanfh f %f %f % F,24b,2h,dt);
X=q

white Cx<-t)

- f a n CXN),
y ytk,
X=Xth 0. 3Pl)x1);
prir FrhD.3PM+%

anpt loupnk
O10. 1)
Erter xo, y0 h, Xm,
K y
0.1o0 100
200 .220
1352
300
528
SIOP
0.Soo .72

0.600 -943
0.700 2
48
0.880 2.487
q00 2-816
.000 87
Plultl4npewjcdal Rule
Fhwchast'

StuTt

Derlurt Vvnlab le
Inpu X, hund X

n- (nX0)/h_
0

+
Prind yLi

ons-v3tyt+y4 sotse

Prrmlr s
STP
Fm progrHnme to slotr he intkypudhid» ashiy
9n4i Tpe2oidal Rue
Pogrn
#nckele sstdio h>

#mdude < conio.h?


h>
#mude <math
plobt F(Phadx)
veun ilI+ Poul (X2 ));

VOd mam()

inii,n
L201,so,Se, ans XL2al
Hod xo, xn, h, y
valuesof oxn,h:\n)
FC" Enty
pret
SemfC"26f%f%P4xo,Rxn,å h)j
n-Cxh-X0)/h;

h=Cxm-X)h
h are
of n and
value
prirnd fNnrefired

it)
ikan;
Foycieo
x[iJ=xo+í*h3
y Cid= PatiJ;

Pntf C"on7. f \m, [ i


y
S
St
foy Ci1 icn;it+)
S
IFC 2==i)

So sotY LiJ

Se-Set yLiJ

Cs =hl3*¬y Co1+ 1t set 2 se);


Cil

prtoadF C"enfma indaprdjon infy ons

INPUT /oUTPUT
Ender values of xo,Kn
03 0-5
rtmed vuluc otn amd have :4 0-500000

yvaluey
.000000

800000
. 500000
0. 207612
0.2000000
0. 137331
0. 1000 00
b I.247082
Final inteysuhbn
L
1
Fhm prgrummt do Sloe Orinay dtfotrdal
pauhtors 4y Eler's motdited mehud
Prga #*nclude <stdlio h>
#lncude < meoth h>
# indude < Strhy. h)
Float furn (plodl, Plad)
mam )

imd ii
Tlool, u)
Floak xt loo1,Y, Cio01, h,mi 106), ml,n4ys
fory maolified Eulor
Cn
Prhtt prerun
C

methoel mm") *

ndiul veulae vl x:

printF" Enter he

StamflhbF RNLOI, ofred h,


prhtt Com Entey hevaluc
Stant C" Pla), of fe
pmtt C"m bnter te
prstial valus
Vovbdble y: "
Scomf "fy&[O1)
S Cal=yLoS
forCi-1Xt-0<a it+)

w100.0
Xtij- xi-13+h,
n 3 - fm(Xi-11,7 CiHI)

C0
i k (wo.001)

mi-Pun Cxi, ste),


ma mtiItm)h;
Ste+1J-yLi-13+m2*h
w=sle1-S ic-13
w-Fabs (w)
CEC+

speche
The vues of x amd
Primdf("mm
y ome m x\t y \ n ) ,

f'jxi,yci3)
prmbf C of \¬ %
Prhedt("n)
3
Flot Fe cPloat a, plea6)
float C
Caatb
vekarnCc)
Inpt/ouipd

CProrum fy madified tuler mehed


Entey the imiticu vulue of x'0

tntes he vaulue of hmcemnt h:D.05

Enter the fimal vdue ofx*o


Entey tre wticu valuu of te yutuble Y

he reapedive values of X Ay

000000
I 061345
050000
15619
time l4.0hg
exeuhdn
roess rekumed 3 (r3)
odnuu
o
PYeSs my key
Pm rotra mmt to alve smpe racthral prblens
dfestne method.
Netwhon's dhiced
G
/ram
#mrludes stbo.h >
#mdude (onio.h
volcd mamc)

indx tio), YLIOJ, PL1o


nt kSn, ij=1,fl=,fa=0,

\m Ewter tme mumha of obsenutions, \n"


ur
Stomf C"hd', Rnin;
Entey t e disfererd
yalu) ofxidn";
prhf Chpm
forCial ikn; iH)
Stemf ("yo d', 4xt) \i)
vaus of yar:
P r n (" \ The Comespondy
fer Ci-1een; i+*)
StomPC "6 d'y4y ciJ)
f-yL of \'k' in F*) you
bder the valuee
pmtfC m
vne to eyuuate ;\n "),
SConaf (pd', & K);

do
f o r Ci t, k=n-i,it)
PO1J- Ctyti+3-4iD/(xci+}1-X[i 1));
YC1-Pril
Fi
forti-Iik=), it+)

FX-Ck xti),

JTT

while Cn- 1,

3
Inpd /oufpd
Enter e numbee of osov vatlers
5
Enter he cliferont Value of x=
51 13 17
e corespondin vaues f y re
15 32 14si 23%6 5202
Entey the Value o 'k m PLk> you vd to
evcluute

P<3- 8lo

You might also like