1.

> rovnice:=x^3 - (a-1)*x^2 + a^2*x - a^3;

rovnice := x^3-(a-1)*x^2+a^2*x-a^3

> reseni:=solve(rovnice,x);

reseni := 1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)+1/3*a-1/3, -1/12*(80*a^3+12*...reseni := 1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)+1/3*a-1/3, -1/12*(80*a^3+12*...reseni := 1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)+1/3*a-1/3, -1/12*(80*a^3+12*...reseni := 1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)+1/3*a-1/3, -1/12*(80*a^3+12*...

> reseni[1];

1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)+1/3*a-1/3

> vzorec:=reseni[1]: g:=unapply(vzorec,a);

g := proc (a) options operator, arrow; 1/6*(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)-6*(2/9*a^2+2/9*a-1/9)/(80*a^3+12*a^2+24*a-8+12*(48*a^6+24*a^5-12*a^3+33*a^4)^(1/2))^(1/3)...

> g(0); g(1); evalf(g(2));

1/6*(-8)^(1/3)-1/12*(-8)^(2/3)-1/3

1/6*(108+12*93^(1/2))^(1/3)-2/(108+12*93^(1/2))^(1/3)

1.607521767

2.

> restart: f:=x -> if x <= 1 and x >= -1 then 1 else 0 fi;

f := proc (x) options operator, arrow; if x <= 1 and -1 <= x then 1 else 0 end if end proc

> plot(f,-3..3,-0.5..1.5);

[Plot]

3.

> L:=proc(n::nonnegint)

> if n=0 then 1

> elif n=1 then x

> else expand( ((2*n-1)*x*L(n-1)-(n-1)*L(n-2))/n ) fi end;

L := proc (n::nonnegint) if n = 0 then 1 elif n = 1 then x else expand(((2*n-1)*x*L(n-1)-(n-1)*L(n-2))/n) end if end proc

> L(7);

429/16*x^7-693/16*x^5+315/16*x^3-35/16*x

> with (orthopoly);

[G, H, L, P, T, U]

> P(7,x);

429/16*x^7-693/16*x^5+315/16*x^3-35/16*x

4.

> rovnice:=x^2+y^2=5, x*y=y^2-2;

rovnice := x^2+y^2 = 5, x*y = y^2-2

> reseni:=solve({rovnice}, {x,y});

reseni := {x = 1, y = 2}, {y = -2, x = -1}, {y = RootOf(2*_Z^2-1), x = -3*RootOf(2*_Z^2-1)}

> convert(reseni[3],radical);

{y = 1/2*2^(1/2), x = -3/2*2^(1/2)}

> eval(rovnice, reseni[1]); eval(rovnice, reseni[2]); eval(rovnice, convert(reseni[3],radical));

5 = 5, 2 = 2

5 = 5, 2 = 2

5 = 5, (-3)/2 = (-3)/2

> r1:= fsolve( {rovnice}, {x,y});

r1 := {x = 2.121320344, y = -.7071067812}

> r2:= fsolve( {rovnice}, {x,y}, avoid = {r1}) ;

r2 := {x = -1.000000000, y = -2.000000000}

> r3:=  fsolve( {rovnice}, {x,y}, avoid = {r1,r2}) ;

r3 := {x = -2.121320344, y = .7071067812}

> r4:=  fsolve( {rovnice}, {x,y}, avoid = {r1,r2,r3}) ;

r4 := {x = 1.000000000, y = 2.000000000}

r5 := fsolve({x^2+y^2 = 5, x*y = y^2-2}, {x, y}, avoid = {{x = 2.121320344, y = -.7071067812}, {x = -2.121320344, y = .7071067812}, {x = -1.000000000, y = -2.000000000}, {x = 1.000000000, y = 2.000000...

5.

> solve(abs(x)<abs((x-3)^2),x);

RealRange(Open(7/2+1/2*13^(1/2)), infinity), RealRange(-infinity, Open(7/2-1/2*13^(1/2)))

>