Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17

Math Help - NMaximize in Mathematica

  1. #16
    xdu
    xdu is offline
    Newbie
    Joined
    Nov 2009
    Posts
    19
    Sorry for late reply.
    It seems there is nothing with how big the data sets are. I found that it produces complex number if n includes the number 29 or 30. It's wired and how to avoid?

    there is another problem, e.g.

    n = Table[{140, 80, 57, 41, 31, 24, 20, 16, 13, 11, 10, 8, 7, 6, 5, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1}];
    f[j_,r_,x_,a_] := ((r x)^(n[[j]])Gamma[a + 1]Gamma[n[[j]]] Hypergeometric2F1[n[[j]],n[[j]], n[[j]] + a, x - r x])/(x n[[j]] Gamma[n[[j]] + a](HypergeometricPFQ[{1, 1, 1}, {2, 1 + a},x] - (1 - r)HypergeometricPFQ[{1, 1, 1}, {2, 1 + a}, x - r x]))
    L[r_, x_, a_] := Sum[Log[f[j, r, x, a]], {j, 1, Length[n]}];
    NMaximize[{L[x, r, a], 0 < x, x < 1, 0 < r, r < 1, a > 0}, {x, r, a}]

    I could get
    [{-104.58775961606352, {x -> 0.999994961009502, r -> 0.9875898138152072, a -> 0.0519802559956126}}]

    But if I change the range of r, e.g. r<0.5 or other values. I always get: SystemException["MemoryAllocationFailure"
    Do you know why?

    Cheers,
    xdu
    Follow Math Help Forum on Facebook and Google+

  2. #17
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Do you know why?
    I'm afraid I don't. Sounds like a question for Wolfram Support, if you can get a hold of them. Sorry about that.
    Follow Math Help Forum on Facebook and Google+

Page 2 of 2 FirstFirst 12

Similar Math Help Forum Discussions

  1. Help about Mathematica
    Posted in the Math Software Forum
    Replies: 2
    Last Post: June 1st 2010, 12:46 PM
  2. help me in Mathematica
    Posted in the Math Software Forum
    Replies: 2
    Last Post: May 18th 2010, 02:26 AM
  3. Mathematica
    Posted in the Math Software Forum
    Replies: 2
    Last Post: March 24th 2010, 08:13 AM
  4. problem with NMaximize
    Posted in the Math Software Forum
    Replies: 0
    Last Post: December 7th 2009, 08:14 AM
  5. mathematica
    Posted in the Math Software Forum
    Replies: 0
    Last Post: October 27th 2009, 02:03 PM

Search Tags


/mathhelpforum @mathhelpforum