Formal polynomials?
Alasdair McAndrew <[email protected]> Sat, 07 Nov 2015 18:47:56 +1100
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
--===============2344031369064294312== Content-Type: multipart/alternative; boundary="----sinikael-?=_1-14468824788910.48719160025939345" ------sinikael-?=_1-14468824788910.48719160025939345 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: 7bit A quickie: is there any way of defining a formal polynomial with unknown coefficients, such as: a_0+a_1*x+a_2*x^2+a_3*x^3 ? I want to calculate the values of the coefficients by a system of linear equations based on integrations whose integrands include that polynomial. For small polynomials I can write p:=a+b*x+c*x^2+d*x^3 but this gets clumsy for higher powers. I can enter, for example A:=[a[n] for n in 0..10] for a list of symbols, but neither of sum(a[i]*x^i, i=0..10) or sum(A.i*x^(i-1),i=1..11) work, nor do they work when "sum" is replaced with "summation". -- [https://ci6.googleusercontent.com/proxy/2sF0a1ZoLMOPckOBVppCZ4OFi06ffJNGtQadXIhbQiE95NE6m4gM53kVdCiQnVJYlRw380RlZ0tK7XHk4CmM2qy3nTM_ptogovPuXhk2=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/facebook.png] [http://www.facebook.com/alasdair.mcandrew][https://ci4.googleusercontent.com/proxy/egLBn4P9MCM5JXRJFUg5fGnVRlWCGBo6zl_hik07VL66K0muLhfGiUf2i_7iymWxqLVLANxJraL5xfbJOTx8akBt9TmFlAIJcVuyk6fs2a9ASV26=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/f-gplus_256-48.png] [https://plus.google.com/+AlasdairMcAndrew/posts][https://ci3.googleusercontent.com/proxy/-agz0u1Ac2-yf996SqPviIMbF5L-qAheB2hrZu975cEQB4YOZRFxRLuXLXmoQYBGNsMppMznpOXtgH2hmVu428QgisuXNCqKPzRQf1ZJ=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/linkedin.png] [https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108][https://ci5.googleusercontent.com/proxy/V-iov0_6bPsm3W5m1rgoRpRS5HaoNkB_5EbwhbqM_SqKHZOJsrTxalR6JGpq4SaT0gndZYFa2JH92qAJUGe2YVF05zindKPUWLep5js=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/twitter.png] [https://twitter.com/amca01][https://ci6.googleusercontent.com/proxy/AMQYVjh54hMGPrzE9x9QAB8CTaI4oJKwlOSjuRnDGBKXOtbQJ9c9nVqOdcEd9fLnc1vtced39dXoWEEJHoJ0SUb2eH6a6wZdyjPMJQY3vw=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/wordpress.png] [http://numbersandshapes.net] ------sinikael-?=_1-14468824788910.48719160025939345 Content-Type: text/html; format=flowed Content-Transfer-Encoding: 7bit <p dir="ltr">A quickie:  is there any way of defining a formal polynomial with unknown coefficients, such as:</p> <p dir="ltr">a_0+a_1*x+a_2*x^2+a_3*x^3  ?</p> <p dir="ltr">I want to calculate the values of the coefficients by a system of linear equations based on integrations whose integrands include that polynomial.</p> <p dir="ltr">For small polynomials I can write</p> <p dir="ltr">p:=a+b*x+c*x^2+d*x^3</p> <p dir="ltr">but this gets clumsy for higher powers.</p> <p dir="ltr">I can enter, for example</p> <p dir="ltr">A:=[a[n] for n in 0..10]</p> <p dir="ltr">for a list of symbols, but neither of</p> <p dir="ltr">sum(a[i]*x^i, i=0..10)</p> <p dir="ltr">or</p> <p dir="ltr">sum(A.i*x^(i-1),i=1..11)</p> <p dir="ltr">work, nor do they work when "sum" is replaced with "summation".   <br></p> <p dir="ltr">-- </p> <p dir="ltr"><img src="https://ci6.googleusercontent.com/proxy/2sF0a1ZoLMOPckOBVppCZ4OFi06ffJNGtQadXIhbQiE95NE6m4gM53kVdCiQnVJYlRw380RlZ0tK7XHk4CmM2qy3nTM_ptogovPuXhk2=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/facebook.png"><a href="http://www.facebook.com/alasdair.mcandrew"></a> <img src="https://ci4.googleusercontent.com/proxy/egLBn4P9MCM5JXRJFUg5fGnVRlWCGBo6zl_hik07VL66K0muLhfGiUf2i_7iymWxqLVLANxJraL5xfbJOTx8akBt9TmFlAIJcVuyk6fs2a9ASV26=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/f-gplus_256-48.png"><a href="https://plus.google.com/+AlasdairMcAndrew/posts"></a> <img src="https://ci3.googleusercontent.com/proxy/-agz0u1Ac2-yf996SqPviIMbF5L-qAheB2hrZu975cEQB4YOZRFxRLuXLXmoQYBGNsMppMznpOXtgH2hmVu428QgisuXNCqKPzRQf1ZJ=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/linkedin.png"><a href="https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108"></a> <img src="https://ci5.googleusercontent.com/proxy/V-iov0_6bPsm3W5m1rgoRpRS5HaoNkB_5EbwhbqM_SqKHZOJsrTxalR6JGpq4SaT0gndZYFa2JH92qAJUGe2YVF05zindKPUWLep5js=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/twitter.png"><a href="https://twitter.com/amca01"></a> <img src="https://ci6.googleusercontent.com/proxy/AMQYVjh54hMGPrzE9x9QAB8CTaI4oJKwlOSjuRnDGBKXOtbQJ9c9nVqOdcEd9fLnc1vtced39dXoWEEJHoJ0SUb2eH6a6wZdyjPMJQY3vw=s0-d-e1-ft#https://dl.dropboxusercontent.com/u/2796170/wordpress.png"><a href="http://numbersandshapes.net"></a></p> ------sinikael-?=_1-14468824788910.48719160025939345-- --===============2344031369064294312== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Axiom-mail mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/axiom-mail --===============2344031369064294312==--