Kosmala-iwp2017/zajęcia 11/maxima.txt

22 lines
562 B
Plaintext
Raw Normal View History

2018-01-04 12:40:11 +01:00
1.
eq1: 2*x-2*y+z-w=7;
eq2: -x+4*y-5*z+3*w=1;
eq3: x+y-z+w=4;
eq4:-4*x+2*y+z-2*w=6;
linsolve([eq1,eq2,eq3,eq4],[x,y,w,z]);
2.
solve(x^3-21*x+20=0);
3.
h1(x):=x^2-2*x+3;
h2(x):=cos(2*x);
h3(x):=sin(1/x);
h4(x,y):=x^2+y^2;
h5(x,y):=x^2-y^2+2*x*y^2+1;
plot2d(h1,[x,-2,3],grid2d);
plot2d(h2,[x,-2*%pi,2*%pi],grid2d,[color,red]);
plot2d(h3,[x,-2*%pi,2*%pi],grid2d,[color,black]);
plot3d(h4,[x,-10,10],[y,-10,10],[palette,[gradient,green,blue,violet,black]]);
plot3d(h5,[x,-10,10],[y,-10,10],[palette,[gradient,cyan,green,yellow,orange,pink]]);