MATLAB: Does the SOLVE function return an empty SYM object in Symbolic Math Toolbox 3.2.3 (R2008a) with the Maple engine

Symbolic Math Toolbox

I am trying to use the SOLVE function to get the symbolic solution of algebraic equations as shown in the code below.
syms M
F = ((sqrt((gamma+1)/(gamma-1))*atan(sqrt(((gamma - 1)/(gamma + 1))*(M^2 - 1)))) - atan(sqrt(M^2 - 1))) - v_2;
M_calc = (solve(F,M));
M2 = double(M_calc(1));
Here, F is the symbolic equation and M is the symbolic object.
The above piece of code successfully creates a 1 by1 SYM object in all releases of Symbolic Math Toolbox from R14SP3 to R2006b.
However, when I execute the same code in Symbolic Math Toolbox R2007a through R2008a, I observe that M_calc, the created SYM object has a dimension of 0 by 0.

Best Answer

This difference occurs due to a change in the Maple engine which is used by Symbolic Math Toolbox (R2007a) through (R2008a) for symbolic computation, as a result of which a symbolic solution for this problem is not returned.
Note: This information applies only to the Maple symbolic engine. Symbolic Math toolbox versions R2008b and above ship with the MuPAD symbolic engine.
Since the equation involves functions such as 'arctan' and 'sqrt' the solutions obtained in Symbolic Math Toolbox R2007a through R2006b may not be valid for all branches which is why Maple in Symbolic Math Toolbox (R2007a) does not return an exact solution.
To work around this, replace the line
M_calc = solve(F,M);
with
M_calc = maple('fsolve',F,M);
to numerically solve the equation.
Since the sym object is immediately converted into a double there should be no real difference in calling SOLVE and FSOLVE.