Richard Fateman's answer was correct: it doesn't make sense to
substitute numbers for x,y into "dy/dx". Something like the following
does work:
(%i1) mat:matrix([0,s_a*m_2,s_a*m_3],[s_o,0,0],[0,s[a],s[a]]);
[ 0 m_2 s_a m_3 s_a ]
[ ]
(%o1) [ s_o 0 0 ]
[ ]
[ 0 s s ]
[ a a ]
(%i2) cp:charpoly(mat,lam);
2
(%o2) s m_3 s_a s_o - (s - lam) m_2 s_a s_o + (s - lam) lam
a a a
(%i3) depends(lam,s_a);
(%o3) [lam(s_a)]
(%i4) deriv:diff(cp,s_a);
dlam 2 dlam
(%o4) ---- m_2 s_a s_o + s m_3 s_o - (s - lam) m_2 s_o - lam ----
ds_a a a ds_a
dlam
+ 2 (s - lam) lam ----
a ds_a
(%i5) sol:solve(deriv,'diff(lam,s_a));
(s m_3 + (lam - s ) m_2) s_o
dlam a a
(%o5) [---- = - -------------------------------]
ds_a 2
m_2 s_a s_o - 3 lam + 2 s lam
a
(%i6) subst([s_a=0.8,s_o=0.4,m_2=1.2,m_3=1.2,lam=1.1667],rhs(first(sol)));
0.4 (1.2 s + 1.2 (1.1667 - s ))
a a
(%o6) - --------------------------------
2.3334 s - 3.699566670000001
a
(%i7) subst(0.8, s[a], %);
(%o7) .3055443803163305
The last line is because you seem to have got confused about s_a and
s[a]. I don't know why I'm getting 0.3 instead of the 0.8 you report
From Maple, but I suspect that's a typo from one of us.
Note that "rhs(first(sol))" above says to take the first thing in the
sol list (ie the equation) and then take its right hand side.
Does this solve your problem for you?
Rupert
PS Regarding your Maple example, I logged into a University computer to
check it out. Note that the response to your implicit diff line looks
like
> implicitdiff(cp,lambda,s_a);
2
s_o (m_2 lambda + 3 s_a m_3)
-----------------------------
2
3 lambda - s_o s_a m_2
This doesn't have the left hand dlam/ds_a part, so substitution
actually makes sense.
-------------- 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/20111005/98bdd01f/attachment.pgp>