 
 
 
 
 
 
Re: Coefficient problem
- To: mathgroup at smc.vnet.net
- Subject: [mg36449] Re: [mg36421] Coefficient problem
- From: BobHanlon at aol.com
- Date: Sat, 7 Sep 2002 02:54:07 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 9/6/02 3:28:56 AM, pascal at go.ro writes:
>
>Delta[eq_, x_]:=Coefficient[eq, x]^2 - 4 Coefficient[eq, x^2] Coefficient[eq,
>x^0]
>
>eq has this form a x^2 + b x + c
>
>But there is a problem with the x^0 coefficient!
>How can I overcome that?
see on-line help for Coefficient
delta[eq_, x_] := 
    Coefficient[eq, x, 1]^2 - 4 *Coefficient[eq, x, 2] *Coefficient[eq, x, 0];
eq = a*x^2 + b*x + c;
delta[eq, x]
b^2 - 4*a*c
Bob Hanlon

