MathGroup Archive 2011

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

Search the Archive

quadp

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115206] quadp
  • From: Richard Fateman <fateman at eecs.berkeley.edu>
  • Date: Tue, 4 Jan 2011 04:25:56 -0500 (EST)
  • References: <ifs30a$oor$1@smc.vnet.net> <4D21F917.2020209@cs.berkeley.edu> <48AEFA8B-880D-4B9A-B9CC-C1C7414D1384@mimuw.edu.pl> <A934FC78-8B93-45FB-A48D-D5BE2606760E@mimuw.edu.pl>

On 1/3/2011 12:28 PM, Andrzej Kozlowski wrote:
>
> I forgot one obvious matter. A better way to solve this problem is:
>
> quadp[f_, x_] /; PolynomialQ[f, x]&&  Exponent[f, x] == 2 :=
>   qq @@ CoefficientList[f, x]
>
> quadp[5 + 4*x + 3*x^2, x]
>
> qq(5,4,3)
>
> quadp[r*x^2 + s*x^2, x]
>
> qq(0,0,r+s)

yours does not work for quadp[(x^3+x)/x, x], which I think is a quadratic.
my program agrees with me.




  • Prev by Date: Re: dissabling code segments
  • Next by Date: Re: about the use of button
  • Previous by thread: show curves simultaneously
  • Next by thread: Re: quadp