MathGroup Archive 2002

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

Search the Archive

RE: Entering constant placeholders

  • To: mathgroup at
  • Subject: [mg32362] RE: [mg32328] Entering constant placeholders
  • From: "David Park" <djmp at>
  • Date: Wed, 16 Jan 2002 03:30:22 -0500 (EST)
  • Sender: owner-wri-mathgroup at


There are a number of ways to do this. I would do it this way because it
separates the parameters from the variable of the polynomial. (By the way,
your Mathematica syntax is not at all correct. You must especially separate
a, b, and c from the x expressions by a space.)

poly[a_, b_, c_, d_][x_] := a*x^3 + b*x^2 + c*x + d

Now, you can use the shortcut expression for differentiating.

poly[a, b, c, d]'[x]
c + 2*b*x + 3*a*x^2

David Park
djmp at

> From: progman [mailto:dglfl at]
To: mathgroup at
> I can't seem to make this work.  When I enter the following, I get these
> errors:
> SetAttributes[a,b,c, Constant]
> Syntax::tsntxi: "SetAttributes a,constant" is incomplete; more input is
> needed.
> d(ax^3 + bx^2 + cx + d)/dx
> The answer should be 3ax^2+2bx+c .  I can't figure out how to tell
> mathematica that a,b, & c are constants.
> Thanks

  • Prev by Date: Re: How To Change A Rule
  • Next by Date: Re: How To Change A Rule
  • Previous by thread: Re: Entering constant placeholders
  • Next by thread: RE: Entering constant placeholders