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

# Edit detail for ReduceAppendixB revision 1 of 1

 1 Editor: Bill Page Time: 2007/09/12 12:23:06 GMT-7 Note:

changed:
-
<H2><A NAME="htoc18">Appendix B</A>&nbsp;&nbsp;Examples</H2>

Polynomials, rational functions:

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

partial fraction decomposition:

\begin{reduce}
pf(2/((x+1)^2*(x+2)),x);
\end{reduce}

Matrices:

\begin{reduce}
m:=mat((1,x),(2,y));
1/m;
det m;
\end{reduce}

Ordinary differential equations:

\begin{reduce}
odesolve(df(y(x),x)=y(x)+x**2+2,y(x),x);
\end{reduce}

Linear system (hidden):

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

Transcendental equations:

\begin{reduce}
solve(a**(2*x)-3*a**x+2,x);
\end{reduce}

Polynomial systems:

\begin{reduce}
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});
\end{reduce}

Structural analysis:

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

Calculus:

\begin{reduce}
df(exp(x**2)/x,x,2);
int(x^3*exp(2x),x);
limit(x*sin(1/x),x,infinity);
\end{reduce}

Series:

\begin{reduce}
on rounded;
taylor(sin(x+1),x,0,4);
sum(n,n);
prod(n/(n+2),n);
\end{reduce}

Complex numbers:

\begin{reduce}
w:=(x+3*i)**2;
\end{reduce}

Rounded numbers:

\begin{reduce}
precision 25;
pi**2;
\end{reduce}

Modular numbers:

\begin{reduce}
on modular;
setmod 17;
(x-1)**2;
factorize ws;
\end{reduce}



## 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