You are on page 1of 49
Maharashtra Academ: ineeri i y of Engineering & Educational Research’ Name:_Sayali Sanjay Kate ____— Class: TE mech 1! Batch: _E _ Subject __NMO. Roll No. ; 308040 Exp. No: OL Name of the Experiment Roots of equation. Marks | | Teacher ta | [Teachers Signature wih date Performed on = ‘Submitted on : INTRO DUCTION ri 1 i rr) ‘of equation .A_qveat importance tf gi which are_in form _ of f(x) 20 non|inear tet (2) = ax® bxt¢ £0 & xs -bt fpt4ac ga. Here , value of % These 4te find the roots of equation The _ iterative method _i' o- OF iterations oF desired value m ‘ttere _ alto called triads & error methods In_applied mathematics &— engneering init £ ven tp such problems where fa) Is function , either linear or ig Called a Woot of equation. available continued till given of accuracy - for Theory (_] Diagrams (_] Observation Table Incomplete Calculations] Understanding Through QAC] La Graphs [_] Results [J Conclusion te Submission [_] Neatness(_] Teacher's Signature 1 8tacketing method or Interpolation method . 2. Open-end method or Extrapolation method . tn_this method , we assume two initia) nil guesses in Such a way that roots Vie between thes. two guesses - kk Setectio intkt esses & th \ approach. tnwardt the mot can be done by Varioy. bracketing methods - Bracreting method Bisection method false position metho. or half interval method or Regula falsi_ method 2 £N. T OR €x OLATIO: zs ae In this method, we assume _a_ Single ini — guess Which is Cloter to toot of equakion oe OPen end method a Newton- Raphson succecsive Approximat method “method or Point ikeration method. | BISECTION oR MALE ITeRATIVe MeTHOD The bisection. method is alternatively caned ‘nary_tmgpingInernal_halving,or_fotman_method-- lin which interval ig always divided in half- Te function | changer sign over interval function value at midpoint — is eval a locatto! s eterm? ___jas_tys midpoin. _Subinterval within which sign occ i tain re ol Stimnates + Tt initial _guestes are given at %, &xa » then first approximate valtse of root of equahion ts given as Ags X1tXe L yeh) Yor fled Np foot de x y | c vi area) Leb the Curve be y=fta? | the Gere —rwot lies Where curve intersech the _x-aai3 je. y= a) =O xg 2 Curae?/2| TI yor fxs) | | ~ - L I - / wore thang} X1= 23 ak 3 ta Miz 3 - : = Je equa) te zero. : : A cs Lean X3 / a S | Ceo _) - Wes ALGORITHM. Step T : Choose Jower (x1) & Upper (42) guesses fpr root — such that funchion changes sign over [nterved . Tht can be checked by enturing that Har) sflne) CO Step I - An estimation of root of Xr is Bre @itnr) (2. Srep Il - make following evoluahton fp derermine in Which _subinterval wot lies: a- Tk fixrd#xg) CO. ; roo b Ives tn lower subintervel - Therefore set %2= %r & rerun tp stop 2° b Tk flar)-Fla2)? © , wot Wes in_upper me tr @ ren tm Step > Xr, terminabs subinterves - Therefore Seb ee TES Ha) faz) #0 1 Your equate computation . = | peoprem STATEMENT. solve eqn Ye Hare xb43A-9 using _B1secT10N method gcsuratg—of 0-00 |. SOlutvon ©. = ex initial ues xL=0 Kee yee 73 YoeS ~ Hence wots se benweern 02% ns )_ — — ap be 1) <3 po = _ observed that “yp ¥2¢0 bet” Lo toad = U8 + BCrgg = -)e8 Tk ¢an be observed tnak 2320: ——s Wot lies bet” 15 €2- ee Accuracy > [ar-tel 2 | rs-2l = OS = see writing in tabular form : ] = af Ma poe he Ma [Xena] te Accurai 2 5 hs ahaa 1 pie L S | _ dt 4 pee | _ _ 3.) ts [abies | 4% £ te | OT — {—— | a - {a fees fp fs | _ les rhs iets, 609. 1625 | 0-166 ots, Aeinput('\n enter value of x1e'); 2einput('\n enter the value of sanction GEO v2=f 02) ahi le(yl#y2>0) + end for HN dey -xn*y2D)/yd-¥2 Seth yas EAE BR INS untitled BISECTION METHOD x2=" jput("\n enter the maximum value of iterations=' i=f(x1) 5 xeinput('\n enter value of x1="); 2=input('\n enter value of x2="); ylef OD; ya=FO2); i Pe Worse; a x25x3 ~ end. Fprintf("\n roots of eqn Xf", x3) ee ea ~ “function HO yctior junction y=(x.N3) +9) 95 ~ en ~ OUTPUT. enter value of x1=0 ~, enter the value of x2=2 enter the maximum value of iterations=7 roots of eqn 1.609471>> 4 Bisech'on vnethod - Ye fx) = - conclusion - By analalyncally _ by Wd ing root By motlab Solver 1d Page 1 fyi] fm WASH 89 Ky 2 196192 NS rae 1 60944), de 232 L-6o9a: ve l-ta2g | beer | ot6e | s6e¢| -o-gax O12 \:s62r [0-497 | \g2e [0166 11593 | ~O:1F0 0-062¢ | 18934. -O-1F0 | \-6er | 0-166 {1.6043 =~ 0- 003%, 0-0313 1 | | 1.6093 | -0:0039| I-62 [0-166 | 1-6IFIS 0080S o-o)st | 1 156093 _-0:0033 | 1611S | 0-0806 | 1-6132 T 0-038 -b-001 Bs + SsreSnErnan len ———1:|_Eatse__tosirion- _meTHoD_© oe to _ straight line -— tue “tinge method _we L giver_op Pp x10 such initia) —veduet eA ee tn q Point of intersech'an— _o¢ Nine “with ok. 48 ——$——— xiahe —¥ vale Of 1" yr Ca) & upper Cars — gues rot _such_tinad__franctian changes sign Over This __can pe checked by entun'ag fo) #0 An ettimate of not iS _ ye Se NE Mieye step 3: Make evaluah'on tp determme Subintewal th which wot Ifes - a. TE fly). 7) 20, wot Werth lower subintervay Sek X= 2%r @ Fehurn to Step 2 b- Te C1): xe) 70, wot ves In upper Mtervay Set ais xr @ return te step 2 © TE a1) . fxr) 50, Wok equats te Ar twmrer .————}—termpukabow a STs NT Using Regular fals’ position , solve ea” Ys 2243n-9 With maximum _no- of _iteratons =S. let _tnitval ascumed vatuer be MeO M222 for. X1z0 | Niz (0)34+ 300)-9 = -3 for Ar = 2. Vaz _(+)34302)-9 = 5 f Now) + ; ag= X2Vi- Yor = Milt x3 = -9(2) -0 aig 1.206. Bae t _ Y3= -3-014 — 4-43 = _X2N y- AiNe 4 We 4 Y= a p Rees I ns rece Yr t= x L¥2=¥3 | SN — Yieya N — 7 { equal to tern. leet x3_/ | b (end ) N2Y3 CO. At = 1286 nee ~ “Nps 8-019 aes ae a Age Vi %Xr- Xr: ~\ Yee =~ ‘ RT T3-Ol4K2 - | 2B6xF 2 1SS4 . ~gon-$ Ygz_~ 0:S8S INo-of | Xr Ya [x2 [Ya ee ge —~_jeeratio / 1 _— tbo -3 2 |s 1286 | -3-014 | 9. jh2% | -30n |S __|issi, | 0866 _ a. |\sse - 0-588 2 < 1-600 7004 ae | no © | bb0g_| 7 9:0'83 2 . ; Denies 2| oc |ieog [70' 00286 sth jberanton = 1-609 | ——. the roots of eq” after untitled inction GEC) ic; leary Vine (* (x.43)4(3*x)-9") 5 put("\n enter value of x1=" nput("\n enter the value of x2="); singut('\n enter the maximum value of iterations="); =F(x1); y2=F 02); whi 1e(yl*y2>0) ; xl=input("\n enter value of x1="); x2=input('\n enter value of x2="); yl=fOd); i on x3=((x2*y1)- (x1 . Pat RgyD-ObyD)/G1-¥2); iF (yL*y3<0) ; x2=x3 end FprintfC'\n roots of ean xf, x3); en ‘ Regula falsi method - 4 Ha)= wBa3n-9 tonclusim - by anayNcadry %3 = 1603 by coding K2 > \S2B6sq, Math lab solver 43 = 16034 a kee page 1 untitled enter the value of x2=2 enter the maximum value of iterations=2 enter value of x1=0 enter value of x2=% roots of ean §,§28654>> Page 1 3:| Newrpn _RAPHSON METHOD | __ newston Reaplsonmetiod iran open ended method In_this method we assume 4 Single starting guess b> fing Tangent interect x axte af %2" let 21 _be_ initia guesc , then yield Thus Value. of 2 is given by xr ti- tla) Hoary 7 > Wy peruad mot ZA | | Oy — Gl De m vet Y= fin) _be curve lies ot point Where — curve a actual mot of ve _} ch xeaeisait? * ak _y=tlx) =O. wre Had| ais Rn? aw 7 Seen \ ww) ie a / _ } white lal>s eee a | ote — 4 in oO ee — - a TTT cm al ALGORITHM. a1 such thed Assume _iniha) guess——— ~ Scop 1 —— “fia Pio) 1 tp hans. _eonvengenes — nia ~ ., Ne i Stop 2 1 Caleutare value of new guest > xo2z x. - Stn) — = Cd —_ 3 sep tiem Wie ad a -_ Chop 22 Repeat stop —® wnt _Pesired accuracy 18 Sbieathed —— PRoBLem STATEMENT see using, Newton Raphcon method, solve an fur _pta d= 343% -F flay 2 xb+ 3X9 phn) = Bx*42 pcx? = 6% _ take initial gues “K=O a Ha) = 29: x at - fa) =o : — OO See a —Cenvergence __ ¢endihton , MM, _—. }H——_ffuy ¥en) ef ____ nara eel eee fo ong ee . ———I = Exe - = 62 =< T s 0-833 C1 - conte: Convergence condi'than hence initial I is trght, D Lterahion 1 Hoe x)= Ho) = o- (9) =2. #41) 3 @! iterabon 11 | a. = XI- lx) = 3 - 2 = 2+) | PG) 30 | > | X)-ka ae -3 | 2+) og | 130004 0. 2996 [ 1-62.46 elisa | 16097 O-o14g 16056 O-co01 w Untitled NEWTON RAPHSON METHOD sco eat the initial valu cleat ent Cyeino mer the accuracy: op. Seccinl ener the MAST Of iteration to be performe : sent NA gL x2 OD +2); i Lb XI, X2,001-X2))5 te function is %f',x2); ouTPUT Otter the initial value of x Le- xl=0 emer the accuracy=0-001 center the max. no. of iteration to be performed=5 itr x1 x2 (x1-*2) 1.000000 3.000000 -3.000000 ] 23,000000 2.100000 0.900000 3.2.100000 1.695749 0.404251 » Newton Raphter metnod ‘7 Rl = pa-eosta nO4 34-9 Conclusion = by anayredly eeiaces 161288) coding ya ood mornlab solver x2 16087 Page 1 —— i x my ae ____Thit_1s_ open method, in_Which_we assume single | niet. guess value x). Any function in form of f= lo converted to form a= 90) _ } at EX p- oe) 4 — | WH) — _ + - e | The tok of funshion ix given by point of. intersection ~ 0 TT Of curve y= gtx) & He yes | | ALéogiTHm - | skep 1 _-_Cmvert function fl) Into go) laa ~Asume Value of %1 Such Hat _gixd Cl . this is condition fpr _conveaqente. : “Cauulaly vais of w= gt) _¢ set 2025 M4 — + this_fe guess for_nerk 'teration. ly = Repeal ste p__8. HL desired acorracy tS _____obtuined. - while lal? L _ _ - 7 i t = a OED — . ep wl ee a J AL= 4x1) | | | 1 [meas | [ Print wok x2 / | L_.——____ f . V | [ oe “END. ) \ |_proaLem STATEMENT flO = peg e%cosx-'4. > g(x) = 10g [it | [peN23S. Coosa J | "gia _é1 7 convergence condition | _gttay = Lx Sina alee Cox2m . [ corm Vnitted guest = 0 gituyeo 24 nae coma tron et =H i Wg he ~ | atx = legft4 osm 7 = log/l4 \ io J(u) F Oey = @)_for next iteratron wae gu Dimes (1a 67) 7 uss log (4 “4 al _ _ tes 0146) a = 4 / ch ape At ” P = | _ TT I - _ a | i ee / pa eae Untitled _pROXIMATION METHOD oe pncion MO dct een put \2 Enter the initial value of xl= "5 satin Ne er the accuracy=')i pm (va Enter the maximum numbel ions= wan yee 1 of iterations: 20 fore xls peed) forint gel 6F FT X2,abS(X1-X2)) if ab! s( se es rintf(\ Root of the function is *f'.x2); preak end” nt en ction Y=BO) fupga/c050 end ouTPUT itr x1 x2 (x1-x2) 1.0.000000 (0.336472 0.336472 36472 0.394181 0.057708 975 0.432797 0.000889 0.432797>>, successive approxim ahi = tog Cha COS umclursie - anody WeUl y Ke = 04319 cod 19 xr 2 0-43!908 5 0°3706- math lob solver %2 ae E Page 1 Untitled MATLAB SOLVER > yfzero('(exP(x)*cos(x))-1.4'0) > ye 0.4336 Page 1 Ita Untitled MATLAB SOLVER S yatzerot (4*sin(x)-exP(8),0) 7 ye 0.3706 ” Ita Page | »* poll 03 91; ” roots(P) ans = (9.8048 + 2.22341 “9.9048 - 2.22341 1.6097 + 0.0000 Untitled MATLAB SOLVER Page 1 A rT a) ~~ ineering & Educational Research’ Maharashtra Academy of Engineering 5 MAHARASHTRA INSTITUTE OF TECHNOLOGY, PUNE MATIARAST RA Ione Name:_Cayalt sanjay kate Class :_TE mech) Batch : & Subject MO RollNo, : 208010 Exp. No: 2. ube Name of the Experiment —_____—___—— Marks | | Teachers Signatur wih date Performed on, ‘0 1 ‘Submitted on INTRODUCTION One _o! moct um. Dhlems i) Engineeving & scence is that of solving set of simulta algebralc equations. these equation Variety of appiicatione tn field Of science “neous linear Ore used in & Engineering A System Of Iinear eo ucctons sith Sn’ unenown if represented as QS Aiexp4 + ainun = by Arm + Arima, to = 7 + aankn = br Ag Kit A32a2+ - = =» +agnan = by Amini *anrae + - -—~ 4 Gmnxn 2 by Incomplete for Theory [_] Diagrams [| Observation Table [-] Calculations] Graphs [J] Results [] Conclusion] Understanding Through Q/A[] Late Submission [—] Neatness[~]|__ Teacher's Signature aw Ss ay : ey 1 2a Wg are _vartabis Sy J. uation i Duin —a : h L, whore Vou A Set 4 re an Nx ve mee eee SPO a | unnowns value Of XK. objective i tp find ods Lv SIMULTANEOUS EQUATLON. _ pirect METHOD ITERATIVE METHOD — Gauss“@limination method 1 Gauss -Seidal meh! Thomas _Atgoritim 2: Gauss setda rely” A 4 we | Jue, * — ) Bo ian 7 ee | | ans ELIMINATION MeTHOD - ey —_ __ this method i employed | Mm two Oepe- Nd Aitontdeumina nan a ee — aN _b backward eliminahion ia ae - = oe ____| ——_the_method is described at below ;where on SE three equations are considered for stmpliaty. ——~) _ The equations In genera) form are = | | AN) + ak, tag, = CF — atm, +4erk, 4 A2aeg = _ Yn. _ GQ1 Ky + 132%. +433%Q = CB | i xh _ —— In matrix form Ax ——— ae qn aie aig | |X al ee |_ o> | [ian 4te 423. ff fe a3 Se x, | [& ee matrix of “Cet: ts reduced to upper trianguter ‘crm of ae Folate _ by Using row — transformahions ¢ 6 thus matrix changes *o - = | fea ate ag = aa! aes —— oO oO aay” _t _ _ —— Bt procedure is ‘called forward Aiminochten. Valuer ——"— of “a are how obtained by backward _ subshitusion, = mB Mees _ Me * | for is! ton) for je lion Read arly) Cfowwise)/ po fer = po Of ia 7 =| ee | = _ tf = Qtr jer mY SEE i — — . _ — I - Sle 10h) earthy) dd 7 Soa —— | a - a as sevofaf a — | —__ _{A} a) for i= gti ton) : a |Ssarcing) oo Cfo Jel ton v a) arCisi) = arin) s xartq:y)| - ~N Lot —< ar 1) sar (i) axaritg ) - = — [dite Car) _/ ~— Jacn) = aritn) _ oo AY —C tor Weh-l: 12) * _t __fatwye arrews | - = 7 (tor (ee Win-l a ~~ F. | acw) = ale) | ate+1) x onan a Using Gauss | —__ bet _ bf simultaneous 10x14 antl +4ar 4 gag el@ . ; ~ method _ 1D SOive limination “equations: api tg el? — parang ele given. _equahion in matrix torm , sw") cnvert the — | ee ee | [0 1 ! Pe, oul ee ee 7 1 : - Z ‘ | fo Yo Ie _ N44 3-49 L #3 List — fe a —__—_} ___ - 2 TD ge Bm - [yo or] fa Pye — j - | = = |e Fy ts — t 3 cae) U as J \e4 — [ 7 — D}) me > Ree, || | __Ry-e R338) 7 ; Loot ot [on eI a Oo lo8 18 [xe [> me = — o 3. | ; SAS TREES) ey Oo ————— pul 2) ———en | ao eee a — "tee es eae eg a 1 lo, oe 2 ae i ————}- ae ee ef ee —}- ee | a t — — ane putGtenter the matrix a!) gauss elimination ZinputCtenter the matrix d von jelsdin 1G daadkes-Frac Di itip-d0o-fa0s id Sr amt FCIXKF\N XD; ) output enter the matrix afi9 2 1;2,11 2;3 49] Enter the matrix d '12;15;16] 0 x21.000000 x=1,000000 x=-1.000000 MATLAB. SOLVER, "10 1.1;2,11 233 4 915 — >> a= >> b=[12515;16]; 3> x-La\b] page 1 {1 on oy ) fx Por oO 1 01663 eo | 7 | bees oO o 1 L*s. es, - | zl. Ys 01664 2 21666 Apply backeoard suhtthatron, \ aay to as oS ang%g +: suf Nove. “thak sicgonel! denen Ke a win P leit te ai 1 » No rearrange System gt . wee ~4 2 ~ = A3 1 an, y [ow a aio my = A138 Ay an an an an an _ _ ag 2 BH 5 4% - 492 Hp ~ Arn an — air 22 an Gar eee — oan L wns ba - Onn Xb- An X2 ==) — Onn-| a ann ann ann ann x2ae — Now Thitio approxim eto be w a ag an tn ouch way bu - __Whidh finihes ‘rst i om Fhe gabe —_Tberatiens are carried Ltn) ob of dai _ Ateuraey 6 Obtuined - eo (Staet) - an eee ee eo a | Rs ny as no op ea] —— ~ _ a for_iel ton) Soy | leh. SSC*™ for jel ton? ed ———] TT —— [read anti {3 Tremp aris) | ———————_ ariti) 5G) | —— ( | ts (oy = Const Jar (ui) [pvine XC1) ae Bhiweel: ee a - _ ee oe a Putting | atye sence = lo | 4rom__given eg we have putting %= ie + 20 “1 _%2 Moe (es-sysrd ~O putting y=0, z=0 In MO Ms PEfoq = 314818 g.4i8ig, Z=0 tn _eg® “ye \Lis (12 - 6% 3-14gi¢) = 3: S4074 = ne Bulag ys 9-540 zn ea” “ne vey Cito ~ 3 14aie- gosyor4) Jae oust: pegecet 2 357294 tor fourth iterabrer vin (68+ 893 ~2)- —_— tov f0 hth feercn on . 2a Msy (ilo- %3 “93? [ ea Care fiytza) 2 Bate am, i ceananssana | T- 4 He = tls C72- 224 ~ OAS) / | _2 3.87203 Lee tH cuo- x8-y5) | = gorge _ | — fing thot vi in 4) © sth vberaben a1 | Same, So aluet are oe = Az ayoacr a — Y= $730 —— ke ie Fo sine! SBS S1Y92/27 2; Gauss sei imines, 85ST iy, a rrinet ec the rea : ine the required number of ite erations '); . put rer the required Mi 2.425478 1531573018, Bef 925954>> umber of iterations 5 AB SOLVER page 1 | THomas ALGORITHM. a a _ Thomas — algort tits baal ieatly-s stmpittied form of aus etiminaaion SOS be used tr Solve tridtagonal | system of -¢ equations —— ot n linear_sl gimudtancout = tek us consider _systen- Ki her an as follows-— unknowns A — —— | equecions it ith nn zoto > bt _ au kit 4 aXe a2im +! 4 aus gt an3%9 +0 +2 ed | a | a fT [Read ar Gapl an {——— tf : —— read are) - t | = ————— | ¢ for is2 nr WZ = - — - | face = ar Ci, t-1) | i arCi-tji-') a 7) Tar Gash ar (jaya fact | _ - ee ari(j- 1x pace | 7 \ a o.oo as i | 4 oe i : 7 : ee | —~| ee qe ar (py = 4 es [ ___fanfipcance L632 3: 1616 3. _pivide ean Ay — 4. Eliminate end lower _ diagonal element — | _tonsid er 0” 6) bk @_, solve to _eriminal® - tae - e . 7 - ~Te + 2:04 73 - Ty = 0-8 a 2 3- Ty 8 —— a Te - o-6ycts = 1342 © oe en 06ug Tg A - - = 113951, -Ty 2 22 —@ ™ ~S.) pividle @ by sg 7 — Ta - o-768TH> 10-194 6) 7 T ~® 6! Giminate Syd Jower order dvagonal element enc ~ -Ta4 2:04 Ty= 2008 _ Tg - 0-7168 Tys 10194 a a 1:3232Tys 210-99 _ Ty = 189 - 7. Reply backward subsituhton for < tT 7 e. Ta 0:7168 (189-40) = 10-1384 129.49 ee _ | 73 similarly - — Th = 0-648 (12449) F194? oe _ zl ft eet eeeeeeee — trom © ee = je 2:04 Ti - 93-F1 = 40.8 — _ — Tis 65.9% 2 Tee 93gee ™ |e aneare tye tga. e. _ Se Sin, ee > si — ne — imput(’enter the matrix at); “onas Algoritham deinput(‘Enter the matrix d*); n=length(d); for i=2:1:n f-(@G,i-D/aCi-1,i-1)); aCi,i)=aGi, 1)-FaCi-1, 4); d(i)=d(i)-F*dGi-1) ; end for 1: temp=d(i) 5 for j-islin » temp=temp-aCi,j)*x(j); end x(i)=temp/aCi end e fprintf('x=%fF\n" x); output Enter the matrix a[2.04 -1 0 0;-1 2.04 0.8;0.8:0-8;200.6) 030 -1 2.04 -1;0 0 -1 2.04] _ inter the matrix d[4 x1=65 969834 x2=93.778462 x3=124, 538228 x4=159.479524 MATLAB SOLVER > A=[2.04 -1 0 0;-1 2.04 -1 030 -1 2.04 -1;0 0 -1 2.041; >> B=[40.8;0,8;0.8;200.8]; >> Xeinv(a)*B Xe Page 1 Thomas Algoritham 65.969834 9378462 124.538228 159.479524 a © Page 2

You might also like