Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Help with numerical differentiation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80837] Help with numerical differentiation
  • From: lederer at ssb.rochester.edu
  • Date: Tue, 4 Sep 2007 03:37:37 -0400 (EDT)

I am really confused and stuck at doing this numerical computation.  I
have searched the archives of this group and tried what was suggested
with no solution---Thanks to all in advance.

Here is what I am trying to do, elaborated with comments:

LPDF[mu_, sigma_, z_] = PDF[LogisticDistribution[mu, sigma], z]

UU = U[mu_, sigma_, a_, b_, S_] := NIntegrate[LPDF[mu, sigma, y]*(b (
    a + y) + S), {y, -(a + S/b), =E2=88=9E}] - a^2
**defining a function using the logistic distribution and then
numerically integrating it over some range...  everything seems to
work so far**

SetSystemOptions["EvaluateNumericalFunctionArgument" -> False]

**tried this last statement to get rid of error messages--did not
work**

maxa[mu_, sigma_, b_, S_] := FindMaximum[U[mu, sigma, a, b, S], {a, 1}]
[[1]]

** maximizes U wrt a--this seems to work but with some error messages
dealing with non numerical values in the numerical integration**

Dmaxasigma[mu_, x_, b_, S_] := D[maxa[mu, x, b, S], x]

This is where I am stuck: when I evaluate this function, it does not
compute the derivative--just the optimum value of the maximization
with a partial derivative sign in front of it.

I will need to use this function in a differential equation. Besides
this computational problem, any advice on the way to set up these
steps so that execution is efficient would be appreciated.  This is
only part of my entire problem--but cannot proceed without this step.

Thanks,

Phil in Rochester NY



  • Prev by Date: Re: is there a better way to do constraint logic programming in Mathematica?
  • Next by Date: RE: Re: Re: Rule-based programming: declare variables to be a number
  • Previous by thread: Re: Question about memory consumption in my codes by using Mathematica
  • Next by thread: Re: listplot and legend (again)