Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95872] Re: Derivative
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 29 Jan 2009 05:52:08 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <glpgeg$lin$1@smc.vnet.net>

In article <glpgeg$lin$1 at smc.vnet.net>,
 "Cetin Haftaoglu" <cetin.haftaoglu at bam.de> wrote:

> I have a function 
> 
>                 Norton[arg_,exp_,nenner_]:= MCB[arg / nenner]^exp
> 
> I want to define my own deviation of the function Norton,
> D[Norton[arg,exp,nen],y[1]]:=dNdx[arg,exp,nen]
> 
> arg depends on y[1].
> 
> I have tried it with
>
>                 Derivative[1,0,0][Norton][arg_,n_,k_]:=dNdx[arg,n,k]
> 
> But I get an error.

Assuming I have correctly understood what you want, define an upvalue 
should do it. For instance,

In[1]:= Norton /: D[Norton[arg_, n_, k_], arg] := dNdx[arg, n, k]

In[2]:= UpValues[Norton]

Out[2]= {HoldPattern[\!\(
\*SubscriptBox[\(?\), \(arg\)]\(Norton[arg_, n_, k_]\)\)] :> dNdx[arg, 
n, k]}

In[3]:= Norton[arg_, exp_, nenner_] := MCB[arg/nenner]^exp

In[4]:= ?Norton

Global`Norton

Norton/:\!\(
\*SubscriptBox[\(?\), \(arg\)]\(Norton[arg_, n_, k_]\)\):=dNdx[arg,n,k]

Norton[arg_,exp_,nenner_]:=MCB[arg/nenner]^exp


Regards,
--Jean-Marc


  • Prev by Date: Re: Conditional list indexing
  • Next by Date: Re: Printing (v7)
  • Previous by thread: Re: Derivative
  • Next by thread: Taking the derivative of a summation