4
$\begingroup$

Here I want to find the probability $p$ which is given by

$$p=\int_0^{r_d}\mathcal{L}_I(\beta r^{\alpha}|r)f_R(r)dr$$

with $r_d=1$ and $0 \le r\le r_d$.

I want to calulate the probability for different values of $\beta$ and $\alpha$

Here,

$f_R(r)=2Nr(1-r^2)^{N-1}$

$\mathcal{L}(\beta r^{\alpha}|r)=\left(\frac{\mathcal{C}(\alpha,\beta r^{\alpha},r_d)-\mathcal{C}(\alpha,\beta r^{\alpha},r)}{r_d^2-r^2}\right)^{p_bN-1}$

$\mathcal{C}(\alpha,\beta r^{\alpha},x)=x^2-x^2\hspace{1mm} _2F_1\left(1,2/\alpha,1+2/\alpha,-x^{\alpha}/(\beta r^{\alpha})\right)$

rd=1;
N=5;
pb=1;
c[α_,r_,x_]:=x^2-x^2*Hypergeometric2F1[1,2/[Alpha],1+2/[Alpha],-x^α/(β*r^α)];

β=3.1623;
α=4;

p=Integrate[((c[α_,r,rd]-c[α_,r,r])/(rd^2-r^2))^(N-1)*2*N*r*(1-r^2)^(N-1),{r,0,1}]

I am getting some syntax error.

$\endgroup$
3
$\begingroup$

Do you mean

rd = 1;
n = 5;
pb = 1;
c[α_, r_, x_] := x^2 - x^2*Hypergeometric2F1[1, 2/α, 1 + 2/α, -x^α/(β*r^α)];

β = 3.1623;
α = 4;

p = Integrate[((c[α, r, rd] - c[α, r, r])/(rd^2 - r^2))^(n - 1)*2*n*r*(1 - r^2)^(n - 1), 
     {r, 0, 1}]
Integrate[10*r*(1 - 0.08904220055024259*r^2 - 
  Hypergeometric2F1[1/2, 1, 3/2, -(0.31622553204945764/r^4)])^4, {r, 0, 1}]
N@%

0.416275

$\endgroup$
3
$\begingroup$

Avoid using capital letters as variables so that they don't conflict with Mathematica's existing definitions/functions (here "N" was part of the problem). There were some erroneous underscores as well, used when referencing a function from another function.

rd = 1;
n = 5;
pb = 1;
c[α_, r_, x_] := x^2 - x^2*Hypergeometric2F1[1, 2/ α, 1 + 2/ α, -x^α/(β*r^α)];

β = 3.1623;
α = 4;

p = Integrate[((c[α, r, rd] - c[α, r, r])/(rd^2 - r^2))^(n - 1)*2*n*r*(1 - r^2)^(n - 1), 
    {r, 0, rd}] 

Integrate[10*r*(1 - 0.08904220055024259*r^2 - Hypergeometric2F1[1/2, 1, 3/2, -(0.31622553204945764/r^4)])^4, {r, 0, 1}]

N@%

0.416275

or should

p = Integrate[((c[α, β*r^α, rd] - c[α, β*r^α, r])/(rd^2 - r^2))^(n - 1)*2*n*
   r*(1 - r^2)^(n - 1), {r, 0, rd}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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