[Date Index]
[Thread Index]
[Author Index]
Re: Re: Using Coefficient on an equation
carlos at colorado.edu wrote:
> Thanks, First@ did the trick for my Euler equations.
>
> But caution: First[0==a*x^2] and First[a*x^2==0] do not return the
> same result. After a Simplify they do.
>
Right. Unless and until Simplify changes its handling of Equal. Which is
to say, if you preprocess with Simplify to do this then you are relying
quite heavily on magic rather than sound code. And slow magic at that
(but my guess is your primary focus is on the stability, not speed.)
Much safer is to preprocess equations by subtracting rhs from lhs. Could
use maybe
exprs = eqns /. Equal[a_,b_]:>a-b;
Now you can use Coefficient as before.
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: Re: Problem in generating a IF cycle which Mathematica**
Next by Date:
**Re: Newbie Question - Change 3D Bar Chart Background Color**
Previous by thread:
**Re: Using Coefficient on an equation**
Next by thread:
**Re: Using Coefficient on an equation**
| |