Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Using Coefficient on an equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95440] Re: [mg95433] Using Coefficient on an equation
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Mon, 19 Jan 2009 02:54:12 -0500 (EST)
  • References: <200901181033.FAA13999@smc.vnet.net>
  • Reply-to: drmajorbob at longhorns.com

f = a*x^2 + b*x + c == 0;
First@Coefficient[f, x^2]

a

or

Coefficient[First@f, x^2]

a

Bobby

On Sun, 18 Jan 2009 04:33:11 -0600, <carlos at colorado.edu> wrote:

> If f=a*x^2+b*x+c, Coefficient[f,x^2] obviously returns a.
> But if f=a*x^2+b*x+c==0, it returns 0.
>
> The problem arose using the Calculus`VariationalMethods` package.
> It (unfortunately) returns the Euler-Lagrange equations as
> such, so I have to remove the useless ==0 appendage for
> Coefficient to work properly. Is there a simple direct way out?
>



-- 
DrMajorBob at longhorns.com


  • Prev by Date: Re: usage of TrigToExp?
  • Next by Date: Re: Using Coefficient on an equation
  • Previous by thread: Using Coefficient on an equation
  • Next by thread: Re: Using Coefficient on an equation