Lorenzo Isella <lorenzo.isella at gmail.com> writes:
> Dear All,
> I am not very much into Maxima, but I am using it to do some symbolic manipulations.
> Please have a look at the small snippet below
>
> assume (N>1000);
> assume (df>1);
> assume (b<0);
> assume (kf>1);
> assume (a>0);
> Rg:(N/kf)^(1/df);
> Rm:0.512*(1-1/log(2*N))*Rg+0.72*N^0.413;
> Req:N^(1/3);
>
> phi:N/Rgeo^3;
> Rm/Rgeo: a*Rg/Rgeo+b;
> myeq: Rm/Rgeo = c*Rg/Rgeo+d;
>
> solve(myeq, Rgeo);
>
> but then maxima does not return the solution for the equation which, to be honest, does not look so terrible.
> Am I making some mistake?
> Any suggestion is welcome.
> Many thanks
>
> Lorenzo
Your problem arises because of the
> Rm/Rgeo: a*Rg/Rgeo+b;
line. I'm not quite sure what Maxima tries to do here: I think it allows
assignment to non-atoms so that code like this works:
(%i20) [a,b] : [3,4];
(%o20) [3, 4]
(%i21) a; b;
(%o21) 3
(%o22) 4
But then code like this is strange:
(%i24) a/b : 3/4;
(%o24) 4
(%i25) a; b;
(%o25) 3
3
(%o26) -
4
Maybe a Maxima guru can explain what's going on here and why anything
but MLIST is allowed as the top-level operator for the left hand value
of an assignment?
Anyway, to solve the problem you were having, just insert the value you
were giving Rm/Rgeo on the next line:
(%i1) assume (N>1000)$ assume (df>1)$ assume (b<0)$ assume (kf>1)$ assume (a>0)$
(%i6) Rg:(N/kf)^(1/df);
1/df
N
(%o6) ------
1/df
kf
(%i7) Rm:0.512*(1-1/log(2*N))*Rg+0.72*N^0.413;
1/df 1
0.512 N (1 - --------)
log(2 N) 0.413
(%o7) -------------------------- + 0.72 N
1/df
kf
(%i8) Req:N^(1/3);
1/3
(%o8) N
(%i9) phi:N/Rgeo^3;
N
(%o9) -----
3
Rgeo
(%i10) myeq: a*Rg/Rgeo+b = c*Rg/Rgeo+d;
1/df 1/df
a N c N
(%o10) ----------- + b = ----------- + d
1/df 1/df
kf Rgeo kf Rgeo
(%i11) solve(myeq, Rgeo);
1/df
(c - a) N
(%o11) [Rgeo = - --------------]
1/df
(d - b) kf
Tada!
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120331/17443733/attachment.pgp>