Error, non-algebraic expressions cannot be differentiated
This error occurs when an argument that is not of type algebraic is passed to the diff command.
Solution 1: Use an expression, not function, for the first argument:
Solution 2: The differential operator D can differentiate procedures (including functional operators).
For users of Maple 2017 and earlier versions: Previously, this error was generated in the following cases. As a result of updates made in Maple 2018, these examples no longer result in an error.
In the following example, an error is generated when a Vector, v, is passed to the diff command.
This is as expected since v is not of type algebraic.
Here, we assume that the intention was to differentiate each element of the Vector. Since each element in the Vector is an algebraic expression, differentiating element-wise corrects the above error. Specifically, use ~ to differentiate each element of the Vector. For more information on ~, see the operators/elementwise help page.
In the following example, the call to the VectorCalculus package has been omitted. This results in the top-level diff function being used for the right-hand side values of r1 and r2, rather than VectorCalculus[diff]. Since the top-level diff function does not accept Vectors as arguments, an error occurs.
Adding with(VectorCalculus) before the sequence of statements results in VectorCalculus[diff]. This corrects the error.
Download Help Document
What kind of issue would you like to report? (Optional)