Reputation: 3749
What are the equivalent commands to expand, factor and simplify on Octave?
example:
expand((x+1)^2);
x^2+2x+1
simplify(3*x^2+2);
Upvotes: 2
Views: 5592
Reputation: 1172
Well, I think the real problem is that Octave is not ment to support much of symbolic math as Wolfram Mathematica etc does. The best way would be:
1. Rethink your problem. Is there really a inevitable need for these functions? (And is it necessary to solve it using Octave?)
2. If your problem is about polynomes only (as your example would suggest), work just with vectors containing its coefficients. For this kind of purposes Octave actually has some functions, see: https://www.gnu.org/software/octave/doc/interpreter/Polynomial-Manipulations.html
Upvotes: 2
Reputation: 2578
You may check this out: http://octave.sourceforge.net/symbolic/index.html . It seems like having expand only.
Upvotes: 1