Eine Auswahl von Tests aus dem Wester Benchmark:

1. Berechnung von 50! :

In> 50! 
 Out> 30414093201713378043612608166064768844377641568960512000000000000 

2. Die Primfaktorzerlegung von 6! :

In> ans:=Factors(6!) 
 Out> {{2,4},{5,1},{3,2}} 
Die Liste ist folgendermaßen zu interpretieren:

In> PrettyForm(FW(ans))
 
 4        2
2  * 5 * 3 

Out> True 

3. Berechnung von 1/2 + ... + 1/10 :

In>  Sum(i,2,10,1/i) 
 Out> 4861/2520 

4. Berechnung eines Näherungswertes für
   e^(Pi*sqrt(163)) auf 50 Stellen :

In> Precision(50) 
In> N(Exp(Pi*Sqrt(163))) 
 Out> 262537412640768743.99999999999925007259719818568885219682604177332393 

5. Berechnung der Dezimaldarstellung von 1/7 :

In> Decimal(1/7)
 Out> {0,{1,4,2,8,5,7}} 

6. Berechnung von Pi als Kettenbruch :

In> PrettyForm(ContFrac(Pi()))
 
                 1             
3 + ---------------------------
                   1           
    7 + -----------------------
                     1         
        15 + ------------------
                       1       
             1 + --------------
                          1    
                 292 + --------
                       1 + rest

Out> True 

7. Vereinfachung von sqrt(2*sqrt(3)+4) :

In>  RadSimp(Sqrt(2*Sqrt(3)+4)) 
 Out> 1+Sqrt(3) 

8. Vereinfachung von sqrt(14+3*sqrt(3+2*sqrt(5-12*sqrt(3-2*sqrt(2))))) :

In> RadSimp(Sqrt(14+3*Sqrt(3+2*Sqrt(5-12*Sqrt(3-2*Sqrt(2)))))) 
 Out> 3+Sqrt(2) 

9. Vereinfachung von 2*infinity-3. :

In> 2*Infinity-3 
 Out> Infinity 

10. Vereinfachung von (x^2-4)/(x^2+4x+4) :

In>  PrettyForm(GcdReduce((x^2-4)/(x^2+4*x+4),x)) 
 
-2 + x
------
2 + x 

Out> True 

11. Ausmultiplizieren, Ableiten und Faktorisieren von (x+1)^5 :

In>  ans:=Factors(D(x)Expand((x+1)^5))
In> PrettyForm(FW(ans)) 
 
         4    
( 1 + x )  * 5

Out> True 

12. Vereinfachung von sqrt(997) - (997^3)^(1/6) :

In>  RadSimp(Sqrt(997)-997^3^(1/6)) 
 Out> 0 

13. Vereinfachung von sqrt(999983) - (999983^3)^(1/6) :

In> RadSimp(Sqrt(999983)-999983^3^(1/6)) 
 Out> 0 

14. Erkennen, dass (2^(1/3)+4^(1/3))^3-6*(2^(1/3)+4^(1/3)) - 6 gleich 0 ist :

In> RadSimp((2^(1/3)+4^(1/3))^3-6*(2^(1/3)+4^(1/3))-6) 
 Out> 0 

15. Umwandlung von log e^z in z :

In> Simplify(Ln(Exp(z))) 
 Out> z 

16. Invertieren der 2x2 Matrix [[a,b],[1,ab]] :

In>  A:={{a,b},{1,a*b}} 
In> ans:=Inverse(A) 
 Out> {{(a*b)/(b*a^2-b),(-b)/(b*a^2-b)},{-1/(b*a^2-b),a/(b*a^2-b)}} 
In> TableForm(Simplify(ans)) 
 {1/(a+ -1/a),1/(1-a^2)}
{1/(b-b*a^2),1/(b*a-b/a)}
Out> True 

17. Berechnung der Eigenwerte der Matrix [[5, -3, -7],[-2, 1, 2],[ 2, -3, -4]] :

In>  A:={{5,-3,-7},{-2,1,2},{2,-3,-4}} 
In> EigenValues(A) 
 Out> {1,3,-2} 

18. Limes von (1-cos x)/x^2 für x gegen Null :

In> Limit(x,0)(1-Cos(x))/x^2 
 Out> 1/2 

19. Ableitung von |x| :

In> D(x)Abs(x) 
 Out> Sign(x) 

20. Stammfunktion von |x| :

In> AntiDeriv(Abs(x),x) 
 Out> (Abs(x)*x)/2 

21. Ableitung von |x| (stückweise definiert) :

In> D(x)if(x<0)(-x)else x
 Out>  if(x<0)-1else1 

22. Stammfunktion von |x| (stückweise definiert) :

In> AntiDeriv(if(x<0)(-x)else x,x)
 Out> if(x<0)(-x^2/2)else x^2/2 

23. Die ersten Summanden der Taylorentwicklung von
    1/sqrt(1-v^2/c^2) an der Stelle v=0 :

In> ans:=Taylor(v,0,4)Sqrt(1/(1-v^2/c^2)) 
In> ans:=Simplify(ans) 
In> PrettyForm(ans) 
 
       2          4
      v      3 * v 
