Basic mathematical operations:
All the basic mathematical operations can be executed on symbolic expressions and variables (example, add, raise to a power, multiply, subtract, divide, etc.).
Here are some illustrations:
>> c/b
ans =
x^2
>> b^3
x^6
>> c*b
>> b + sym('4*x^2')
5*x^2
It can be view from the last illustration that MATLAB will collect like words in such expressions, adding the x_{2} and 4x_{2} to answer in 5x_{2}.
The below generates a symbolic expression by passing a string, but the words are not automatically collected:
>> sym('z^3 + 2*z^3')
z^3 2*z^3