Kazmierczak-nidn2018z/30.01/2019-01-30-101152.sagews
Katarzyna Kaźmierczak bf0d90e6e8 sage
2019-01-30 11:12:27 +01:00

62 lines
2.6 KiB
Python

c6876629-5a8d-403f-93a2-28499d54a275
bca909e8-8a58-4379-b5f4-f5250f912018
00380177-63be-4568-8d97-f00c9dab84a4
#Zad. 1
rownanie = x+2 == 3*x-5
solve(rownanie,x)
dda7a285-2bc5-46e7-b471-de3b9f551fa5{"stdout":"[x == (7/2)]\n"}{"done":true}
ca3222bb-9c66-4c71-b671-3836c47e288bs
rownanie1 = x^2 + 3*x -1==0
solve(rownanie1,x)
a7e7cab4-0628-4fb0-abaa-41d012a7fe08{"stdout":"[x == -1/2*sqrt(13) - 3/2, x == 1/2*sqrt(13) - 3/2]"}{"stdout":"\n"}{"done":true}
1277d3a1-cad7-4644-94d0-cc0de8c6632es
rownanie2 = (3^x) * (x^2 - 4) ==0
solve (rownanie2,x)
1d03c5e2-f2fa-4c9f-9c3c-27912f6fed89{"stdout":"[x == -2, x == 2]\n"}{"done":true}
aca4e1d0-0d73-4c43-8aa2-e1877576d71es
rownanie3 = (x+2)/(x-1) == 3/(2*x-5)
solve(rownanie3,x)
f608c9d5-af6a-443e-be85-177b3a64244b{"stdout":"[x == -3/2*sqrt(2) + 1, x == 3/2*sqrt(2) + 1]\n"}{"done":true}
42478a52-1d14-4bb8-8e96-0247770190des
#Zad.2
var('x,y')
solve([5*x+2*y==4, x - 4*y == -2], x,y)
6787bb11-9c1d-4a0f-91a6-b0e426a1fec1{"stdout":"(x, y)\n"}{"stdout":"[[x == (6/11), y == (7/11)]]\n"}{"done":true}
7b96d798-ffdd-460f-9656-7f0eed8d8cc5s
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")
PG=points([((6/11),(7/11))], size=35, color ='green', figsize=4)
PG+P+G
0a9fee60-e22b-42d3-ad78-e3fe19de2f6d{"file":{"filename":"/home/user/.sage/temp/project-33ff7d87-4aac-4161-8964-4c58ecbed195/110/tmp_f0LiwZ.svg","show":true,"text":null,"uuid":"c82fdb12-74ef-4691-a95a-bcada09c2e78"},"once":false}{"done":true}
8f893135-757b-4c45-8b36-71e7b2886056s
#Zad. 2
var('x,y')
solve([x^2+ 2*x + y^2 - 4*x==20, 2*x - y == 0], x, y)
face8be1-1eaf-40a7-8e43-1b8a3a89ee80{"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}
d04f1c9b-201d-4ee8-8349-fdc4661f29e3s
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")
PG = points([(-1/5*sqrt(101) + 1/5,-2/5*sqrt(101) + 2/5)], size=35, color ='green', figsize=4)
PP = points([(1/5*sqrt(101) + 1/5,2/5*sqrt(101) + 2/5)], size=35, color ='green', figsize=4)
P+G+PG+PP
b0b14374-0abf-45a3-8be7-040a9e0ff9ac{"file":{"filename":"/home/user/.sage/temp/project-33ff7d87-4aac-4161-8964-4c58ecbed195/110/tmp_75mcfR.svg","show":true,"text":null,"uuid":"6260e235-39d2-4e03-a59b-c01e1b1cf4b4"},"once":false}{"done":true}