0% found this document useful (0 votes)
7 views16 pages

Maths Observation (Lab 1 - Lab3)

Uploaded by

hemalathas1905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

Maths Observation (Lab 1 - Lab3)

Uploaded by

hemalathas1905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

(ontento

LABa- Fnding Angde botusn Tuo folas lonues lumvatia ond


luatioe.
LAB3 - Finding hortial Dasivabus od Jacobain
LA8y - Taylon Qsues Exkanaisn od L'Hosfeal'y ule

LAB1 -Eualtisn o Taouhen Lnbqals


LAB8 -Nuuvital golition dyslam o< Equation, uat len

IAG4-doutn e Linaaa louation by naus -caidal Mehod


LABID - Grui Eign Walas ad loeshonding Eigan Vedors, Find ha
Dornst Eigin Malaa ad bresfonding Lign Valoxo hy
Raylgh foun Melhad
IAG1- A0- lot lasuin ad folo loMe
4.PhorT ING PoTNTs (Aatlad plot)
X: [1,a,3,4,6,+,8]
Y. [a,t,9,,5,Ib,3] ScATTER PozNTS
PU. Satto Cx,)
Plt. xlabal C'x- a')
Plt. ylablC'y -aais) 6
PIA. tla C'S tatton pounbs') 4
PlL- Ghow)
X- aois

a PloTTINb A L(NE ne lot)

X [1,9.3,46, t,8]
Y.[a,,9,9,5,1b,33

Plt ylabel C'X-aais')


PIE. YlabelC'y-bais )
My TuRsT GRAPH
PlL how ) 10

6 2
1.4 Funtiont
3. Exhantntial Cue ,y: e
inhont nuny as np
imont ralhotlkb. pytbt os plt
X> Dp.aange l- lo, lo, 0, 001)
Plt plet Cx,y)
Plb tla C"Exhsrontial Cusus ")
Ex PONENTIAL CuRVE
Plt- gud() do oo0
Plt.ahow)
15000

lD000

5000

-5.0 215 00 S 5,0 7.5 10.0

4.SzNE ANp (osINE (URVES


itot ratGUib pyhbt as plt
X. Dp:09sage l-10, 1o, 0, o. Do1)

PIA þlst C, 71,X,ya)


PlA. ttlec"ine luue ond ouinalu)
PIE. Xlabll" Ualues o x)
PUL. g9ud)
Pl ahou
5.Rsgxam To lot a einjle Grah

X. np.Lnspas (o, a, 100)

plt plot Cx,x**, ahel e ubic')


plt-xlabel C'x label )
pl. ylabl C'y labal')

pt how)

3 ade-'y'sy

3 4
3.Strhsdi q'la -x) -g Ca+x0, a>o
*xa) *(a+x), lx,-5, 5) -5,
(y, 5)
Eo :(t'**a)*(2x), (ý
tlla'bohoidi $y'a x'2(a+ x),a >o $)
-x) i$y^2(a-x):x^alatx), a>0
snohhad

8-Cisoid'y (a-x)- ,a >0

-4

P5 -b-ilic
Eqll7** 3), (x**s) *(t- X**a), Cx,-s, s) ,,-S.5))
infot nathlslib pgflot as plt
Suds znp.Qsoge (o, (3x npPi),o. o1)
135

plt Jobrli, ,'g').


pot)

81s
226

Ihadioid:.5l1tlos 8)
Reto lioe lo,a *nP.Pi,1000)
315t5xos Chaa)
foanlRaa, 4,'91)

210
Tout Leaued Rou9 Qoa)
12

Fhala liralea lo, axpi, Apoo)


Aolaa CPata,91, 9')
Jhou)
D

31ç

270

B
Cardiod; T-atacosl6) and a- Costo)

