The int function in the Symbolic Toolbox has a hold/release functionality wherein the expression can be held to delay evaluation eqn = I == int(x,x,'Hold',true)
eqn =
![](https://www.mathworks.com/matlabcentral/discussions/uploaded_files/36601/image.png)
which allows one to show the integral, and then use release to show the result
release(eqn)
ans =
![](https://www.mathworks.com/matlabcentral/discussions/uploaded_files/36602/image.png)
I think I already submitted an enhancement request for the same functionality for symsum. Maybe it would be nice to be able to hold/release any symbolic expression to delay the engine from doing evaluations/simplifications that it typically does. For example:
x*(x+1)/x, sin(sym(pi)/3)
ans = ![](https://www.mathworks.com/matlabcentral/discussions/uploaded_files/36603/image.png)
ans =
![](https://www.mathworks.com/matlabcentral/discussions/uploaded_files/36604/image.png)
If I'm trying to show a sequence of steps to develop a result, maybe I want to explicitly keep the x/x in the first case and then say "now the x in the numerator and denominator cancel and the result is ..." followed by the release command to get the final result.
Perhaps held expressions could even be nested to show a sequence of results upon subsequent releases.
Held expressions might be subject to other limitations, like maybe they can't be fplotted.
Seems like such a capability might not be useful for problem solving, but might be useful for exposition, instruction, etc.