Consider the following --
1\ create square non-negative projection matrix, in terms of a set of
underlying parameters:
mat:matrix([0,s_a*m_2,s_a*m_3],[s_o,0,0],[0,s[a],s[a]]);
2\ generate characteristic polynomial for matrix
cp:charpoly(mat,lam);
3\ implicitly differentiate cp for lam with respect to parameter s_a
depends(lam,s_a);
deriv:diff(cp,s_a);
sol:solve(deriv,'diff(lam,s_a));
So far, so good. Returned expression for sol is correct. But, I want to
evaluate sol given the numerical values of each parameter. However, when
I try something as obvious as
subst([s_a=0.8,s_o=0.4,m_2=1.2,m_3=1.2,lam=1.1667],sol);
I get the following error message from Maxima
diff: variable must not be a number; found: 0.8
-- an error. To debug this try: debugmode(true);
OK, so how does one evaluate a diff numerically (if that is a correct
statement of the problem)?
I've fooled (a bit) with psubst and at, but haven't hit the 'right
trick' yet.
Surely substituting known values into a differential equation should be
straightforward (since every other symbolic algebra program I've ever
used handles this with no problems whatsoever). Perhaps not a problem
with Maxima, but clearly a magic command (or some such) I'm missing.
Thanks in advance for any suggestions/insights...