import umpy a np
inpoyt matplotib. pyplot a plt
impot ma tt
plt.yaxes Cprojechion:' polaa)
a3
Tad -np.o17ange (6, (3 "np-pi)
Do1)
tor i in Yad
T-a+lat np.c0s ti)
pt-polar Ci,n, 'g')
TIa-(a "np.eos (i))
plt prlar (i,mi,r:)
plt. showt)
fara metie taahon
Civde :y alosle) ;ya 6in (e)
import wumpy asnp
imaort mt plot lib.pyplot vas plt
det civce Cr):

tor theta in np: Linspate (s *npp) 3, 2np.pi , tbo);


Xappend (r*np LOS Ctheto))
y-angend (rtnpsin (theta)
pl+. plot (xy)
pl+ show)
iYtle Cs)

Is.Cycloid:x a(o-rint);y zati-sino)


import mmpy as np
import matplattib pyplot as plt
det ydoid (r):

tor ttaeta in np.inypae (-2"np.pi, 2*np.pi s1D0) :


I apsrnd tr*heta np.in ttheta)
y. append (r(I-np. tos Ctheta) 35
ft.plot (1,y) 304
Plt. how() 2.6
204
ycloid (3)
1:0-4

1D
nve usvat
LAB-2 : finding tlu angle hcent opolan cuve
and radiu eË (vatue
betveen tuao pola luavo:
Anale r: 4(I4ost) and s(-tos t)
heten wves
1- sind the vangle
- trvm ympy imaart
tymbos e'r,t)
;oihsNl
=5C1-tosC)
drl=di+ (0t)
d9diH (Y9,t)

t s/dx 2
4- solve (-0;t)

yI atan lw)
y2 atan (w)

Print ('Angle betaLen waves in radi ans is olo 0.34'ofo (w)


Dutput:
e ngle beten luaves in radians a
te$4|.

9. tind u ongle blw te ores 0st vand e Ssio


bvom hymy import
ht6ymeols l ' , t " ) e e o i

2=5* ( in(H);
dr t di4 (1,t)

41/drl
t2/dr 2
- solye l-T2,t)
oI= tl.hubs (it: ot ( to1)3)
w2 t suhs (8 ti4loat (VCo])3)
yIatantol)
yatan(w)
int t'Angte hetaen uves in madians is lo o, 'o ttoot lw)

la tan (4/:)] vnale heten uVes in vadians ws 511

Radis uovatu
1- And 4u yadi nË CUnvatw T- 4tit tos4 ) at t-N2
-brom hympyineot *

1=hlI4cOS c+))
Avaive(t). døitt ) doit()
T9- euvative YI.t)-doit)
Tho (r**2 +r| ) **C1-s)/(r2+2'|*2-7"y);
thol ho. suhs lt, pil>)

Dutpudt
Tku radius t nvatuu ws 3.1H2unis

Parametht waves
unvatwu x:a cost), y a bintt)
tind ta nadius t
tm hymp-import
kymp abl ipost ho, iy9, Kit.a, b,ci alphe
rom
y lsqt ()-4)*2
y a sintt)
2 a o s (t) aenivehe
(aeivative (y.t). dolt () /simplidy (
dydr - simplgy
(x,t)*dgit o)
fimplity (t4 dy dy*2) **:.s/ t 0erivative (dyd.t).dritt)
sho
(0enivatve (xit) doit )))
e)) toat( is', Pi/u) cwnvatwe
, at \o('n Print
2
evho);1/howratuu:
y s, Pi/e4 ard
t- vatl unvatwe Radiusa splay
(' di
la,); Suhs hot sho2:
ltt); subs
hotho.
pi/4 41-
simplno)) eat play dis
uoVatwe
) ws ('Radis
ol frit
(noivative
-do t)(dydy, 1·5| )*dydx cettSimpiby 7ho-
(yt).doit Sivnplity
0) (Denivative himplity dydr
o)
/ doit lyt).(Beivative
(3/2) *(H) osla' X
y-(a*sintt))
(3/a) *
trom
Calpha y,kt,
ib, a X,ho, imaotynpy.abe
+)2 t)'-(a
D-23 Pi/z)
is (s,Cwavatwy
at
Si5 anat5
d cvatww adiuso
-a(tooit)tPi/2
Dtut
sloct(Cuvatu
)) P/2)is, (s. vatwu
at ('nn fint
Cuvatwre-/ho
2;
(oho2);
unvati
at us
DRadie\n Print
simpli is' Pil2 tard y-5
Simpliho) display
tiat
Dutput
Fodi woD uvatunG is 3.D (a coscu)+o/ta sinCt))*o
Ca tosct)) 3-O4onCe) int
lasinct))s
Radius , euvats at et and t- Pi/ us- 2-522681 24 S761l
owatwu mt l, Pi/u) Ws D.31 b40237166 5 13 D.
LAB-3:Finding paytal deiva tives ad ia tooian tuntiovu
-Beveral Variables
3t Pothal Aerivatives
deoia ives, lyey
Usy Uyn tor lrexp) (o Costy)-
I- rove that mized partial
ysinty').
brrm sympy mport r

