Group Abstract Group Abstract

Message Boards Message Boards

0
|
25K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Partial Derivative problem using Mathematica

Posted 9 years ago

Hi I am rather new to Mathematica and still learning how to use it (shifting from MathCad) and came across this rather simple problem: using partial derivative of a simple function f(x,y)=x*y or x y with respect to y I should be getting x, but somehow Mathematica gives different solution:

In[5]:= G[x_, y_] := x y
D[G[x, y] y]

Out[6]= x y^2

Where is my problem?

Thanks

sorry seems like the editing needs to be done, I did say I am new to Mathematica anyway my problem in a simple txt form is:

In[5]:= G[x_,y_]:=x y

D[G[x,y]y]

Out[6]= x y^2

A screen shot of the syntax i used is attached as well. Hope this time the problem is better presented for your input.

Thanks

Attachments:
2 Replies

Yes, thanks Shenghui, it worked well, the , before y was missing which has changed the whole expression. Cheers,

Andrzej

Use the following code example:

In[52]:= G[x_,y_]:=x y 
In[53]:= D[G[x,y], y]
Out[53]= x
POSTED BY: Shenghui Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard