HP Forums

Full Version: Algebraic manipulation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

How can I manipulate a algebraic expression trying to extract a used defined term.

Exemple:

(4x-12) --> I know I can factor this term. Does exists any kind of control that I can specify a term?
I would like to specif "(x-3)" --> 4.(x-3)

Another Exemple:

(3-(4/5x)-(-5) --> I would like to specify a term "(x-10)" and see it´s possible.

Does the calculator can do that? Or any alternative?

Thanks
I don't know of a way to use a specific factor.

Alternatives:
  • Use the factors() command to get a list of the factors. You can then inspect the list to see if the one you are expecting is present.
  • Or, do a test divide by your factor, e.g. simplify((4*x-12)/(x-3))? If your divisor remains unchanged then it isn't a factor.
I think "factor()" and "simplify" will do the trick Wink
Oh … and make sure you're in the CAS "ambient" !
Best,

Aries Smile
Usually , I ´ve been using the factor and simplify command as mentioned. But I would like to specify a factor if possible... Smile
Thanks

Best,

Mario
Bruce,

I like your strategy the best - use the simplify(p(x)/q(x)).

The CAS program specfactor uses this strategy to factor q(x) from p(x):

Code:

#cas
specfactor(p,q):=
BEGIN
LOCAL r;
r:=simplify(p/q);
IF numer(r)==p THEN
RETURN r;
ELSE
RETURN "("+STRING(r)+")"+"*("+STRING(q)+")";
END;
END;
#end

Successful factoring returns the result as strings (to preserve the format without automatic simplification):

specfactor(4x-12,x-3) returns "(4)*(x-3)" [ 4(x-3) ]

specfactor(8-4/5*x,x-10) returns "(-0.8)*(x-10)"

specfactor(x^3 -x^2+2*x-2,x^2+2) returns "(x-1)*(x^2+2)"

Eddie
Reference URL's