MuPAD - Demo

# ... Further Examples

## Contents

1. Testsuites and benchmarks
   - The c't testsuite with MuPAD 1.2.2
   - Wester's testsuite for MuPAD 1.2.2
2. Continued Fractions Arithmetic
3. Index of algebraic examples

### Testsuites and benchmarks

- #### The c't testsuite with MuPAD 1.2.2

  In issue 7'95 the computer magazin c't published an article "Das Ende des Bleistifts" in which computer algebra systems are compared. They tested the MS-Windows versions of Derive 3, Macsyma 2, Maple V.3, Mathematica 2.2 and Mathplus. Also AXIOM and MuPAD were mentioned but their test results were not published, because by now both have no MS-Windows user interface.

  Note that MuPAD is the only non-commercial system in this test. An alpha release of MuPAD for Windows exists but is not complete and therefore not available for external users. We hope to publish it in Summer 1996. -- This c't testsuite paper is based on the MuPAD release 1.2.2.

- #### Wester's testsuite for MuPAD 1.2.2

  The "Wester's testsuite" is a set of typical problems which arise frequently when dealing with computer algebra. It can be used to compare computer algebra ystems and their capabilities. Further information - compiled by Michael Wester (wester@math.unm.edu) - can be found on ftp://math.unm.edu/pub/cas/.

  For the current test results of MuPAD, please refer to the Wester's testsuite paper compiled by Paul Zimmermann. It will be updated periodically with new features available in the MuPAD development version.

### Continued Fractions Arithmetic

This example will give you a short overview about the possibilities of arithmetic of continued fractions in MuPAD. The function contfrac is used to calculate a continued fraction with an optionaly specified precision:

- `>> a:= contfrac( PI, 5 );`
  `

                1
      ---------------------- + 3
              1
      ------------------ + 7
            1
      ------------- + 15
          1
      --------- + 1
       1
      --- + 292
      ...

  `

  Here "..." represents a real between one and infinity. Thus for example the continued fraction of 0 is 1/..., that of an integer n is (n+1)/....

- `>> b:= contfrac( sqrt(5), 4 );`
  `

               1
      ------------------- + 2
             1
      --------------- + 4
           1
      ----------- + 4
         1
      ------- + 4
       1
      --- + 4
      ...

  `

  A continued fraction in MuPAD is an element of the domain CF which provides some further methods. At first we want to compute an intervall that contains the continued fraction for PI that was computed above.

- `>> CF::approx( a );`
  `103993/33102, 104348/33215`

  Now we get a continued fraction for the golden-ratio (1+sqrt(5))/2 from that of sqrt(5) via the fractional linear form L(x)=(x+1)/2.

- `>> CF::linear( b,1,1,0,2 );`
  `

                             1
      ----------------------------------------------- + 1
                           1
      ------------------------------------------- + 1
                         1
      --------------------------------------- + 1
                       1
      ----------------------------------- + 1
                     1
      ------------------------------- + 1
                   1
      --------------------------- + 1
                 1
      ----------------------- + 1
               1
      ------------------- + 1
             1
      --------------- + 1
           1
      ----------- + 1
         1
      ------- + 1
       1
      --- + 1
      ...

  `

  Finally we want to show how to perform arithmetic on continued fractions. At first we compute the continued fraction for PI+sqrt(5).

- `>> a+b;`
  `

                 1
      ----------------------- + 5
               1
      ------------------- + 2
             1
      --------------- + 1
           1
      ----------- + 1
         1
      ------- + 1
       1
      --- + 5
      ...

  `

  The continued fraction for PI*sqrt(5).

- `>> a*b;`
  `

           1
      ------------ + 7
         1
      ------- + 40
       1
      --- + 3
      ...

  `

  The continued fraction for PI^2/sqrt(5).

- `>> a^2/b;`
  `

      ------------------- + 4
             1
      --------------- + 2
           1
      ----------- + 2
         1
      ------- + 2
       1
      --- + 2
      ...

  `