1 + ------ + ------
         2        4
    2 * c    8 * c 

Out> True 

24. Der Kehrwert des Quadrates der obigen Lösung :

In>  ans:=Taylor(v,0,4)(1/ans)^2 
In> PrettyForm(Simplify(ans)) 
 
     2
    v 
1 - --
     2
    c 

Out> True 

25. Berechnung der Taylorentwicklung von tan(x) an der Stelle x=0
    durch Dividieren der Entwicklungen von sin(x) und cos(x) :

In>  ans1:=Taylor(x,0,5)Sin(x)/Cos(x) 
In> PrettyForm(ans1) 

     3        5
    x    2 * x 
x + -- + ------
    3      15  

In> ans2:=Taylor(x,0,5)Tan(x) 
In> PrettyForm(ans2) 

     3        5
    x    2 * x 
x + -- + ------
    3      15  

In> ans1-ans2 
 Out> 0 

26. Direkte Berechnung der Legendre Polynome :

In> 10#Legendre(0,_x)<--1
In> 20#Legendre(n_IsInteger,_x)<--[Local(result);result:=[Local(x);Expand(1/(2^n*n!)*Deriv(x,n)Expand((x^2-1)^n,x));];Eval(result);] 
In> ForEach(item,Table(Legendre(i,x),i,0,4,1))PrettyForm(item) 

1


x


          2
-1 + 3 * x 
-----------
     2     


              3
-3 * x + 5 * x 
---------------
       2       


           2         4
3   -15 * x    35 * x 
- + -------- + -------
8      4          8   


27. Rekursive Berechnung der Legendre Polynome :

In> 10#LegendreRecursive(0,_x)<--1 
In> 20#LegendreRecursive(1,_x)<--x 
In> 30#LegendreRecursive(n_IsPositiveInteger,_x)<--Expand(((2*n-1)*x*LegendreRecursive(n-1,x)-(n-1)*LegendreRecursive(n-2,x))/n) 
In> ForEach(item,Table(LegendreRecursive(i,x),i,0,4,1))PrettyForm(item) 

1


x


          2
-1 + 3 * x 
-----------
     2     


              3
-3 * x + 5 * x 
---------------
       2       


           2         4
3   -15 * x    35 * x 
- + -------- + -------
8      4          8   



28. Das vierte Legendre Polynom an der Stelle 1 :

In> Legendre(4,1) 
 Out> 1 

29. Definieren des Polynoms p = sum( i=1..5, ai*x^i ) :

In> ans:=Sum(MakeVector(a,5)*FillList(x,5)^(1..5)) 
In> PrettyForm(ans) 

               2         3         4         5
a1 * x + a2 * x  + a3 * x  + a4 * x  + a5 * x 


30. Anwenden des Hornerschemas auf das obige Polynom :

In> ans:=Sum(MakeVector(a,5)*FillList(x,5)^(1..5)) 
In> PrettyForm(Horner(ans,x)) 

( ( ( ( a5 * x + a4 ) * x + a3 ) * x + a2 ) * x + a1 ) * x


31. Berechnung von Pi als Kettenbruch :

In> pi:=N(Pi,20) 
In> a:=ContFrac(pi,6) 
In> PrettyForm(a) 

                 1             
3 + ---------------------------
                   1           
    7 + -----------------------
                     1         
        15 + ------------------
                       1       
             1 + --------------
                          1    
                 292 + --------
                       1 + rest



32. Berechnung der Dezimaldarstellung von 1/7 :

In> Decimal(1/7) 
 Out> {0,{1,4,2,8,5,7}} 
Das Ergebnis ist folgendermaßen zu lesen:
0.142857142857142....

33. Berechnung der Wahrheitswerte TRUE und FALSE :

In> True And False
 Out>  False 

34. Lösung der Gleichung tan(x) = 1 :

In>  Solve(Tan(x)==1,x) 
 Out> Pi/4 

35. Die inverse Taylorentwicklung von sin(y) + cos(y)
    an der Stelle y=0.  :

In> t:=InverseTaylor(y,0,6)Sin(y)+Cos(y) 
In> PrettyForm(t) 

                 2                3                
        ( y - 1 )    2 * ( y - 1 )             4   
y - 1 + ---------- + -------------- + ( y - 1 )  + 
            2              3                       

              5
17 * ( y - 1 ) 
---------------
      10       


Überprüfung, dass es sich bis zur 5. Ordnung
wirklich um das Inverse handelt:

In> s:=Taylor(y,0,6)Sin(y)+Cos(y)
In> BigOh(Subst(y,s)t,y,6) 
 Out> y 

36. Lösung des linearen Gleichungssystems
    x+y+z=6,2x+y+2z=10,x+3y+z=10 :

In>  Solve({x+y+z==6,2*x+y+2*z==10,x+3*y+z==10},{x,y,z}) 
 Out> {{4-z,2,z}} 

37. Vereinfachung von x or (not x) :

In>  CanProve(x Or Not x) 
 Out> True 

38. Vereinfachung von x or y or (x and y) :
In>  CanProve(x Or y Or x And y) 
 Out> x Or y