53 lines
2.2 KiB
Python
53 lines
2.2 KiB
Python
︠fc95f3c1-a936-4998-8a93-d564c9724b29︠
|
|
|
|
#zadanie 1
|
|
#a)
|
|
rownanie = x+2==3*x-5
|
|
solve(rownanie,x)
|
|
︡1be52d13-09fb-4354-acd9-1c53e46e65a0︡{"stdout":"[x == (7/2)]"}︡{"stdout":"\n"}︡{"done":true}
|
|
︠f1d01543-da22-4315-a221-cbb588f09728s︠
|
|
#b)
|
|
rownanie = x^2 + 3*x -1==0
|
|
solve(rownanie,x)
|
|
︡a48dc469-2a0a-42dd-b0d0-cad5769d0fad︡{"stdout":"[x == -1/2*sqrt(13) - 3/2, x == 1/2*sqrt(13) - 3/2]"}︡{"stdout":"\n"}︡{"done":true}
|
|
︠c63c976d-c517-4282-a8d2-a88e1cfd3082s︠
|
|
#c)
|
|
rownanie = 3^x*(x^2-4)==0
|
|
solve(rownanie,x)
|
|
︡0fef66d4-9f2d-45d3-b4c6-6c0fcf719b77︡{"stdout":"[x == -2, x == 2]\n"}︡{"done":true}
|
|
︠b91c13e2-47f1-4451-8e48-a2ef2c971198s︠
|
|
#zadanie 2
|
|
#a)
|
|
var('x,y')
|
|
solve([5*x+2*y==4,x-4*y==-2],x,y)
|
|
︡f0120e95-57dc-42b7-9f4d-52fcc7f6ebec︡{"stdout":"(x, y)\n"}︡{"stdout":"[[x == (6/11), y == (7/11)]]\n"}︡{"done":true}
|
|
︠0b8da61a-fa69-405e-a207-f4dd2b96d3c0s︠
|
|
P=implicit_plot(5*x+2*y==4,(x,-2,2),(y,-2,2), color="red")
|
|
G=implicit_plot(x-4*y==-2,(x,-2,2),(y,-2,2), color="blue")
|
|
M=points([(6/11,7/11)],size=40,color='green', figsize=4)
|
|
P+G+M
|
|
︡582f2bb2-55a4-4d78-8dcb-316c99ab3d18︡{"file":{"filename":"/home/user/.sage/temp/project-c71bd6ff-e020-4980-95da-2f48889b5fed/119/tmp_tv6IYT.svg","show":true,"text":null,"uuid":"67e135c3-be00-4163-9924-a793ac051383"},"once":false}︡{"done":true}
|
|
︠5411c6a5-3975-4998-8e11-840e9e34bc2es︠
|
|
#b)
|
|
var('x,y')
|
|
solve([x^2+2*x+y^2-4*x==20,2*x-y==0],x,y)
|
|
︡c42067d0-380e-4b8c-a874-315e05fab894︡{"stdout":"(x, y)\n"}︡{"stdout":"[[x == -1/5*sqrt(101) + 1/5, y == -2/5*sqrt(101) + 2/5], [x == 1/5*sqrt(101) + 1/5, y == 2/5*sqrt(101) + 2/5]]\n"}︡{"done":true}
|
|
︠13ac9c6f-6562-440a-a311-efdbcec06ff5s︠
|
|
P=implicit_plot(x^2+2*x+y^2-4*x==20,(x,-8,8),(y,-8,8), color="red")
|
|
G=implicit_plot(2*x-y==0,(x,-8,8),(y,-8,8), color="blue")
|
|
S=points([(-1/5*sqrt(101) + 1/5,-2/5*sqrt(101) + 2/5)], size=40,color='green',figsize=4)
|
|
T=points([(1/5*sqrt(101) + 1/5,2/5*sqrt(101) + 2/5)], size=40,color='green',figsize=4)
|
|
P+G+S+T
|
|
|
|
|
|
︡2b2da7bc-24ae-4265-96ae-a939b4a39394︡{"file":{"filename":"/home/user/.sage/temp/project-c71bd6ff-e020-4980-95da-2f48889b5fed/119/tmp_R1vJiD.svg","show":true,"text":null,"uuid":"3e2e56e8-0b7d-4c47-9d6e-b21f448ac5f3"},"once":false}︡{"done":true}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|