num2str() fails to convert a sum to a string. In the sum(1) example "syntax is incorrect", in the sum(4) example "n is not defined".
Edit: This is now BTS issue SS-43

Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9