You need to use the vpa () variable precision arithmetic command. Check this code:
syms x real; % define x as a real symbolic variable (not a complex variable) vpa( x/(pi.^2), 5) % second argument define number of significant digits
For trigonometric expressions involving pi, it is sometimes useful to define sym ('pi'):
syms x real; pi_s = sym('pi'); expr = x/pi_s^2
I try to always use the "real" tag when using symbolic tools. If you do not use it, you will see many complex conjugations and other things that are not important for your problem, because x is probably a real variable.
Hope this helps,
source share