MathGroup Archive 2009

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

Search the Archive

Re: Best syntax for derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96423] Re: [mg96386] Best syntax for derivative
  • From: Aaron Fude <aaronfude at gmail.com>
  • Date: Fri, 13 Feb 2009 03:43:56 -0500 (EST)
  • References: <200902121141.GAA08658@smc.vnet.net> <49943ED6.6070407@wolfram.com>

That's great. Thanks for your help.

Now the one thing I'm not able to figure out is how to combine the two. I'm
trying the following, but w/o success:

g:= Derivative[0, 1, 0][f]*f[##]&
or

g:= Derivative[0, 1, 0][f]*(f[##]&)

Thank you again.
On Thu, Feb 12, 2009 at 10:47 AM, Carl Woll <carlw at wolfram.com> wrote:

> Aaron Fude wrote:
>
> Thanks. That's cool. May I ask a follow up question?
>>  What if I want to have  g=f^2?
>>  Is there a similar alternative to
>>  g[x_, y_, z_] := f[x, y, z]^2?
>>  Thanks again!
>>
>
> The Derivative thing can work because the number of arguments it gets
> determines how many arguments f has. In your example this information is
> unavailable, so you'll need to use Slot objects to achieve the same effect:
>
> g = f[##]^2&
>
> Carl
>
>
>
>>
>>  On Thu, Feb 12, 2009 at 10:23 AM, Carl Woll <carlw at wolfram.com <mailto:
>> carlw at wolfram.com>> wrote:
>>
>>    Aaron Fude wrote:
>>
>>        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
>>
>>
>>    It's:
>>
>>    g = Derivative[0, 1, 0][f]
>>
>>    Carl Woll
>>    Wolfram Research
>>
>>
>>
>



  • Prev by Date: Re: Re: testing if a point is inside a polygon
  • Next by Date: Re: very slow Save[]s on Mathematica V7??
  • Previous by thread: Re: Best syntax for derivative
  • Next by thread: Re: Best syntax for derivative