login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

## Appendix B  Examples

Polynomials, rational functions:

 coeff(X**3 + 3*X**2*Y + 3*X*Y**2 + Y**3,x); reduce
 gcd(X**2 + 4*X + 3,X**2 - 2*X - 3); reduce
 resultant(X**2 + 4*X + 3,X**2 - 2*X - 3,x); reduce
 decompose(x**6+6x**4+x**3+9x**2+3x-5); reduce
 factorize(x**6+6x**4+x**3+9x**2+3x); reduce
 roots(x**6+6x**4+x**3+9x**2+3x-5); reduce
 interpol({0,7,26,63},z,{1,2,3,4}); reduce

partial fraction decomposition:

 pf(2/((x+1)^2*(x+2)),x); reduce

Matrices:

 m:=mat((1,x),(2,y)); reduce
 1/m; reduce
 det m; reduce

Ordinary differential equations:

 load odesolve; odesolve(df(y(x),x)=y(x)+x**2+2,y(x),x); *** y declared operator reduce

Linear system (hidden):

 solve({(a*x+y)/(z-1)-3,y+b+z,x-y}, {x,y,z}); reduce

Transcendental equations:

 solve(a**(2*x)-3*a**x+2,x); reduce

Polynomial systems:

 solve( { a*c1 - b*c1**2 - g*c1*c2 + e*c3, -g*c1*c2 + (e+t)*c3 -k*c2, g*c1*c2 + k*c2 - (e+t) * c3}, {c3,c2,c1}); reduce

Structural analysis:

 load_package compact; compact(s*(1-(sin x**2)) +c*(1-(cos x)**2) +(sin x)**2+(cos x)**2, {cos x^2+sin x^2=1}); reduce

Calculus:

 df(exp(x**2)/x,x,2); reduce
 int(x^3*exp(2x),x); reduce
 limit(x*sin(1/x),x,infinity); reduce

Series:

 on rounded; taylor(sin(x+1),x,0,4); reduce
 sum(n,n); reduce
 prod(n/(n+2),n); reduce

Complex numbers:

 w:=(x+3*i)**2; reduce

Rounded numbers:

 precision 25; reduce
 pi**2; reduce

Modular numbers:

 on modular; *** Domain mode rounded changed to modular setmod 17; reduce
 (x-1)**2; reduce
 factorize ws; reduce

 Subject:   Be Bold !! ( 14 subscribers )