Factoring polynomial returns numeric value - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Factoring polynomial returns numeric value (/thread-8645.html) Factoring polynomial returns numeric value - Skyblues - 07-07-2017 05:22 PM I'm in the process of re-familiarizing myself with my HP Prime. I've had one for a couple of years but stopped using it because it was too difficult to see. I just bought a new one with the high contrast keys (and it's great ... thanks HP!) I'm going over some of Eddie Shore's examples and am having some problems. I'm sure the answer I need is simple but I can't figure it out. Eddie's blog ... https://edspi31415.blogspot.com/2016/05/hp-prime-algebraic-cas-commands.html I am attempting this example: factor(x^2 + 6*x + 5) returns (x + 1)*(x + 5) What I'm getting is 10.44 rather than (x + 1)*(x + 5). I know what's going on. My 'x' variable is set to 0.8 from some previous examples I did so it seems that the Prime is evaluating (x^2 + 6*x + 5) for 'x' rather than factoring it. What do I have to do to get a return of (x + 1)*(x + 5)? Thanks, Jim RE: Factoring polynomial returns numeric value - Joe Horn - 07-07-2017 07:02 PM (07-07-2017 05:22 PM)Skyblues Wrote:  I am attempting this example: factor(x^2 + 6*x + 5) returns (x + 1)*(x + 5) What I'm getting is 10.44 rather than (x + 1)*(x + 5). I know what's going on. My 'x' variable is set to 0.8 from some previous examples I did so it seems that the Prime is evaluating (x^2 + 6*x + 5) for 'x' rather than factoring it. What do I have to do to get a return of (x + 1)*(x + 5)? There are two ways to approach this. (1) Put your expression in single quote marks, e.g. instead of typing factor(x^2+6*x+5), type factor('x^2+6*x+5'). The quote marks tell Prime not to evaluate any variables but to treat them all as symbolic variables. (2) purge(x) ... this removes the value from 'x' so that it will behave as a symbolic variable again. You can also use the Vars key menu, or the Memory Manager browser, to purge x; just highlight x and press the backspace key. To purge ALL your CAS variables (and reset CAS settings to their defaults) in one step, use the restart command (don't worry; it doesn't purge or reset anything else). All the CAS vars can also be deleted by highlighting "CAS Vars" in the Memory Manager and pressing the backspace key. RE: Factoring polynomial returns numeric value - Skyblues - 07-07-2017 10:34 PM Thanks Joe, I appreciate your help! Jim