# Polynomy a racionální funkce

p1:-3*x+7*x^2-3*x^3+7*x^4;

polynomialp(p1,[x]);

coeff(p1,x^4);

p2:5*x^5+3*x^3+x^2-2*x+1;

2*p1-3*p2+3;

expand(%);

p1*p2;

expand(%);

(3*x+5)^10;

expand(%);

quotient(p2,p1);

remainder(p2,p1);

divide(p2,p1);

gcd(p2,p1);

pol:expand(p2*p1);

factor(pol);

gfactor(pol);

p:x^2+1;

factor(p);

gfactor(p);

pol:8*x^3-12*x;

factor(pol);

pol:6*x*y^5+12*y^4+14*y^3*x^3 -15*x^2*y^3 + 9*x^3*y^2 - 30*x*y^2 - 35*x^4*y + 18*y*x^2 +21*x^5;

factor(pol);

r:(x^2+3*x+2)/ (x^2+5*x+6);

num(r);denom(r);

rat(r);

(x^(100)-1)/(x-1);

rat(%);

f:161*y^3+333*x*y^2+184*y^2+162*x^2*y+144*x*y+77*y+99*x+88$

g:49*y^2+28*x^2*y+63*x*y+147*y+36*x^3+32*x^2+117*x+104$

racfce:f/g;

rat(racfce);

q:(x^3+x^2-x+1)/p1;

partfrac(q, x);

1/(x^4-5*x^2+6);

partfrac(%, x);

power:(x+1)^(-2);

expand(power);

r1:(x+1)^2/((x^2+x)*x);

expand(r1);

r2:expand(num(r1))/expand(denom(r1));

factor(r2);

(x-1)*(x+2)/((x+1)*x)+(x-1)/(1+x)^2;

rat(%);