MathGroup Archive 1997

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

Search the Archive

Re: Derivative Evaluation


John Cigana wrote:
>
> Hello,
>
> I have a 7 parameters multivariate function. i.e. y = f(x1..x7).
>
> I am able to correctly find the partial derivative for each parameter.
>
> However, I can't seem to be able to evaluate my derivative at a given
> point. i.e. f'(x1=0.01, x2=0.5, x3=0.02, ... x7=0.05) = Value !
>
> Any insight on the subject ?? Any help appreciated !
>
> Thanks,
>
> JOHN CIGANA,

Mathematica makes it very clumsy to be able to evaluate the results of
symbolic calculations as functions.  Here is how I have been able to do
it.

#1-get rid of any curly braces by taking the [[1]] or [[1,1]] etc part
of the expression.
#2-set the symbolic expression equal to a symbol.
#3-set a second symbol with a variable list equal to the first using a
transformation rule.

Example:  suppose your derivative returns:
{{x^2 +y^2}}

Then,

f=%[[1,1]];
ff[a_,b_]:=f/.{x->a,y->b}

should give you an evaluatable function.  Since I am writing this from
memory, I remember that the second line works for = or := but not both.
 You may have to play a little with the assignment operators.

~
~
~
~
~
~
~
~


  • Prev by Date: Math2.2 on win95 1997
  • Next by Date: Formatting Text
  • Previous by thread: Math2.2 on win95 1997
  • Next by thread: Re: Derivative Evaluation