problems with solve()



1. If your professor expects you to use Mathcad, then you should
use it.
2. Solve in maxima returns exact answers. This problem
probably does not have an exact answer.

3. Mathcad or similar programs solve equations with one unknown
by an iterative method, e.g. Newton or secant method.

4.  Here's a  newton method.
f:rhs(expansion)-lhs(expansion);
dd: diff(f,m2);
k[0]: initial_guess_for_m2;
k[i]:=  ev(m2-f/dd,m2=k[i-1]);

If you guess k[0]:2;
and compute k[1];
k[2];
  you find that by k[4]  you have
1.97356

which is one solution.

Other starting guesses may not converge.
In between runs, you should kill(k) and redefine it.

Of course all this could be "automated" more, and
probably is, somewhere in the share/ directory.


Tell us how your professor likes Maxima.
RJF




Joel Konkle-Parker wrote:

>I've attached a small batch file containing an equation I need to solve
>(for school, but computers recommended, help OK, etc.).
>
>It seems that solve() should be able to handle it, but apparently this
>isn't the case. If I set numer: false, I get a long answer, but I can't
>seem to get one in numeric form.
>
>I'm new to Maxima, but would like to use it instead of the normal
>Windows programs (Mathcad) for my assignments.
>
>Any suggestions?
>
>
>  
>
>------------------------------------------------------------------------
>
>numer: true$
>ratprint: false$
>
>rad: %pi/180$
>deg: 180/%pi$
>
>gamma: 1.4$
>theta: 23.38*rad$
>M1: 2$
>
>
>expansion: theta = sqrt((gamma+1)/(gamma-1)) * atan( sqrt((gamma-1)/(gamma+1)*(M2^2-1)) ) - atan(sqrt(M2^2-1)) -
>                 ( sqrt((gamma+1)/(gamma-1)) * atan( sqrt((gamma-1)/(gamma+1)*(M1^2-1)) ) - atan(sqrt(M1^2-1)) )$
>
>solve(expansion, M2);
>  
>