Re: Wrong partial derivatives calculated
- To: mathgroup at smc.vnet.net
- Subject: [mg41153] Re: Wrong partial derivatives calculated
- From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
- Date: Tue, 6 May 2003 05:57:08 -0400 (EDT)
- References: <b9514r$r86$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"David" <david at hushmail.com> wrote: > When I calculate (D[x^2 + xy + y^2, x) mathematica gives me 2y and when I > calculate D[x^2 + xy + y^2, y) I get 2x. These are wrong answers -- have > I got the syntax right? I'm trying to find partial derivatives of x^2 + > xy + y^2 with respect to x and y. The problem is that you've written the middle term as xy. Mathematica understands this as _a single_ variable named xy. Instead, you want the middle term to be x times y. You can get this by just putting a space between x and y, typing D[x^2 + x y + y^2, x] for example. This will solve your problem. David Cantrell