Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5566 > unrolled thread

Help in function defination

Started byMohan <mohanbochum@googlemail.com>
First post2011-10-10 08:28 +0000
Last post2011-10-10 08:28 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Help in function defination Mohan <mohanbochum@googlemail.com> - 2011-10-10 08:28 +0000

#5566 — Help in function defination

FromMohan <mohanbochum@googlemail.com>
Date2011-10-10 08:28 +0000
SubjectHelp in function defination
Message-ID<j6uabo$f1a$1@smc.vnet.net>
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\)

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web