Re: Help on polynomial coefficients
Themos Tsikas <[email protected]> Thu, 4 Sep 2008 10:15:38 +0100
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Organization | NAG Ltd |
| Message-ID | <[email protected]> |
P:=reduce(+,[C[i]*x^i for i in 0..10]) On Thursday 04 September 2008, Rodrigo Canaan wrote: > I am making a program to find a polynomial P(x,y) that is the solution to a > given system. The degree of P is given. I need one variable to represent > each coefficient P, so I can find all coefficients, determining the > polinomial. > Problem is, I don't know how to assign one variable to each coefficient, as > I don't know in advance the degree of P, thus don't even know in advance > how many coefficients I am going to use > > What I wish I could do is, given the degree P, build P as a sum of terms > where each coefficient is a variable. > If my degree was 1, for example, I want to build P as > P:=A*x+B*y+C > If my degree was 2, I would have: > P:=A*x^2 + B*y^2 +C*x*y +D*x +E*y +F > I have no idea how to do it for a general degree, on axiom > > Thanks for the help! ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________