Ah. Thanks. So the most simplified version of your function is this:
=\frac{(rx)^{n_{j}}\,\Ga mma(a+1)\,\Gamma(n_{j})\, _{2}F_{1}(n_{j},n_{j},n_{j}+a,x-rx)}{x\,n_{j}\,\Gamma(n_{j}+a)\,( _{3}F_{2}(1,1,1,2,1+a,x) -(1-r)\, _{3}F_{2}(1,1,1,2,1+a,x-rx))}}.)
You then defined, as mentioned above,
=\sum_{j=1}^{\text{length}(\ vec{n})}\ln(f_{j}(r,x,a)).})
And your goal is to maximize
correct?
Looking back at your post # 3, I think may have seen some of your problems. I think they might be in your syntax. When defining your functions, you have to use correct Mathematica syntax. Here's the generalized hypergeometric function in Mathematica:
Code:
HypergeometricPFQ[{1,1,1},{2,1+a},x-r x]. The extra braces, I would guess, are important.
In addition, I don't think Mathematica understands elided constraints of the form
.
Instead, list that as two separate constraints:
Unfortunately, I do not have a version of Mathematica that includes the NMaximize command, and I really don't see how to do this problem on WolframAlpha, because of the need to define several things before actually maximizing. However, I will give you the exact syntax that I believe should work, assuming this problem is doable in this manner:
Code:
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]}]
n = {1, 1, 2, 3, 4, 4, 150, 532}
NMaximize[{L(x,r,a),0<x,x<1,0<r,r<1,a>0},{x,r,a}] Here the third line definition of n should be whatever your data actually is.
Try that and let me know how it goes.