0% found this document useful (0 votes)
29 views7 pages

Maths Lab Program

The document outlines various mathematical tasks using modern mathematical tools, specifically focusing on coding for calculus operations such as divergence, gradient, and Taylor series approximations. It includes instructions for using Sympy and other libraries to solve equations and visualize results. The tasks involve coding for vector fields and transformations, as well as applying Taylor's theorem at specified points.

Uploaded by

ashmita1032
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
0% found this document useful (0 votes)
29 views7 pages

Maths Lab Program

The document outlines various mathematical tasks using modern mathematical tools, specifically focusing on coding for calculus operations such as divergence, gradient, and Taylor series approximations. It includes instructions for using Sympy and other libraries to solve equations and visualize results. The tasks involve coding for vector fields and transformations, as well as applying Taylor's theorem at specified points.

Uploaded by

ashmita1032
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
eC eee 1. Ustaqg Mocesn Matiemattes tools, untle Ha Cocke +p feral ae cltvergence of Fe xy et ye 4 2*zk &. Ustagq Moclrm mrathenattes foots , wire the code fp -fead the cpreccttent ag $ = wy t+ axz-4 3B. Using the moclem martRemaltes fools, wirtle the code fo represent the vreltectten trom sfoamation TP phs + iad te Pua ¥ 4s vechos (10, >) when at fs ry Leoleal abovd the lets ' . 4. Use Medesn madiemattes tools * watle a Code 40 foc] ors qr a . xy , yor) et, by Taylor's: Servieg roy Sy Uetag Modem matQumattes tool o 7 wartle dua cole. sto frac sel tions of dy = x-yP ad font). givan stad- fled et by the Ronge tutta qt oacliv metfie 6. Vewng Mathematical tools 1 utle he code to ealve a : : )- 0 Aiprorantted equiadta su = 30° 4 ay wut 4 vstag Taylor's eater watdool at x= 0.1 (0.1) %3- © scanned with OKEN Scanner 1, Useagq Meclewn mathe maltes tools 5 wate hee tp tad the clvergence op Fa wy itye ft xzk from Sympy.. vector PT enpoot # w?~ Suepy tmport symbols N= Coord Sys 3D (nt!) ee symbols ("x y z') Ae NEES HN PN 14 NYE IN, ZY EET NLS NICH RD | Z* NK delop= Dell) CUvA = dotop. lotta) Atsplay (ctv) patad [¢"\n Divergence of CAYy Ps \a"} desplay (Awergence (a) colpul 7 9 lay 4 2 xty 4 b Xn nn oZy NN Dye NN Deveraence a NoxE2 Nyt nett Ney PNA NO DLE Xy + dx z Ce L ds N © scanned with OKEN Scanner [ 3, Using modern mathemathtes tool uugle +he cole to fod the qradrent °F pe y+ anz-4 > fercen sym py vector tn A feorn syumpy Teaport symbols N= Coond Sys 3D CN") X14) T= Symbols (Vey z') . ' Ae No 4*2 * Nf + Qk NA 2*N. ZY detop = Pel U) drsplay Cdetop (A)) gaad A = gnacltent (A) pat $n Gradient of fa} ts iw") Atsplay (qracl 4) : ovtpr} :- (r (oat yy + Oxy ZN > 4 Gob ttn «)) fa + (&. Cen Yat OM y zn -1) By O72 Gradéont of Net FQ7n. yt OY NF Na-4 fs (ax yur 2%0) fy + fer? )Iu + Cen) ill © scanned with OKEN Scanner tle the ecole aby mocim mathenaltes ay wat baa Oi ovr about the techton transforma way tua voctor (10,0) chen #1 - ants - grapoat Mompy as Mp impoat matblotltb . pyplot a ple | spe np- arras Cio, 03) ven =np ot ({C%,0> oJ,0% % oJJ) a= ope mateie CEC-0 Lo, 109) Vic p> cratetse (¥) vi = A¥ np. transpose (V1) Vi > op. array cv2) a \ ; ple. Sie Conga »VEE.o V0» ij calves = ('b'J,scale=s0) pit -qputves (Forgia , V2.0 09 , V2Lty )yeclor= ['r'] , smle=50) pit. show () ; output A 0.0h - 0.08 - 0.04 -0-04 -0.09 0.00 0-02 0.04 © Scanned with OKEN Scanner uy. from sympy trpos fe Xr yr symbols (' x, 4!) XO, XL = OY et Ydort ya soy Ydo = yd yds = -yde Yat = ydt. subs((xr04 ys 1) qete = yor. subs ({Lxi0, 419) qd = qet3 -svbs (fx: 0, yity) Fae ydos (x-x0) * yal + (x0) #2. gael tsxl= to. subs (x, 21) ile patnt (" Taylors sextet %! | te) patnd (' y Crier, ‘) 2 !, voved (tsx1,4)) Dvipet Ce Tarplors contee Ps ~ 2 ¥a/g + tP Rent] yf!) = 0.409% © scanned with OKEN Scanner On ae wk (x05 1) YOah) cdepsCxs y) 5 vel t-y HQ nz roved (Cxt- x0) lh) sf in mange (1, 041) § Ki h¥4 (x0, 4?) . KLE h¥ £ (X04 h]2 »yo4 KV/2) K3=h#4 Ccotnfe yqores le) ; KYU = hx = (1048, yo +K3) Ke (kige# KD t2¥23 4ky) /6 patat (URL =") Toved Ce, 4), "ede! proved (e2,u), tea et, wound (314) 1! ey S's rund CeU.Y), : 1 Kal, roveel (Ky) I= yp +e : : paint Cy (lr revel Cro th, 3): ') =!) rovcel Oy! 4)) XO = wth, YI sk (0,01, 1, 0.1) | output tie Ol bes -0, 0852 £3 =-0.0867 ky = 0.0934 k= 60.0862 qo) = 0.9138 al © scanned with OKEN Scanner &. Ustog Mathematical ted » cutie the code to Solve the & tf {ewntat equa Kon shit Ber 4 OW tO yle) =D Ustag Touglor!s sores wictbed al x= 0.1 (011) 3 from SUmpy tempoat x x _ symbole Cx “y? XD, x1, xQ, x3 = 0,612,798 463 yao =O yaa > 3% exp lx) + ar yao Qd& = 3% exper) + ar yal ycls = 3* explo) + ax yaa yas = ydd. sobs ({ x20, yee) yda = yda. sobs (CL x0, 7 04) is = yds. sobs ({ x50, yoy) sydd + (x-XO)* Yat + ioe anydola + @-xD)* Fry Wy tsxi = Es. cubs (x. x1) tsxQ= te. vbs (x, 2) tex3 = ts. subs (%1 x3) patnt ( . Tarylers sextes %5 % *, ts) past 4 Chas 2) = 22 wound (tsxt, 4) 4 patad ul ql +*Ds*)=7 4 wond (+ex2, 4)) pr cy (3,7) =") wvad Ctsx3,4)) + ourpe i genres te p axe ela t he xee ala + 3% (o.1) = 0348s (p.2) > 0.8080 4 (0-3) * 1.3498 © scanned with OKEN Scanner

You might also like