MATLAB: Symbolic sin(pi) in Matlab 2020 a not simplify

MATLABsymbolic

I am using symbolic toolbox, but it does not simplify.
But it works great for Matlab 2017 b.
>> syms pi
>> sin(pi)
ans =
sin(pi)
>> simplify(ans)
ans =
sin(pi)

Best Answer

R2020a changed sym so that now there are no special symbols. Before sym pi resulted in a symbolic version of the irrational constant π but now it is just another variable. Likewise Euler gamma constant and one other constant that is not coming to mind at the moment.
Now if you want the symbolic version of the irrational number you need to
sym(pi)
and count on sym being able to recognize the finite numeric approximation that is the function pi()
I personally do not think that this was the best way for Mathworks to have proceeded. I personally think that should be possible for a user to directly name symbolic version of the constant. I had filed an enhancement to have the special treatment documented so as to reduce problems for people who were not aware of it, and they choose to get rid of the special treatment instead.
Related Question