MATLAB: Not Getting Both Roots to Nonlinear Equation

nonlinearrootssolve

Can anyone tell me why the following script doesn't give me both answers to the nonlinear equation? The "solve" command only returns one of the equation's roots for M. My TI-89 calculator spits out both roots right away, but I don't know why Matlab is not.
%%Input Section
Ath=0.289; %Throat area (m^2)
Ae=0.578; %Exit area (m^2)
gamma=1.37; %Specific heat ratio
%%Calculations
syms M
eqn=Ae/Ath==(1/M)*(((1+((gamma-1)/2)*M^2)/(1+((gamma-1)/2)))^((gamma+1)/2/(gamma-1)));
solM=solve(eqn,M); %Solve equation for Mach speed
MDbl=double(solM); %Convert to double numeric
Thanks in advance, M Ridzon

Best Answer

No analytical solution exists, so a numerical solver was employed. In general, all roots of a nonlinear equation are not always assured to be found. One can always pose an equation that will mess up any numerical solver.
solM=vpasolve(eqn,M)
solM =
2.1753082190895798956060796154563
If the root is a single root at that location, you can often find the other root by a process called deflation. The idea is to divide by a factor that kills that root off.
vpasolve((((37*M^2)/237 + 200/237)^(237/74)/M - 2)/(M-solM))
ans =
0.30682280437175532207233542049465
Or, if you have plotted the relation, then you would know a decent estimate for the other root.
solM2 = vpasolve(eqn,M,0.2)
solM2 =
0.30682280437175532207233542049465