Algebraic manipulation
02-09-2019, 10:48 PM
Post: #5
 Eddie W. Shore Senior Member Posts: 1,559 Joined: Dec 2013
RE: Algebraic manipulation
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
 « Next Oldest | Next Newest »

 Messages In This Thread Algebraic manipulation - 47box - 02-07-2019, 08:12 PM RE: Algebraic manipulation - BruceH - 02-08-2019, 01:04 AM RE: Algebraic manipulation - Aries - 02-08-2019, 09:52 AM RE: Algebraic manipulation - 47box - 02-08-2019, 05:37 PM RE: Algebraic manipulation - Eddie W. Shore - 02-09-2019 10:48 PM

User(s) browsing this thread: 1 Guest(s)