Go to the first, previous, next, last section, table of contents.

Rewrites Tutorial Exercise 1

We'll use Big mode to make the formulas more readable.

                                               ___
                                          2 + V 2
1:  (2 + sqrt(2)) / (1 + sqrt(2))     1:  --------
    .                                          ___
                                          1 + V 2

                                          .

  ' (2+sqrt(2)) / (1+sqrt(2)) RET         d B

Multiplying by the conjugate helps because (a+b) (a-b) = a^2 - b^2.

          ___    ___
1:  (2 + V 2 ) (V 2  - 1)
    .

  a r a/(b+c) := a*(b-c) / (b^2-c^2) RET

         ___                         ___
1:  2 + V 2  - 2                1:  V 2
    .                               .

  a r a*(b+c) := a*b + a*c          a s

(We could have used a x instead of a rewrite rule for the second step.)

The multiply-by-conjugate rule turns out to be useful in many different circumstances, such as when the denominator involves sines and cosines or the imaginary constant i.


Go to the first, previous, next, last section, table of contents.