2.7.52 Rewrites Tutorial Exercise 1

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

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

                                          .

  ' (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:  V 2
    .

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

(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.