| 
November 6th, 2009, 02:30 PM
| | Newbie | | Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
| | Integration of Incomplete Beta Functions and Hypergeometric Functions QUESTION
Let
I = double integral {x<y} [F(x)]^r * [F(y)]^s * [F(x)] * [1 - F(y)] dx dy
Verify/Show that for the 5 parameter Generalized Lambda Distribution (GLD),
I =
(a^2)(b^2)
--------------------------------------------
(r + b + 1)(r + s + 1 + 2b)(r + s + 2 + 2b)
abcd Gamma(d) Gamma(2 + r)
+ --------------------------------------------
(s + b) (s + 1 + b) Gamma(2 + r + d)
abcd Gamma(d) Gamma(r + s + 2 + b)
- --------------------------------------------
(s + b) Gamma(r + s + 2 + b + d)
abcd Gamma(d) Gamma(r + s + 3 + b)
+ --------------------------------------------
(s + b + 1) Gamma(r + s + 3 + b + d)
abcd Gamma(d + 1) Gamma(r + s + 2 + b)
+ --------------------------------------------
(r + b + 1) Gamma(r + s + 2 + b + d)
(c^2)(d^2) Gamma(1 + 2d) Gamma(r + 2) * F(-2,1+d,1+2d;2+d,r+3;1)
+ -------------------------------------------- -------------------------
(1 + d) Gamma(3 + r + 2d)
where b > -1/2 and d > -1/2
************************************************** *******
In the attachment I have provided the question with the all my working.
I am stuck at the integrations of the 3rd and 4th terms of my solution as I don't know how to integrate the incomplete beta function. Furthermore, their respective integrals I suspect should give 2 terms for a total of 4 for 'I' if you include the ones I have worked out. Yet in the question, 'I' is made up of 6 not 4 terms.
Also how does the hypergeometric function factor in the integration?
Finally is it possible there is an error in this question? I made sure that is was copied correctly.
Any hints, suitable resources or and help is greatly appreciated.
Thank you in advance | 
November 6th, 2009, 06:00 PM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | It would help if you wrote it clearly. You write:
What are the actual limits on the variable x? Since it's symmetrical, it looks like:
Can you give the explicit values for  or state what form the limits take?
I looked at your work and have some concerns about your new limits in the u-v coordinate system but for now, let's assume that part is ok. Is the following the integral you're trying to solve:
If so, then what are the bounds on all the constants?
Hopefully then we can clearly see what integral you're trying to solve and can then proceed to work through it.
__________________ "I am beset by the ironies in my life" | | The following users thank shawsend for this useful post: | |  | 
November 6th, 2009, 07:05 PM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | Here's what I believe are the integrals for others in case you're interested:
where  is the incomplete Beta function
I went through the first one and apparently r,b s are integers since you're taking factorials and I get the same answer as you. You write further down in solving for the second one:
"However this is not the 5th term of I that I was asked to show. If you look closely, you will see that in the denominator in the Gamma function of my working there is a 3 instead of a 2. I just can't see where I'm going wrong."
I get a 3 also and so does Mathematica: Code: Integrate[((a*b*c*d)/(r + b + 1))*
v^(r + b + s + 1)*(1 - v)^d, {v, 0, 1}]
(1/(1 + b + r))*(a*b*c*d*
If[Re[d] > -1 && Re[b + r + s] > -2,
(Gamma[1 + d]*Gamma[2 + b + r + s])/
Gamma[3 + b + d + r + s],
Integrate[(1 - v)^d*
v^(1 + b + r + s), {v, 0, 1},
Assumptions -> Re[d] <= -1 ||
Re[b + r + s] <= -2]])
Therefore, I believe your initial answer is incorrect and the 2 should be changed to a 3. And as far as integrating the beta function, what about setting it up as a double integral and switching the order of integration?
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; November 7th, 2009 at 07:31 AM.
Reason: corrected last integral
| 
November 11th, 2009, 06:57 AM
| | Newbie | | Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
| | Thank you! Thank you so much for the you quick response, moreover for the proving to me that I wasn't making some catastrophic mistake in my calculation of the the second term. Thanks again!
As for you suggestion of switching the order of integration according the theorem on the evaluation of double integrals, the limits on the outside integral should be fixed points and not variable; so I don't think that would be the best approach. Can you thing of another way to tackle this?
I am curious. Is this possible to integrate the last two integrals with the incomplete beta function in the mathematica program? If yes, does it come out the the remaining terms I am looking for? And could you post the results and any insightful explanations.
Once again any help you provide was, is and will be GREATLY appreciated!
Thank you again.
p.s
I apologize that the it wasn't written clearly. How do you enter text so that it comes up exactly as the math symbols? | 
November 11th, 2009, 07:44 AM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| |
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; November 11th, 2009 at 08:46 AM.
| | The following users thank shawsend for this useful post: | |  | 
November 11th, 2009, 11:14 PM
| | Newbie | | Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
| | My bad I totally misunderstood your hint! After seeing you reply I did the calculation and got the next 3 terms of the solution. Thank you soooooooooo much!
I'm working on the final term now but I'm finding it difficult. So I that I don't make the same mistake twice, could you explain what you mean by "term-wise integration of the hypergeometric series" especially the part "from the first integration". I don't understand how the hypergeometric function comes in.
Thank you again | 
November 12th, 2009, 06:31 AM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | Quote:
Originally Posted by urcing
I'm working on the final term now but I'm finding it difficult. So I that I don't make the same mistake twice, could you explain what you mean by "term-wise integration of the hypergeometric series" especially the part "from the first integration". I don't understand how the hypergeometric function comes in.
Thank you again  | I've been re-doing it and have some concerns with the results. There is of course the issue of justifying switching order of integration, summation, and term-wise integration which may not be valid but for now, let's assume that it is just to see what we get and let's just drop the  term for now:
Now use the Binomial theorem for the  term:
That last sum is a hypergeometric function right? So then:
And at that point, we can then express the integral as an infinite sum of beta functions right?
I can't go further on my own at this point, but Mathematica evaluates that sum to a hypergeometric expression however, Mathematica cannot resolve the equality of that expression to the expression obtained by direct integration of the original beta expression:
Via direct integration by Mathematica: ![=\frac{\Gamma(1+d)\Gamma(2+r)\Gamma(3+r+s)}{\Gamma(3+r)\Gamma(4+d+r+s)} \,F\left[\{1+d,2+r,3+r+s\},\{3+r,4+d+r+s\},1\right] =\frac{\Gamma(1+d)\Gamma(2+r)\Gamma(3+r+s)}{\Gamma(3+r)\Gamma(4+d+r+s)} \,F\left[\{1+d,2+r,3+r+s\},\{3+r,4+d+r+s\},1\right]](http://www.mathhelpforum.com/math-help/latex2/img/d7e71728accb51009890a23c64d3a214-1.gif)
and from the above analysis using Mathematica to evaluate the last infinite sum expression:
Now, let d=1/2 and take 2500 points with  and  and plot the difference  which is shown below. Note the difference is of the order of  . That of course doesn't mean everything is ok but does give me some confidence that the method above is probably valid at least in a select range of values.
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; November 12th, 2009 at 10:58 AM.
Reason: corrected formula
| | The following users thank shawsend for this useful post: | |  | 
November 13th, 2009, 04:21 PM
| | Newbie | | Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
| | When I computed it by hand I got this
Differs from Mathematica by the 1+d agrument compared to my 1-d but everything else is the same. I'll post my working tomorrow night for you to see and look through.
Also is
a legitimate manipulation? If yes, why? | 
November 13th, 2009, 06:09 PM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | Hello Urcing. Yeah, I just got it. Took a while for me. I was making it too complicated above. First I noted that:
via the generalized Binomial Theorem previously mentioned above. Then:
Note the first three:
Where we can begin to see the rising factorial terms emerging via the relationship  . Mathematica is factoring out the term:  and then adding the expression  in the hypergeometric expression to account for the  terms. Nice trick I think. I made a typo above. It should be  :
And the other integral is just a  substitution right?
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; November 13th, 2009 at 06:29 PM.
| 
November 15th, 2009, 05:48 AM
| | Newbie | | Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
| | I guess I won't need to put on the working anymore! lol.
The upper and lower limits seem ok. I thought so too but then wouldn't v = w+1? After reading Beta function - Wikipedia, the free encyclopedia
I wonder if this equation exploits the fact that beta function is symmetric? What do you think?
Apparently this transformation was used to get the the expression for the 6th term in the solution but I'm not entriely comvinced it is a legitimate step. Finally, is the difference between our solution and the given solution zero. | 
November 15th, 2009, 09:26 AM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | Hi. I think:  is correct. Note if  then  .
Glad you asked about the difference between out solution and the solution you gave for the sixth term. They are not the same. Note if I just numerically calculate  for  , the numerical results agrees with our solution but not the one you initially posted if I'm interpreting your notation correctly. That is:
Then this is the results from Mathematica: Code: (* Numerical Results *)
In[38]:=
NIntegrate[v^s*(1 - v)^d*Beta[v, 2 + r, d] /.
{d -> 1/2, r -> 2, s -> 5}, {v, 0, 1}]
(* Our results *)
N[((Gamma[1 + d]*Gamma[3 + r + s])/
((2 + r)*Gamma[4 + d + r + s]))*HypergeometricPFQ[
{1 - d, 2 + r, 3 + r + s}, {3 + r, 4 + d + r + s}, 1] /.
{d -> 1/2, r -> 2, s -> 5}]
(* Posted results *)
N[((Gamma[1 + 2*d]*Gamma[2 + r])/((1 + d)*Gamma[3 + r + 2*d]))*
HypergeometricPFQ[{-2, 1 + d, 1 + 2*d}, {2 + d, r + 3},
1]] /. {d -> 1/2, r -> 2, s -> 5}
Out[38]=
0.014092256949399784
Out[39]=
0.014092256949399806
Out[40]=
0.02019047619047619
I believe what we've calculated is correct and what you initially posted is not for the following reason: We can do a very good job of numerically integrating the original double integral:
Let's do so for the following list of parameter values:  given  :
We do so by first generating a list of values  in the range  , then calculating an interpolation function for the values. The Mathematica command Interpolation[values], does that below and returns the interpolation function myF: Code: g[a_, b_, c_, d_, m_, f_] := m + a f^b - c (1 - f)^d;
x0 = N[g[1/2, 1/3, 1/4, 3/4, 1, 0]]
x1 = N[g[1/2, 1/3, 1/4, 3/4, 1, 1]]
p1 = Plot[g[1/2, 1/3, 1/4, 3/4, 1, f], {f, 0, 1}]
lns = Flatten[
Cases[Normal[First[p1]], Line[pts_] -> pts, {0, Infinity}], 1];
ipts = {#[[2]], #[[1]]} & /@ lns;
myF = Interpolation[ipts]
Now, the function  in the range  is a very good approximation to  . I've plotted below the function ![f(x,y)=myF(x)^r myF(y)^s myF(x)\left[1-myF(y)\right] f(x,y)=myF(x)^r myF(y)^s myF(x)\left[1-myF(y)\right]](http://www.mathhelpforum.com/math-help/latex2/img/c376e9ace6533574f38869894966f4b4-1.gif) and note that the blue region above the line  is the region of integration of the original integral. We can then calculate this numerically and obtain:
Note also, when we numerically integrate over the u-v domain we obtain good agreement with the original integral:
And finally, when we assemble all the pieces of the above analysis, this numeric value agrees well with the results of that expression:
__________________ "I am beset by the ironies in my life"
Last edited by shawsend; November 15th, 2009 at 12:54 PM.
Reason: added numeric check
| 
November 15th, 2009, 01:22 PM
| | Super Member | | Join Date: Aug 2008
Posts: 601
Country: Thanks: 46
Thanked 262 Times in 227 Posts
| | Urcing, this is the Mathematica code I used to numerically construct the function F(x) and compute the integral in F, the integral in u and v, and then the expression we derived. You may want to try and find a machine running Mathematica and run the code and change the parameters as you wish. Code: Clear[a, b, c, d, m, r, s, f, x0, x1];
a = 1/2;
b = 3/2;
c = 1/4;
d = 3/4;
m = 1;
r = 3/2;
s = 1/4;
(* set up data to calculate F(x) *)
g[aval_, bval_, cval_, dval_, mval_, fval_] :=
mval + aval*fval^bval - cval*(1 - fval)^dval;
x0 = N[g[a, b, c, d, m, 0]];
x1 = N[g[a, b, c, d, m, 1]];
myPoints = Table[{g[a, b, c, d, m, f], f}, {f, 0, 1, 0.01}];
myInverse = Interpolation[myPoints];
(* now construct integrand with interpolated value of F(x) *)
fval[x_, y_] := myInverse[x]^r*myInverse[y]^s*myInverse[x]*
(1 - myInverse[y]);
(* integrate in x-y plane *)
NIntegrate[fval[x, y], {y, x0, x1}, {x, x0, y}]
(* integrate in u-v plane *)
NIntegrate[u^(r + 1)*v^s*(1 - v)*(a*b*u^(b - 1) +
c*d*(1 - u)^(d - 1))*(a*b*v^(b - 1) + c*d*(1 - v)^(d - 1)),
{v, 0, 1}, {u, 0, v}]
(* compute symbolic value *)
i1 = (a*b)^2/((r + b + 1)*(r + s + 2*b + 1)*(r + s + 2*b + 2));
i2 = ((a*b*c*d)/(r + b + 1))*(Gamma[r + s + b + 2]/
Gamma[r + s + b + d + 3])*Gamma[1 + d];
i3 = a*b*c*d*Gamma[d]*(Gamma[2 + r]/((b + s)*(b + s + 1)*
Gamma[r + 2 + d]) + Gamma[b + s + r + 3]/
(Gamma[b + s + r + d + 3]*(b + s + 1)) -
Gamma[b + s + r + 2]/((b + s)*Gamma[b + s + r + 2 + d]));
i4 = (c*d)^2*((Gamma[1 + d]*Gamma[2 + r]*Gamma[3 + r + s])/
(Gamma[3 + r]*Gamma[4 + d + r + s]))*
HypergeometricPFQ[{1 - d, 2 + r, 3 + r + s},
{3 + r, 4 + d + r + s}, 1];
N[i1 + i2 + i3 + i4]
__________________ "I am beset by the ironies in my life" | | The following users thank shawsend for this useful post: | |  | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -7. The time now is 08:59 PM. | | |