Skip to main content
deleted 64 characters in body
Source Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]μ) x^(-1 + 4 n \[Nu]ν), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]]μ] Gamma[4 n \[Nu]]ν] Hypergeometric1F1Regularized[ 4 n \[Nu]ν, 4 n (\[Mu]μ + \[Nu]ν), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu]μ = 10^-3; \[Nu]ν = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]μ) x^(-1 + 4 n \[Nu]ν), {x, 0, 1}] Out[28]= -1.786676093655969*10^352 In[29]:= Gamma[4 n \[Mu]]μ] Gamma[ 4 n \[Nu]]ν] Hypergeometric1F1Regularized[4 n \[Nu]ν, 4 n (\[Mu]μ + \[Nu]ν), 4 n s] Out[29]= 5.20048*10^228 

The results differ. While I agree both look like big numbers, one is 124 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]] Gamma[4 n \[Nu]] Hypergeometric1F1Regularized[ 4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu] = 10^-3; \[Nu] = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] Out[28]= -1.786676093655969*10^352 In[29]:= Gamma[4 n \[Mu]] Gamma[ 4 n \[Nu]] Hypergeometric1F1Regularized[4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s] Out[29]= 5.20048*10^228 

The results differ. While I agree both look like big numbers, one is 124 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n μ) x^(-1 + 4 n ν), {x, 0, 1}] 

It returns Gamma[4 n μ] Gamma[4 n ν] Hypergeometric1F1Regularized[ 4 n ν, 4 n (μ + ν), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; μ = 10^-3; ν = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n μ) x^(-1 + 4 n ν), {x, 0, 1}] Out[28]= -1.786676093655969*10^352 In[29]:= Gamma[4 n μ] Gamma[ 4 n ν] Hypergeometric1F1Regularized[4 n ν, 4 n (μ + ν), 4 n s] Out[29]= 5.20048*10^228 

The results differ. While I agree both look like big numbers, one is 124 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

deleted 14 characters in body
Source Link
Remi.b
  • 1.2k
  • 1
  • 7
  • 19

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]] Gamma[4 n \[Nu]] Hypergeometric1F1Regularized[ 4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu] = 10^-3; \[Nu] = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] Out[28]= 4-1.647134434601055*10^3477786676093655969*10^352 In[29]:= Gamma[4 n \[Mu]] Gamma[ 4 n \[Nu]] Hypergeometric1F1Regularized[4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s] Out[29]= 5.21398484798*10^327820048*10^228 

The results differ. While I agree both look like big numbers, one is almost 200124 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]] Gamma[4 n \[Nu]] Hypergeometric1F1Regularized[ 4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu] = 10^-3; \[Nu] = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] Out[28]= 4.647134434601055*10^3477 In[29]:= Gamma[4 n \[Mu]] Gamma[ 4 n \[Nu]] Hypergeometric1F1Regularized[4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s] Out[29]= 5.21398484798*10^3278 

The results differ. While I agree both look like big numbers, one is almost 200 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]] Gamma[4 n \[Nu]] Hypergeometric1F1Regularized[ 4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu] = 10^-3; \[Nu] = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] Out[28]= -1.786676093655969*10^352 In[29]:= Gamma[4 n \[Mu]] Gamma[ 4 n \[Nu]] Hypergeometric1F1Regularized[4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s] Out[29]= 5.20048*10^228 

The results differ. While I agree both look like big numbers, one is 124 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?

Source Link
Remi.b
  • 1.2k
  • 1
  • 7
  • 19

Is this caused by round-off errors?

Let's consider this integration

Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] 

It returns Gamma[4 n \[Mu]] Gamma[4 n \[Nu]] Hypergeometric1F1Regularized[ 4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s]

Now let's replace those letter by numbers

n = 20000; s = 0.01; \[Mu] = 10^-3; \[Nu] = 10^-3; 

And let's run both the result of the integral and the integral itself

In[28]:= Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n \[Mu]) x^(-1 + 4 n \[Nu]), {x, 0, 1}] Out[28]= 4.647134434601055*10^3477 In[29]:= Gamma[4 n \[Mu]] Gamma[ 4 n \[Nu]] Hypergeometric1F1Regularized[4 n \[Nu], 4 n (\[Mu] + \[Nu]), 4 n s] Out[29]= 5.21398484798*10^3278 

The results differ. While I agree both look like big numbers, one is almost 200 orders of magnitude higher than the other one.

Given that all calculations were analytic (no numerical approximations) we should find the same results. What causes these different results? Is this difference caused by round-off errors? How can I solve such issues?