www.delorie.com/gnu/docs/calc/calc_83.html   search  
 
Buy the book!


GNU Emacs Calc 2.02 Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.7.49 Algebra Tutorial Exercise 2

Suppose our roots are [a, b, c]. We want a polynomial which is zero when x is any of these values. The trivial polynomial x-a is zero when x=a, so the product (x-a)(x-b)(x-c) will do the job. We can use a c x to write this in a more familiar form.

 
1:  34 x - 24 x^3          1:  [1.19023, -1.19023, 0]
    .                          .

    r 2                        a P x RET

 
1:  [x - 1.19023, x + 1.19023, x]     1:  (x - 1.19023) (x + 1.19023) x
    .                                     .

    V M ' x-$ RET                         V R *

 
1:  x^3 - 1.41666 x        1:  34 x - 24 x^3
    .                          .

    a c x RET                  24 n *  a x

Sure enough, our answer (multiplied by a suitable constant) is the same as the original polynomial.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003