Message Boards Message Boards

0
|
1245 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How do I get a numerical value of HyperGeometric2F1 function?

Posted 11 months ago

I need to plot a function that uses the built-in HyperGeometric 2F1 function. First I want to print out the value of the function in a couple of points. But the printed value just shows the 2F1 function with arguments, not the actual value of the function.

Here is my Notebook entry:

Clear[z1, zEQ, dFS1, dFS2, z]
z1 = 0.4*10^6
zEQ = 3400
dFS1[z_] = (15.6/Sqrt[z])*HyperGeometric2F1[1/2, 1/6, 7/6, -2.33/z^3]*
  UnitStep[z - z1]
Evaluate[dFS1[10^9]]
Evaluate[dFS1[0.4*10^6]]
dFS2[z_] = 
 15.6*{(1/Sqrt[z1])*
     HyperGeometric2F1[1/2, 1/6, 
      7/6, -2.33/z1^3] + ((z + 1)/z1^(3/2))*
     HyperGeometric2F1[1/2, -1/6, 5/6, -2.33/z1^3] - (Sqrt[z + 1]/z1)*
     HyperGeometric2F1[1/2, -1/6, 5/6, -2.33/(z + 1)^3]}*
  UnitStep[z1 - z]
Evaluate[dFS2[0.4*10^6]]
Evaluate[dFS2[0]]
LogLogPlot[{dFS1[z], dFS2[z]}, {z, 10^9, 
  0}, {ScalingFunctions -> "Reverse", PlotRange -> Full}]

Here are the results of the first two Evaluates:

0.000493315 HyperGeometric2F1(1/2,1/6,7/6,-2.33*10^-27) (* for dFS1[10^9] *)
0.0246658 HyperGeometric2F1(1/2,1/6,7/6,-3.64063*10^-17) (* for dFS1[0.4*10^6] *)

The reason I want to get the numerical values is that the LogLogPlot does not show any data, it just shows an empty plot (and starts at z = 10^6?). I would also like any advice on how to get the Plot to show my function.

I tried just plain dFS[z1] first, then tried Simplify[dFS[z1]], ExpandAll[dFS[z1]], Evaluate[dFS[z1]], and last Evaluate[dFS[0.4*10^6]]. I also tried to wrap the two function definitions with Simplify[,z>=0], thinking that maybe Mathematica thought z is complex.

They all returned the same expression, already shown above.

POSTED BY: Kari Karhi
Posted 11 months ago

Use Hypergeometric2F1 rather than HyperGeometric2F1.

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract