MathGroup Archive 2011

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

Search the Archive

Help in function defination

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122033] Help in function defination
  • From: Mohan <mohanbochum at googlemail.com>
  • Date: Mon, 10 Oct 2011 04:26:33 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi, I have defined some functions, but when i substitute values i get
an error message, please check below.

Definition of a basic function
In[1]:= SFn1[p_] := (1/2)*(1 - p)

Definition of new function using the basic function
In[65]:= N1[p1_, p2_, p3_] := (SFn1[p1]*(p1))*SFn1[p2]*SFn1[p3]

Derivative of the new function
In[68]:= N1dx[p1_, p2_, p3_] := D[N1[p1, p2, p3], p1]

declaring function variables for the new derivative function
In[69]:= N1dx[x, y, z]

this is the output i want. its right
Out[69]= 1/8 (1 - x) (1 - y) (1 - z) - 1/8 x (1 - y) (1 - z)

**************************************************************************************************
If i substitute the value for the derivative function I get an error
as shown below...
please help me to find the right way to do it.
**************************************************************************************************
In[77]:= N1dx[1, 10, 10]

During evaluation of In[77]:= General::ivar: 1 is not a valid
variable. >>

Out[77]= \!\(
\*SubscriptBox[\(\[PartialD]\), \(1\)]0\)

Out[69]= 1/8 (1 - x) (1 - y) (1 - z) - 1/8 x (1 - y) (1 - z)

In[77]:= N1dx[1, 10, 10]

During evaluation of In[77]:= General::ivar: 1 is not a valid
variable. >>

Out[77]= \!\(
\*SubscriptBox[\(\[PartialD]\), \(1\)]0\)



  • Prev by Date: Re: "Esoteric of the week"
  • Next by Date: Re: Laplace Trasform system of differential equation
  • Previous by thread: Different functions in one Plot
  • Next by thread: Re: Help in function defination