CoCalc Public Files4 / 4.1.sagewsOpen with one click!
Author: Georgy Lazarev
Views : 38
Compute Environment: Ubuntu 18.04 (Deprecated)
var('x') var('y') f1(x,y)=y+(1.5)*(cos(x-1))-1 f2(x,y)=(0.9)*(y^2)+(0.4)*(x^2)-1 df1_x(x,y)=diff(f1,x) df1_x df1_y(x,y)=diff(f1,y) df1_y df2_x(x,y)=diff(f2,x) df2_x df2_y(x,y)=diff(f2,y) df2_y def solve_s(s1,s2): a=s1[0]+s2[0]*(-(s1[1])/(s2[1])) b=s1[2]+s2[2]*(-(s1[1])/(s2[1])) g=b/a h=(s2[2]-s2[0]*g)/(s2[1]) return [g,h] eps=10^(-6) k=0 x=1.7 y=-0.5 k=0 while (k<10): k+=1 k a=df1_x(x,y) b=df1_y(x,y) e=-f1(x,y) c=df2_x(x,y) d=df2_y(x,y) f=f2(x,y) s1=[a,b,e] s2=[c,d,f] g,h=solve_s(s1,s2)[0],solve_s(s1,s2)[1] g h x1=x+g x1 y1=y+h y1 x=x1 y=y1 x y plot(1-(1.5)*cos(x-1), (x,-2,2))
x y (x, y) |--> -1.50000000000000*sin(x - 1) (x, y) |--> 1.00000000000000 (x, y) |--> 0.800000000000000*x (x, y) |--> 1.80000000000000*y 1 1.42454482108129 1.72931217407840 3.12454482108129 1.22931217407840 2 0.568716728592658 1.28509758345359 3.69326154967395 2.51440975753199 3 1.84528113729822 1.03713724980056 5.53854268697217 3.55154700733255 4 -7.43450698983142 8.69157814421458 -1.89596430285925 12.2431251515471 5 -36.7400589573732 3.61274416748116 -38.6360232602325 15.8558693190283 6 -17.3672724898274 10.0055053981483 -56.0032957500599 25.8613747171766 7 -40.7542086066547 0.635466945943738 -96.7575043567145 26.4968416631203 8 -106.948734743279 -81.8293316252138 -203.706239099993 -55.3324899620934 9 -106.809883292866 -19.5458505287730 -310.516122392859 -74.8783404908664 10 -156.544119148952 -35.0614363494227 -467.060241541811 -109.939776840289 -467.060241541811 -109.939776840289