0
$\begingroup$
Prem[a_, b_] := 
  Integrate[(Gamma[a + b]/(Gamma[a]*Gamma[b]))*
    Integrate[
     Integrate[u^(a - 1)*(1 - u)^(b - 1), {u, 0, x}], {x, 0, 
      tailG[x]}], {x, 0, Infinity}];
data = {Prem[0.5, 1], Prem[0.6, 1], Prem[0.7, 1], Prem[0.8, 1], 
  Prem[0.9, 1], Prem[1, 1], Prem[0.5, 2], Prem[0.6, 2], Prem[0.7, 2], 
  Prem[0.8, 2], Prem[0.9, 2], Prem[1, 2], Prem[0.5, 3], Prem[0.6, 3], 
  Prem[0.7, 3], Prem[0.8, 3], Prem[0.9, 3], Prem[1, 3], Prem[0.5, 4], 
  Prem[0.6, 4], Prem[0.7, 4], Prem[0.8, 4], Prem[0.9, 4],
  Prem[1, 4], Prem[0.5, 5], Prem[0.6, 5], Prem[0.7, 5], Prem[0.8, 5], 
  Prem[0.9, 5], Prem[1, 5]}

ListLinePlot[data]

Plot[{Prem[a, b],Prem1[a,b]},Prem2[a,b]}, {x, First[data][[1]], Last[data][[1]]}, 
 PlotRange -> Full]

for a<1 and b>1 i want to plot and then include more that two functions in the some plot

$\endgroup$
6
  • $\begingroup$ What is tailG? $\endgroup$
    – cvgmt
    May 17 at 11:00
  • $\begingroup$ tailG[x_] := Exp[-(1/2)*x]; is survival function $\endgroup$ May 17 at 11:04
  • 2
    $\begingroup$ what is Prem[]? $\endgroup$ May 17 at 12:38
  • $\begingroup$ Please add definitions of these quantities to your question instead of providing them in comments. $\endgroup$
    – bbgodfrey
    May 17 at 14:47
  • $\begingroup$ its my function $\endgroup$ May 17 at 20:14
0
$\begingroup$

As I understand it, you want to plot that 3D-integral depending on the parameters a,b. Let us do it step by step (Two small steps are better than one big step.). First, we calculate

Gamma[a + b]/(Gamma[a]*Gamma[b])*Integrate[u^(a - 1)*(1 - u)^(b - 1), {u, 0, x}, 
Assumptions -> a > 0 && a < 1 && b > 1 && x >= 0]

ConditionalExpression[(Beta[x, a, b]*Gamma[a + b])/(Gamma[a]*Gamma[b]), x < 1]

Second, we make the next integration (The upper bound of the integration is redesignated from Exp[-x/2] to Exp[-y/2] to avoid any misunderstanding.)

Integrate[(Beta[x, a, b] Gamma[a + b])/(Gamma[a] Gamma[b]), {x, 0, Exp[-y/2]}, 
Assumptions -> a > 0 && a < 1 && b > 1 && y >= 0]

ConditionalExpression[(Gamma[a + b]*Hypergeometric2F1Regularized[a, 1 - b, 2 + a, E^(-1/2*y)])/ (E^(((1 + a)*y)/2)*Gamma[b]), && y > 0]

In the above Mathematica blows on cold water by NotElement[b, Integers] (see that follows). It's clear there is no chance to symbolically integrate the latest expression by y, so

Plot3D[Evaluate[NIntegrate[(Gamma[a + b]* Hypergeometric2F1Regularized[a, 1 - b, 2 + a, 
E^(-1/2*y)])/(E^(((1 + a)*y)/2)*Gamma[b]), {y, 0, Infinity}, 
PrecisionGoal -> 5, AccuracyGoal -> 5]], {a, 0, 1}, {b, 1, 5}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Excuse me but in my mathematica doesnt run this graph $\endgroup$ May 18 at 10:23
  • $\begingroup$ I use 12.2 on Windows 10 Pro. Here is the executed code exported as PDF. .nb file on demand through Dropbox. Don't hesitate to ask for further explanation in need. $\endgroup$
    – user64494
    May 18 at 13:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.