HP 50g - collect by powers of x « Next Oldest | Next Newest »

 ▼ Juraj O. Junior Member Posts: 8 Threads: 3 Joined: Nov 2012 02-17-2013, 04:40 AM Is there an easy way to collect terms by powers of a variable in an expression? Ie. I have an expression on the stack that looks like this A*x^2 + A*x + B*x + C I want to group (something like GROUP(expression,'x') ) it by powers of x, so that it looks like this: Ax^2 + (A+B)x + C and not something like A(x^2 + x) + Bx + C which FACTOR/SIMPLIFY/COLLECT often give me. It would also be handy if I could extract a vector of coefficients from that expression: [A A+B C]. If anyone knows how to do this please help me out :) ▼ Juraj O. Junior Member Posts: 8 Threads: 3 Joined: Nov 2012 02-17-2013, 05:11 AM I think I've found what I was looking for - the function A->P from the Polynomial library by Steen S. Schmidt. Ronald Williams Junior Member Posts: 23 Threads: 0 Joined: Apr 2010 02-17-2013, 09:50 AM For A*X^2 + A*X + B*x + C try using COLLECT alone and you should get A*X^2 + (B+C)*X + C as desired. ▼ Mike Morrow Posting Freak Posts: 758 Threads: 9 Joined: Jul 2007 02-17-2013, 10:38 AM Quote: For A*X^2 + A*X + B*x + C try using COLLECT alone and you should get A*X^2 + (B+C)*X + C as desired. That would be quite remarkable! ▼ Ronald Williams Junior Member Posts: 23 Threads: 0 Joined: Apr 2010 02-17-2013, 03:57 PM I'm using a real HP50g with rom 2.15 and flag settings as follows: { # 80800002452103F0h # 0h # 8018000002000010h # 0h } and COLLECT works for me! ▼ Mike Morrow Posting Freak Posts: 758 Threads: 9 Joined: Jul 2007 02-17-2013, 04:25 PM I doubt that any HP 50G will indicate that ``` A*X^2 + A*X + B*X + C = A*X^2 + (B+C)*X + C ``` as your message number 3 in this thread proposes. :-) (unless A = C) Edited: 17 Feb 2013, 4:38 p.m. Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 02-17-2013, 04:26 PM He was talking about the typo: A*X^2 + (B+C)*X + C instead of A*X^2 + (A+B)*X + C. Ronald Williams Junior Member Posts: 23 Threads: 0 Joined: Apr 2010 02-17-2013, 06:57 PM Good catch! Thank you Gerson I did miss type the expression. As you correctly pointed out it should have been A*X^2 + (A+B)*X + C and Mike I missed your subtle humor in post #4. Juraj O. Junior Member Posts: 8 Threads: 3 Joined: Nov 2012 02-17-2013, 07:16 PM I was wondering one more minor thing which doesn't really deserve its own thread. Is it possible in the equation editor, with an expression already entered, to add a factor or a summand on the beginning, from the left? Ie. we have b•c. Is it possible to multiply it by a from the left, so we have a•b•c? Same question for b+c, so we get a+b+c? C.Ret Senior Member Posts: 260 Threads: 0 Joined: Oct 2008 02-18-2013, 05:09 AM Hi, On my HP-28S, 'A*x^2 + A*x + B*x + C' x 2 TAYLR returns 'C + (A+B)*x + A*2/2*x^2' then a simple COLCT leads to '(A+B)*x + A*x^2 + C' Is that expression close enough to the expected format? Edited: 18 Feb 2013, 5:11 a.m.

 Possibly Related Threads... Thread Author Replies Views Last Post HP Prime Collect/Factor difference bluesun08 3 735 10-29-2013, 09:36 AM Last Post: Eddie W. Shore HP-35 powers with negative numbers Dan Lewis 26 2,756 01-26-2012, 02:41 AM Last Post: Nick_S HP 50g trilogy. The new HP 50g Blue (and II) Pablo P (Spain) 18 2,448 09-19-2011, 03:08 AM Last Post: BruceH fractional powers of negative numbers Edward McNally 15 1,693 11-21-2007, 05:42 AM Last Post: Meenzer Why do we collect HP calculators Stefan Vorkoetter 27 2,800 08-23-2007, 05:06 PM Last Post: Kostas Kritsilas 12C - sell or collect PatrickR 2 528 03-10-2007, 02:15 PM Last Post: Gene Powers and roots of phasors on hp 33s ??? Ken Ratkevich 40 3,688 09-02-2006, 10:40 AM Last Post: Ken Ratkevich HP97 powers on and nothing works. Kadambi S 10 1,148 08-17-2004, 08:20 PM Last Post: David Ramsey LED/LCD Calcs to collect and play with William J LaPier 5 820 12-10-2003, 01:38 PM Last Post: David Smith Programming Challenge: Powers and Roots Patrick 4 620 03-20-2003, 11:41 PM Last Post: Michael F. Coyle

Forum Jump: