Math Help!! Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-16-2012, 06:55 PM Hi All, How can one convert a polynomial of the general (and common) form: ```p(x) = Sum a(i) x^i, for i = 0,1,2,..,n ``` to a nested form: ```p(x) = A(0) + x^B(0)(1 + A(1)x^B(1)(1 + A(2)x^B(2)(1 + A(3)x^B(3)( .....(1 + A(n)x^B(n)))...) ``` Notice that each open parenthesis is in the form of: ```1 + A(i)x^B(i) ``` I saw these nested polynomials, as approximations for various common log and trig functions, on page 37 in Jon Smith's book Scientific Analysis on the Pocket Calculator, 2nd edition. Namir Edited: 16 Apr 2012, 6:56 p.m. Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 04-16-2012, 07:29 PM Are you describing Horner's method here ? If so, start factoring powers of x from whichever end has the highest power. - Pauli Katie Wasserman Unregistered Posts: 1,477 Threads: 71 Joined: Jan 2005 04-16-2012, 08:13 PM Namir, I'm not sure why you're looking into this, but this technique was very useful for writing a compact program to calculate pi like I did in this set of programs. -Katie Les Wright Unregistered Posts: 1,368 Threads: 212 Joined: Dec 2006 04-16-2012, 08:17 PM I have that very book. On the page in question Smith has simply applied Horner's method, only in all of the examples on that page the central polynomial of the approximations in question are in x^2 rather than x. If you take a close look, you will see that all of your B(i)'s equal 2. Hope this helps. Les Peter Murphy (Livermore) Unregistered Posts: 167 Threads: 33 Joined: Jul 2011 04-16-2012, 08:18 PM Polynomial Expressions and Horner's Method are discussed on p. 79 of the HP 15C Owner's Handbook, but not How to Do It. Factorization is clearly what's required. Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-16-2012, 08:40 PM Its' a variant of the regular Horner's method. Les Wright Unregistered Posts: 1,368 Threads: 212 Joined: Dec 2006 04-16-2012, 08:40 PM Namir, here is a simple 10th-degree example without odd-powered terms to demonstrate the method Smith uses: ```1 + 3x^2 +4x^4 + 5x^6 + 2x^8 + 7x^10 = 1 + x^2(3 + x^2(4 + x^2(5 + x^2(2 + 7x^2)))) ``` If C is a 0-based 5 element vector containing the coefficients in the order written, a C-code snippet might look like this: ```C=[1,3,4,5,2,7]; y=x*x; p=C[n-1]; for(j=n-2;j>=0;j--) p=p*y+c[j]; ``` FWIW, it seems that Smith never uses the term "Horner's Method", but he does discuss the process of rewriting polynomials in this nested form on pages 31-32ff. HTH, Les Edited: 16 Apr 2012, 9:01 p.m. Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-16-2012, 08:41 PM Yes Katie, the form of the polynomial in your link is what I am looking for. Namir Namir Unregistered Posts: 2,247 Threads: 200 Joined: Jun 2005 04-16-2012, 08:44 PM Yes, all B(i) would typically be the same value. Crawl Unregistered Posts: 306 Threads: 3 Joined: Sep 2009 04-16-2012, 10:37 PM Yes, just to be clear, the coefficients in both forms are the same. This is not "factoring". Allen Unregistered Posts: 562 Threads: 27 Joined: Oct 2006 04-16-2012, 11:32 PM I use wolfram alpha to calculate Horner forms. example: http://www.wolframalpha.com/input/?i=4*Sum[4*n^2%2Bn%2B1%2C+{n%2C+0%2C%28s-1%29%2F2}]-3 Look under alternate forms. « Next Oldest | Next Newest »

 Possibly Related Threads… Thread Author Replies Views Last Post Need help understanding math.... cyrille de BrĂ©bisson 9 3,605 12-13-2013, 02:23 AM Last Post: Didier Lachieze OT: a math competition site Pier Aiello 0 1,014 09-16-2013, 06:03 AM Last Post: Pier Aiello Simple Math Question Namir 2 1,362 08-09-2013, 06:13 PM Last Post: Eddie W. Shore Cool math clock Bruce Bergman 28 7,444 04-10-2013, 03:13 AM Last Post: Siegfried (Austria) Math Challenge I could not solve Meindert Kuipers 22 5,951 01-05-2013, 04:43 PM Last Post: Thomas Klemm Math Question Namir 0 892 11-06-2012, 07:43 AM Last Post: Namir Survey for Special Math Problem Namir 7 2,269 06-03-2012, 09:46 PM Last Post: Namir math question Don Shepherd 22 5,107 04-25-2012, 11:38 PM Last Post: Don Shepherd go41cx overlay Math module Alexander Oestert 12 3,650 02-04-2012, 05:09 AM Last Post: Alexander Oestert A Math Challenge (kind of) Namir 17 3,999 08-17-2011, 08:58 PM Last Post: Gilles Carpentier

Forum Jump: