0 ratings0% found this document useful (0 votes) 49 views14 pagesCANM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
: . NAME : SAI ApSuM OMAR KARA
No: 2109032 a
ASSIGNMENT: 3
Use ony solver & sve AXP
xefr 4 6 > 14)
ye [rag u 2 7 *
xas Ve l¥ed o 6.5) |
dn polation 7 ~
Coc the Gren ada fib on apexes orden pulser sda,
» Died roativod \
yes volus ob S ok &
Gives porns Ww; wie &” Cyd
Taks genssh exereien of pelyrored with dagpse ‘Yy’
Oa cre ATE
the odeove prtroeml,
ye ante
Gubititeb Hoe given pointe in
Le atbrctare
132 goat GET ECT HATS
{le 96ar alow + BECtS are
1
2= ryorat Bu3bt yacs Pate
a ludte
\ze
aeqigat 2TH OT AEC2 ye -00t3et ha a3 - ianeseh er E5955 1F~ ta 65s
g Neston [rdingoloSion
A ore <
we Hs 4
\ \
y a c
ty 3 4 - OL FD
; \ 7.666% rae
ne 0.3F
4 a 1.3034
1.286
14 2
«ye dor Ar (at) + Be (nye GeO s
voit) ADE AIDED
y 144 HD FEDA-DE-Y) 4 Corr) oor
o.0NNEVODO 0-9)©) Leagunge. rdigartim
oy
(der) Gat) Co) Lot) BIEIAD G9) Ft
er 4 Gras) oy, ,G ag G9 G4) Jaca benentees )
Hagen) Gana) Ie GenGry &8 Ca
Gr ne 9EIO Ys 4
Une-o &A) Cu
WIOIOO a?)
in)
$$.
eD Ce DOH OL
42a) 66-00-DG9,
QT
(9a a) Ow
6-9 6) (99 a We ono (e-) 0
69) COE BGP GdG
—
tae ce DIZ ODEDE DEN
+e" Caste DOD EE OEDEY 6-9G-9 ae OAGOOD
| - ;
_ Given yur fa 6.3} |
| Boi Diced Method |
Aye : Akace') |
yel-O00)- ye (0.19629. |
Loam Neuter {pdtngeteon
pearly AY 126
yet 42999283 d
fon Lage’: bagair
At xe) Pew = 9,
gy 2 9.492865 |
esob
get Ge are ert &
S-3 yim pate t
so& yeout® a
pa ar byt
ioe Wor tht
We deagt Obst
ae hadyt Hee a
|The Giest Arivahive
paykt B= part »|
gayth, = BO.* be2 ay At bs Faye be k :
@7) “4
Lyast &3 = Ly ayt by
Rat by Feb = O
(ray= east be BS *
Vag bs Ha BAe
ected 9 uchsy frees,
The above capatine con ne
eee oo eo © ? *
oe, nee 0 2% *
ene uote Oe wo?
o 8 6 t °? o 8° moe
oo ? ee c= 4
o o °? ° o (Ma + 1 ° ° °
o 8 eo oe f 3 By
Beco on a o 0 0 0 te NM ‘
; ° 4 = 0 a 0 0 } ° a
> ~*~)? ate 8 8
oe eo 2 wy toe Mate
° o oe ° o 2 °be 3
\3
a i
OL \y
by a
eel G Br feo
ay iT
by °
ah. °
°
Oy °
boy
Cy
qe?
ate? bee
J. Ae mas
| 5s bt Le
Gx -?" cot
by23?
=e 90
as° by? 385? tye
2 VA 18 4
aye
gaye yee
ey ag tae?
| sas S24 _
430% ~
gat bo™ Hie?
| argu -se-85 4
sy. 87"© Colic’ gpliom’ ¢
Giver & poids , OE have 4 cadsic pis,
MS 4 uy ic 4 vy ,
yr! wow ee
‘ Ww Ga)
%
Let as taker, he cadbte Splints 2. = Se
i . 2 ea
ger ye Q-ad+ b, Ges) + G(r) a Gary
gare on (rwy gin (eH) + Gow td
aa, d7 Gaye cy xcs eroytds
S&L ye tH Gers} bs (enh Gat
a2
ge ae yee FG **
| x
(SAD ye Oe (So Oe 5x OG) :
> youd wi(e- 8 48>
at by 6-3) Ce) ady
wo e-)
13z oa. (2) & 4b, +3 cok —O.
|
i
|$-3
|c-¥ => yo oF (-
Vy \
aio!
\ Gv=>i ery
424
wets Sz
\=
in Sy
pO
eae
a ee 4 yer
gear
en? -Aanarie S®
Wea3 7 \ ae o3
@rpapin oy “Gy npain
r244—@ peers ur HAs
in SY
yest ras — @
+£3G+44—Ofaking Fret doayelive
nck ree dem
Ceuy 426 GA4) 4 |
wu
ga, C4 ao
paar ebrt~@ =? 7
gog Gey +rbs(i-e) +o 234 G-taeGd*e]
7
\votr gto - C3 =0 —©©.
Bay Coca Ws C-O <> say? eee) es jaa
Zasrr ost Cyril =? —o
Nee dhanseobive ok inden pe ana emul Hor
Gor) tO gary tr lee
—pk=e —@
tg ay t2h
| Ge Gores * gan es tt lees
|
yrastd 2) en
Fagen 67 saver
|
| a5 ares Tey e oO
Second diverts ak onc powhs oat ero
Gaadr ab, =olre) ) poner teen? eV
| ULAY FL bG=O-
at ikouior ports |
anual Spon,008 Seon oo 0 ooo
S8000 g® or 2 8 7 O80 9 9
F oped
f2a0e 9008992 29%
a
Z a On ees,
F200 0 00990 Fo GB?
ar)
© ote00077009° 8 2%
- - °®g 0 ° -
on 0 of ot oe oT
graio °
eo
°
°
°
O
1BaL> ~0. 544) <. ——d
O20: OF4S
b= 0 bor> -0-6 909 ¢
Qs 4.6909 Crt 2.658L
ar }.o dps (3.000
Qy2
yz Ue Oyr —0. 1054
bse —4.\¥Sy but DL Wy
Qe 6. 9uS Cys ~ 89056
ay > 11-0000 AEF L-0000
Gays 0.08 CANT 474-6709 GA) +)
AAG s - 7
21-0549 G-t)-0.6909 OF Feaesee (9 412
| s-35 wn Cag Us STE E9PUEO OT
aye [Link] G9) He
far: _ofosu ay Free
|
Given ae | Given 1 6A,
La cone pec eplinuy, | neat J quoratis phy
ye} Yo (0-043 FS
Ta cow of Cubrie pints, | ie coun eo ERY
| es _
| oa Y= 4. COFFS
aclINTERPOLATION:
a=[1.467 14}
be[t 13 112 12)
inspace(1, 14,1000);
yDIRECTMETHOD=(-0.1389"x."4)+(2.223'x.93)-(13.3656"x.*2)+(35.9551*x)-23.6735;
yNEWTONSMETHOD=1+4.*(x-1)-(x-1)."(x-4)-0.2778."(x-1).*(x-4).*(X-6)#0,05191."(x-1)."(x-4).*(
x-6).*(%-7);
yLAGRANGEMETHOD=((1/1170).*(x-4)."(X-6)."(X-7)."(-14))-((13/180)."(X-1).°(%-6)."0-7).°(0-14)
)+((11180).*(%-1).*(4).*(0-7).*(-14))H(21126).*(X-1)."(-4).*(X-B).*(%-14))#((1217280)."(%-1)."(-4)
*(-6).°067));
plot(x,yNEWTONSMETHOD,"b .")
hold on
plot(x,yDIRECTMETHOD,"r-")
hold on
plot(x,yLAGRANGEMETHOD, "g -.")
hold on
legend("NEWTONS METHOD",
xlabel(a)
ylabel(b)
"LAGRANGE METHOD")13
See
200
-1000
-1200
-1400
0
NEWTONS METHOD
DIRECT METHOD
LAGRANGES METHOD‘SPLINES:
x=linspace(1,14,1000);
a=[1467 14);
b=[1 1311.2 12);
for i=4:length(x)
if x(i}<=4
quad(i)=(4.*X(i))-3;
elseif x())<=6 & x(i)>4
quad(i)=(-2.5."(x(i)."2))+(24.*x(i))-43;
elseif x(i)<=7 & x(i)>6
quadti)=(-3.*(x(i)“2))}+(30."x(i)}-61;
else
‘quad(i)=(1.9184.*(x(i).42))-(38.8571.*x(i))+180;
end
end
for i=1:length(x)
if x(i)s=4
‘ubic(i)= (-0.0745.*(x(i)-1).*3)+(4.6709."(x(i}-1))}#1;
elseif x(i)<=6 & x(i)>4
cubic(i)=(-0.5791."(x(i}-4).3)-(0.6709.*(x(i)-4).42)+(2.6582."(x()-4))+13;
elseif x())<=7 & x(i)>6
cubic(i)=(2.12.*(x(i)-6).*3)-(4.1454.*(x(i)-6).92)-(6.9745.*(x(i)-6)) +11;
else
‘cubic(i)=(-0.1054.*(x(i)-7)."3)+(2.2144.*(x(i)-7).2)-(8.9055."(x(i}-7))+2;
end
end
plot([Link],"b")
hold on
plot(x,cubic,"r")
hold on
plot(a.b,"v")
hold off
xlabel("a")
ylabel("b")
legend("Quadratic”,"Cubic")15
10
-10
‘Quadratid
Cubic