Řešení algebraických rovnic
Řešte dané algebraické rovnice. Proveďte zkoušku!
Vyzkoušejte příkazy: solve, find_root, allroots, bfallroots,
realroots, to_poly_solve, ev, factor, wxplot2d
a) 5*x^2-4*x-3=0
| (%i1) | r1:5*x^2-4*x-3=0; |
| (%i2) | wxplot2d(lhs(r1),[x,-2,2]); |
| (%i3) | solve(r1,x); |
| (%i4) | reseni:solve(r1,x); |
| (%i5) | expand(ev(r1,reseni[1])); expand(ev(r1,reseni[2])); |
| (%i7) | find_root(r1,x,-1,0); find_root(r1,x,0,1.5); |
| (%i9) | allroots(r1); |
| (%i10) | bfallroots(r1); |
| (%i11) | realroots(r1); |
| (%i12) | to_poly_solve([r1],[x]); |
| (%i13) | factor(lhs(r1)); |
b) x^4-4*x^2+4=0
| (%i14) | r2:x^4-4*x^2+4=0; |
| (%i15) | wxplot2d(lhs(r2),[x,-2,2]); |
| (%i16) | reseni:solve(r2,x); |
| (%i17) | ev(r2,reseni[1]); ev(r2,reseni[2]); |
| (%i19) | factor(lhs(r2)); |
c) x^4-x^3-x^2-x-2=0
| (%i20) | r3:x^4-x^3-x^2-x-2; |
| (%i21) | wxplot2d(lhs(r3),[x,-2,3]); |
| (%i22) | reseni:solve(r3,x); |
| (%i23) |
ev(r3,reseni[1]); ev(r3,reseni[2]); ev(r3,reseni[3]); ev(r3,reseni[4]); |
| (%i27) | allroots(r3); |
| (%i28) | realroots(r3); |
| (%i29) | to_poly_solve(r3,x); |
d) x^6-1=0
| (%i30) | r4:x^6-1=0; |
| (%i31) | wxplot2d(lhs(r4),[x,-2,2],[y,-2,2]); |
| (%i32) | reseni:solve(r4,x); |
| (%i33) |
expand(ev(r4,reseni[1])); expand(ev(r4,reseni[2])); expand(ev(r4,reseni[3])); expand(ev(r4,reseni[4])); |
| (%i37) | realroots(r4); |
| (%i38) | factor(lhs(r4)); |