MATLAB: How to simplify a problem with Spheroidal Coordinates using R2016a

coordinatesdeterminantjacobiansimplifyspheroidalsymbolicSymbolic Math Toolboxtoolbox

I have the following question:
1.) Given
x=a*sinh(e)*sin(n)*cos(p);
y=a*sinh(e)*sin(n)*sin(p); and
z=a*cosh(e)*cos(n).
2.) How do I use MATLAB 2016a to
simplify(det(jacobian([x,y,z],[e,n,p])))
to result of
a^3*(sinh(e)^2+sin(n)^2)*sinh(e)*sin(n)?

Best Answer

You can use the Symbolic Toolbox in MATLAB R2016a to achieve this workflow. Example code is shown below:
 
% Initialize symbolic variables
syms e n p a
% Construct x,y and z sym variables
x=a*sinh(e)*sin(n)*cos(p);
y=a*sinh(e)*sin(n)*sin(p);
z=a*cosh(e)*cos(n);
% Jacobian
dxyz = jacobian([x,y,z],[e,n,p]);
% Determinant
detJac = det(dxyz);
% Simplify
simplify(detJac)