dux dit Cu,)


duy dibtCuy)
duxy oiH (duxy)

1} duey rcuy:
Pri nt e'Mized patial derivatives are eual')
ese
not eaual')
print ('Mized pavtial derivahves
Autput
Mixed ptial derivatives au eual.
2- prove tat it u- ex (x costy)-y sinty)) 4len Urx tUyy00
-trom hymp impot

u erplx) *(n Cos ty)-ysin(y)


disglay tu)
dux dit,(u)
duy dik (uny
udyy-dit Cauy>y)
w UY tuyy
wimpiby Cw)
prird l'aw! goat (uo))
Dutat

Tt Joeobiay
I: u = 7ylz Vy/X, W=ZX/y the prove that J=4
- trom symay impot *
X>yiz= symhots ('xyz)
Vy"z3

dux d tu,x)
duy di7 (uy
dvx dt Cv,)
dvy di Cv.y)

duox dik(ox)
doy - ditto.y)
duoz dL(o,z)
J-matr Ccdux, duy, dulz] ,Cavx,dvy dvz],Cdwr, duy. dwzl
Print(The Jacoban matixs \n')
displaycs)
Jat =det(s). doit ()
print l'n,Jac)

Tu Tooain matiy

X2

y yz
2 E I us 23y73y- 4xy x, w-2xytun' povoe tat
at (1,-1, D) .T: 20
- g bvom sympy impot

duy d k (u)
du z ditt lurz)
dvz dt (v. x)
dvy dit (v.y)
dvz dit (v. 2)

duy aibs (wy)


dwz dig tw) dwz]]D;
J-matrit Ctcau, duy, duz),,Cdvx,dvy,dvz] ,Cdox, duwy,
prit ( Tu pobi an matin is ")
dhçlay 3)
Jac- Aoteymivart )dit)

disglay C3)

Jacl 9aterminat lIidoit)


display (sar t)
Putud
Te Jacobian mati Js
3) 7= p cos () Sinte) ·y p' tost) Cus (0) Z:)
tind y(ot, V,2)
Y(po, e)

msympy -abeipot ho, phi,tuta


Y=hocos Cpi) Ds (Hueta);

dy uate (, ho)doito
dy -Alrietve ty, sho). doit()
dz Aeivative (z,ho).doit
dx=Aivahve (x,yhe) phi)- doit()
dyianù vative (y pi). doit()
dz = A0uyotive lz, pha) doit)
de2 9uvah v (x, Hueta)doit)
dy aeuyative Cyiteta)- doit)
dz aouivaive Cztueta doit
T- watisCrcds,dy, dz],(dxt, dy,dz),CAs.2, dy2, dz )1);
Pirt C Te Jacobian motnn is)
diyplayti)
display Chimplty (Oaterminant (i). doit o)]
Te Saob jan matix
Sin (o) eDS0
-Psinto) Sine) -Psinch)toslo)
Plost) cos(o) -Psin t) os ()

J-p'cost d)

You might also like