Re: Entering constant placeholders
- To: mathgroup at smc.vnet.net
- Subject: [mg32353] Re: [mg32328] Entering constant placeholders
- From: BobHanlon at aol.com
- Date: Wed, 16 Jan 2002 03:30:05 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 1/15/02 3:11:07 AM, dglfl at home.com writes:
>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.
>
SetAttributes[{a,b,c}, Constant];
D[a*x^3+b*x^2+c*x+d,x]
3*a*x^2 + 2*b*x + c
Bob Hanlon
Chantilly, VA USA