Symbolic algebra

Discussion in 'Perl Misc' started by Brian Troutwine, Sep 30, 2004.

  1. I'm trying to write a program to output a Lagrange interpolating
    polynomial.
    http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html

    So far what I'm getting is output that looks somewhat along the lines of:

    ((x-2)(x-3)(x-4)(x-5)(1)/(24))+
    ((x-1)(x-3)(x-4)(x-5)(2)/(-6))+
    ((x-1)(x-2)(x-4)(x-5)(6)/(4))+
    ((x-1)(x-2)(x-3)(x-5)(24)/(-6))+
    ((x-1)(x-2)(x-3)(x-4)(120)/(24))

    What I want is to be able to take that and output it in the form of

    Ax^n + Bx^(n-1) ... + C

    Does anybody have the experience to tell me how to calculate symbolically?
    (Specifically how to implement a symbolic algebra module.)
    Brian Troutwine, Sep 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ckumar
    Replies:
    2
    Views:
    446
    ckumar
    Jan 17, 2005
  2. Robert M. Gary

    Matrix Algebra support

    Robert M. Gary, Nov 11, 2005, in forum: Java
    Replies:
    4
    Views:
    448
    Googmeister
    Nov 12, 2005
  3. Replies:
    6
    Views:
    5,075
  4. xhunga

    symbolic algebra computation with list

    xhunga, Apr 27, 2007, in forum: C Programming
    Replies:
    1
    Views:
    301
  5. Brian Troutwine

    Symbolic algebra

    Brian Troutwine, Sep 30, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    105
    Brian Troutwine
    Oct 7, 2004
Loading...

Share This Page