Re: Re: Using Coefficient on an equation
- To: mathgroup at smc.vnet.net
- Subject: [mg95626] Re: [mg95615] Re: Using Coefficient on an equation
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 23 Jan 2009 05:06:27 -0500 (EST)
- References: <200901181033.FAA13999@smc.vnet.net> <gl1bl5$95f$1@smc.vnet.net> <200901221205.HAA11455@smc.vnet.net>
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
- References:
- Using Coefficient on an equation
- From: carlos@colorado.edu
- Re: Using Coefficient on an equation
- From: carlos@colorado.edu
- Using Coefficient on an equation