# Tag Info

13

This is standard cancellation error (please Google for it). See below for more details. Take a look at the exact result first: result = Integrate[x^50*Sin[x], {x, 0, 1}] (* ==> 16432804687774250383441481995831940788236063969597816674967907249 Cos[1] + 50 (-608281864034267560872252163321295376887552831379210240000000000 + ...

11

Plot3D[{5 (x^2 + y^2), 6 - 7 x^2 - y^2}, {x, -1, 1}, {y, -1, 1}, RegionFunction -> Function[{x, y}, 5 (x^2 + y^2) < 6 - 7 x^2 - y^2]] Integrate[(6 - 7 x^2 - y^2 - 5 (x^2 + y^2)) UnitStep[(6 - 7 x^2 - y^2 - 5 (x^2 + y^2))], {x, -10, 10}, {y, -10, 10}] (3 π)/Sqrt[2] Edit Since working with the UnitStep function (rather ...

9

Try not to supply machine numbers to integrals over infinite domains. They can cause errors that build up to the extent you have seen. Either compute the symbolic integral with exact numbers (and then convert it to a numeric value) L = 2; sn = 1; a = 10^(sn/10); b = 10^(sn/10); c = a/100; result = 2*Sqrt[1/Pi]*Integrate[(1/(E^z*Sqrt[z]))*(1 - (a/(a + ...

9

Just to contribute to the debate, here is some more evidence that supports the proposition that numerical error is the issue. If we run the integral through various permutations of the ways of making exact and approximate calculations, the pattern I think suggests that numerical error is the reason the OP's integral is so far off. (* the integrand and ...

9

RegionPlot3D[ 5 (x^2 + y^2) < z < 6 - 7 x^2 - y^2, {x, -1, 1}, {y, -1, 1}, {z, -0, 6}, PlotStyle -> Orange, Mesh -> None, PlotPoints -> 50] Integrate[ Boole[5 (x^2 + y^2) < z < 6 - 7 x^2 - y^2], {x, -1, 1}, {y, -1, 1}, {z, 0, 6}] (* (3 π)/Sqrt[2] *)

8

I very much suspect that the limit is not $1/4$, but rather $$\exp \left( \max_{y>0} \int_{t=0}^1 \left( -yt + \log(1-e^{-yt}) \right) dt \right) \approx 0.185155.$$ If I were writing this up on math.SE, I'd start right in on a proof of this, but on this site I think that it would be more welcome to show some of the Mathematica techniques I used to come ...

7

FindSequenceFunction and FindGeneratingFunction can do this. They won't immediately work every time. This is what I did: First notice that if we find $f(x)$ for $k=1$ then the solution for arbitrary $k$ is just $k \,f(kx)$. Then, write the coefficients into a list ... coeffs = {0, 1/6, 0, -1/120, 0, 1/5040, 0, -1/362880, 0, 1/39916800} ... and try ...

6

You could integrate over the region, using Boole: Integrate[ Boole[0 < p < 1 && 0 < e1 < 1/2 && 0 < e2 < 1/2 && (p < e1 || (p) (e1)/((p) (e1) + (1 - p) (1 - e2)) < e1/e2)], {p, 0, 1}, {e1, 0, 1/2}, {e2, 0, 1/2}] (* 1/16 (5 - 6 Log[2] + 2 Log[4]) *)

5

Your code is ok. What is missing is the phase factor in the definition of momentum-space wavefunction $\varphi_2(n,k)$ that you use. The proper definition is: $\varphi_2(n,k) = (-i)^n \sqrt{b} N_n H_n(b k) \exp(-b^2 k^2 / 2) ,$ as can be verified for example in these lecture notes. Also, I've found that a slight change in your testing function is helpful ...

5

The projection of your solid down to the $xy$-plane is described by $$5(x^2+y^2) \leq 6-7x^2-y^2,$$ which simplifies to $$12x^2+6y^2 \leq 6.$$ This is an equation of a solid ellipse $E$ compressed by the factor $\sqrt{2}$ in the $x$-direction. The volume can be expressed as $$\iint\limits_E (6-(12x^2+6y^2)) \, dA.$$ A truly efficient way to evaluate this ...

4

Even computing this numerically for large n is a bit of work.. integrand[x_?NumericQ, n_?IntegerQ] := Product[x^k (1 - x^k), {k, 1, n}] ListPlot[Table[{n, NIntegrate[integrand[x, n], {x, 0, 1}, WorkingPrecision -> 100, MaxRecursion -> 20]^(1/n) }, {n, {1, 2, 3, 8, 10, 20, 50, 100, 1000}}], Joined -> True] Looks to be approaching ...

4

I do not think this is related to floating point errors. I think the closed form solution arrived to in Integrate is not correct. May be wrong branch is taken. To see this more easily, Here is a simpler one (part of the original integral) that gives a symbolic solution, but wrong numerical value for the values when substituted into the expression Clear[a, ...

4

NIntegrate[x^50*Sin[x], {x, 0, 1}] works fine and results to 0.0162898. Also putting N[Integrate[x^50*Sin[x], {x, 0, 1}], 20] you get a correct result. If you try to calculate the anti-derivative using : anti[x_] := Module[{t}, Integrate[t^50*Sin[t], t] /. t -> x] then you will see that you get the exact integral form. Now ...

3

Just a note in the integration that takes a bit of CPU time. As the integrand is a polynomial its integral 0->1 can be obtained replacing $x^k$ by $1/(k+1)$ throughout. This will compute the integral by first computing the coefficient of the polynomial : F[n_] := Module[{coefList}, coefList = CoefficientList[Product[x^k (1 - x^k), {k, 1, n}], x]; ...

2

I guess this is too old school. Solve[ 5 (x^2 + y^2) == 6 - 7 x^2 - y^2, x] {{x -> -(Sqrt[1 - y^2]/Sqrt[2])}, {x -> Sqrt[1 - y^2]/Sqrt[2]}} Integrate[(6 - 7 x^2 - y^2) - 5 (x^2 + y^2) , {y, -1, 1}, {x, -(Sqrt[1 - y^2]/Sqrt[2]), Sqrt[1 - y^2]/Sqrt[2]}] (3 π)/Sqrt[2] Thsn again if you need to show your work on your calculus ...

2

Using @ubpdqn's answer for getting a closed expression for the dependence of the integral on the dimension n. vol[n_] := vol[n] = FullSimplify[Nest[Integrate[# /. r -> Sqrt[r^2 - x^2], {x, -r, r}] &, 2 r, n], Element[r, Reals] && r > 0] ...

2

There are two branch points: $$z=-\frac{1}{2}\pm i \frac{\sqrt{2}}{2}$$ we can set the branch cuts connecting these two points and set up a contour like this (sorry for the poor drawing): The two small circles in green near the two singularities have no contribution, since the function goes as $\frac{1}{\sqrt{z}}$ near the poles. And the four blue ...

2

I don't know how to show the limit is 1/4. Ithink it can be bounded above by 1/4 as follows. Note that there is a gap in the argument below. (1) Replace factors 1-x^k by 1-x^(n/2). nn = Integrate[ Product[x^k, {k, 1, n}]*Product[(1 - x^(n/2)), {k, 1, n}], {x, 0, 1}, Assumptions -> n > 1000] (* Out[147]= (2 Gamma[n] Gamma[1 + 2/n + n])/Gamma[2 (1 + ...

2

Something like this? n = 5; xi = Array[x, n] f[x_, t_] := -Log[t] - Log[1 - x.x - t^2] {x[1], x[2], x[3], x[4], x[5]} D[f[x, t], t] D[f[xi, t], x[3]] D[f[xi, t], x[1], t] $\frac{2 t}{-t^2-x.x+1}-\frac{1}{t}$ $\frac{2 x(3)}{-t^2-x(1)^2-x(2)^2-x(3)^2-x(4)^2-x(5)^2+1}$ \$\frac{4 t ...

1

This isn't really an answer but it is too long for a comment. I didn't look at your first integral, but the second is fairly easy to investigate because it only depends on one parameter. I used two Mathematica tools that often help in kind of situation you find yourself in. Manipulate[ Plot[Tanh[π Sqrt[λ]] Log[1 - Exp[-2 π q Sqrt[λ + 1/4]]], {λ, 0, ...

1

Your results are complex. If this is OK with you, you might apply this: lst = Table[{x,NIntegrate[(0.657721 (1 - (1 - u2) x)^2.547 (1 + (1 - u2) x - u2 x)^2.547 (1 - 0.176 ((1 - u2) x)^1.2) (1 - 0.176 (-(1 - u2) x + u2 x)^1.2))/(((1 - u2) x)^0.056 (-(1 - u2) x + u2 x)^0.056`), {u2, 0, 1}]}, {x, 0.1, 1, 0.05}]; The result ...

Only top voted, non community-wiki answers of a minimum length are eligible