next up previous contents
Next: Simplification procedures Up: Utilities Previous: Utilities   Contents


Decomposition

Being given an expression it may be interesting to determine if it can be written as a polynomial in one variable. For example

 
eq:=x^2*sin(x)+x/sin(y)+ x*exp(x):
may be considered as a second order polynomial in $x$ with coefficients $\sin(x), 1/\sin(y),exp(x)$ but not as a polynomial in $y$. The procedure Decompose_Algebraic will provide such decomposition. The call Decompose_Algebraic(eq,x) will return
 
AA1*x^2+AA2*x+AA3*x
Note that the coefficients are not collected. while the global variable ALIAS_TERMS will contain the value of the AA. If the returned polynomial has degree 0 in the variable, then the expression is not a polynomial in this variable.



Jean-Pierre Merlet 2012-12-20