Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Best syntax for derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96460] Re: Best syntax for derivative
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Sat, 14 Feb 2009 03:07:59 -0500 (EST)

Like this?

In[41]:=   g[x_, y_, z_] := D[Sin[x y z], y];
                g[x, y, z]

Out[42]=  x z Cos[x y z]

or like this?

In[43]:= g[x_, y_, z_] := \!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]\ \(Sin[x\ y\ z]\)\);
g[x, y, z]

Out[44]= x z Cos[x y z]

??


Hi,

Suppose I have a function of three variables

f[x_, y_, z_]:=Sin[x y z]

And I want to construct g[x, y, z] which is the partial derivative of f
[] with respect to y. I do

f[x_, y_, z_] := Sin[x y z]
g[x_, y_, z_] := D[f[x, temp, z], temp] /. temp -> y

but I'm sure there is something better. Something along the lines of

g = Partial[f, 2]

Many thanks in advance.

Aaron



-- 
Alexei Boulbitch, Dr., Habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.




  • Prev by Date: Re: Problem with DSolve
  • Next by Date: Plots margins
  • Previous by thread: Re: Best syntax for derivative
  • Next by thread: Definition of the similarity in a set of integers