diff: variable must not be a number; found: | bug??
Subject: diff: variable must not be a number; found: | bug??
From: Evan Cooch
Date: Mon, 18 Nov 2013 10:20:50 -0500
On 11/18/2013 9:57 AM, Leo Butler wrote:
>
> Maxima returns the following error:
>
> diff: variable must not be a number; found: 8
>
> Maxima/diff is telling you that when it subst's f1=8 into lls_f1, it
> finds diff(blah,8), which is non-sensical.
>
> You want something like
>
> at(lls_f1,[f1=8]);
>
>
>
Thanks!
But why, then, does the following work? And every other bit I've code
I've used for a couple of years built on the same approach.
base :
matrix([0,0,m_3*s_0,0,0],[(1-sigma_1)*s_1,0,0,0,0],[0,(1-sigma_2)*s_2,s_3,0,0],[sigma_1*s_1,0,0,0,0],[0,sigma_2*s_2,0,s_2,s_3]);
cp_base : charpoly(base,lambda);
depends(lambda,sigma_1);
deriv : diff(cp_base,sigma_1);
lls_sig1 : solve(deriv,'diff(lambda,sigma_1));
lls_sigma1 :
subst([s_0=0.35,s_1=0.60,s_2=0.80,s_3=0.90,m_3=1.25,lambda=1.08,sigma_1=0,sigma_2=0],lls_sigma1);
solve(deriv,'diff(lambda,sigma_1)) -- in this, and in the 'problem'
example, yields an equation, with different variables. The fact that it
is the implicit derivative should be irrelevant, shouldn't it? I simply
want to evaluate the expression at particular values of the variables.
I've never used 'at' before (and wasn't even aware it existed). I'll
have a look at the documentation for same.