# Tag Info

12

As you notniced, the result is not correct. This is not uncommon with definite integrals, as the system needs to detect any special behaviour inbetween the integration bounds, which is hard. For this reason it's a good idea to verify such integrals numerically. We can get the correct result like this (please evaluate in a fresh kernel without ...

10

$$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big) = \frac{\mu ^m (2 \lambda +\mu )}{2^{m+1} (\lambda +\mu )^{m+1}}$$ Observing: d1 = TransformedDistribution[ a + s, {a \[Distributed] ExponentialDistribution[λ], s \[Distributed] ExponentialDistribution[μ]}] (* ...

7

The difference lies in the evaluation of f vs. g. Consider what happens when you supply them with a symbol, e.g. f[x] (* f[x] *) versus g[x] (* Piecewise[{{x, x < 0}, {x^2, x >= 0}}, 0] *) So, Integrate does not see the inside of f[x], and, more importantly, it cannot do any symbolic evaluation on it because Condition (/;) prevents it from doing ...

7

Besides trivial observations that one cannot evaluate numerically integrals involving symbolic constants there are more interesting aspects of the problem at hand. First one should realize that a standard numeric approach is not appropriate for this kind of problems, since the integrand involves singular points (zero in the denominator) thus it is not ...

7

First we can see that ${\frac{(6k+1)^{k}}{(2k+5)^{k}}}$ behaves asymptotically as $3^k$, while $(z-2i)^k$ is divergent if $\|z-2i\|>1$, however when $\|z-2i\|<1$ it is convergent. For $\|z-2i\|=1$ this criterion is not conclusive. On the other hand we can carefully extend this argument to the full sequence, so we need only $\|z-2i\| < ... 7 Your integrand(s), when expanded, consist of terms that are constants times zero, one or two factors of sine or cosine. The terms can be integrated symbolically and stored as rules. It will be convenient to find the average value and multiply by 2 Pi at the end. (This will automatically handle constant terms without a special rule.) Thanks to Simon Woods ... 6 One has to look at code internals to find out. Most likely uncleared variable internally got stuck around. But since the result is still mathematically correct, one can't call this a bug. Strange, yes (why this integral and not others?), but still correct result. But using Rubi Int instead of Integrate, there is no constant of integration: I recommend ... 6 f = (Sin[50 Pi (Cos[#] + 1)]/Sin[10 Pi (Cos[#] + 1)])^2 &; Plot[f[s], {s, 0, 1}, ImageSize -> 600, PlotTheme -> "Detailed", Mesh -> {{0}}, MeshFunctions -> {ConditionalExpression[f'[#], f''[#] < 0 && f[#] > 0] &}, MeshStyle -> {PointSize[Large], Red}] table = Table[f[s], {s, 0., 1, 0.0001}]; peaks = ... 6 You have to tell Mathematica explicitly that n is supposed to be an integer: Assuming[n ∈ Integers, Limit[Sin[π Sqrt[4 n^2 + n]], n -> ∞]] (* ==> 1/Sqrt[2] *) 6 ListPointPlot3D[ Table[{Cos[t], Sin[t], 2 + Sin[t] Cos[t]^2} ,{t, 0, π, 0.01}] , Filling -> 0] 6 opts = {MeshFunctions -> (#4 &), MeshShading -> {{Opacity[#2], #1}, {Opacity[#2/2], #1}}, BoxRatios -> {1, 1, 1/2}, BoundaryStyle -> Directive[Thin, Blue]} &; Show[ ParametricPlot3D[{Cos[t], Sin[t], z (2 + Sin[t] Cos[t]^2)}, {t, 0, π/2}, {z, 0, 1}, Evaluate@opts[Green, .4]], ... 5 This is just a small tweak of Belisarius' answer, using MeshFunctions to get the vertical lines and BoundaryStyle to get the "fence". ParametricPlot3D[{Cos[t], Sin[t], z (2 + Sin[t] Cos[t]^2)}, {t, 0, \[Pi]/2}, {z, 0, 1}, MeshFunctions -> {#2 &}, MeshStyle -> {Red}, BoundaryStyle -> Directive[Thick, Blue], BoxRatios -> {1, 1, 1/2}, ... 5 I have not done the labeling but this is a start: axes[n_] := With[{uv = n IdentityMatrix[3]}, Graphics3D[{Arrow[{{0, 0, 0}, #}] & /@ uv, MapThread[ Text[#1, 1.1 #2] &, {Style[#, 20] & /@ {"x", "y", "z"}, uv}]}, Boxed -> False]]; p = ParametricPlot3D[{Cos[t], Sin[t], u (2 + Cos[t]^2 Sin[t])}, {t, 0, Pi/2}, {u, 0, ... 5 Here is a way to use Mathematica to find numerical limits for discrete variables: Needs["NumericalCalculus"] u = IntegerPart; NLimit[Sin[Pi Sqrt[4 u[n]^2 + u@n]], n -> ∞] (* 0.707107 *) 5 It seems to me that the constant 700 is the result of the internal substitution x+5->t, needed for finding the Log. Integrate[ 15 - 30 x + 6 x^2 - 1/(x + 5) /. x -> t - 5, t] (* 315 t - 45 t^2 + 2 t^3 - Log[t] *) Expand[% /. t -> x + 5] (* 700 + 15 x - 15 x^2 + 2 x^3 - Log[5 + x] *) 5 No, it is not doing a Gram-Schmidt procedure. One way to note that this is distinct from Gram-Schmidt is that Gram-Schmidt produces an orthonormal basis, whereas the example outputs in the Documentation Center page for LatticeReduce are neither normalized nor orthogonal. Instead, LatticeReduce returns a basis$B$comprised of linear combinations of integer ... 4 Here is a plot of your function$\frac{\epsilon r}{\epsilon^2 + (\omega-z^2 + r^2)^2}\$ (code for ComplexPlotR2 at end of answer): ComplexPlotR2[ CCompileR2[(1/10)/((1/10 - x^2 + y^2)^2 + 1/100) y], {-10, 10, 0.02}, {0, 10, 0.02}] As you can see, it is nonzero on a pair of lines that extend to infinity, so it is not unexpected that the integral might ...

3

Integrate[ HermiteH[5, x] HermiteH[6, x] HermiteH[5, x] Exp[-x^2], {x, -Infinity, Infinity}, PrincipalValue -> True] (*36864000 Sqrt[\[Pi]]*)

3

There are a number of things that are going wrong here, and I'm not sure where to start: You do not have any continuously valued functions. You have simply defined six symbols, x1[0] through x2[2]. You cannot integrate x1[i] or x2[j] with respect to i or j because these symbols are not functions of i and j -- they are only defined for integer values. Maybe ...

3

This might be along the right lines. hilbertT[f_, x1_, x2_][z_] /; z < x1 || z > x2 := Integrate[f[x]/(z - x), {x, x1, x2}] hilbertT[f_, x1_, x2_][z_] /; x1 < z < x2 := Limit[Assuming[0 < eps < 1/2^10, Integrate[f[x]/(z - x), {x, x1, z - eps}] + Integrate[f[x]/(z - x), {x, z + eps, x2}]], eps -> 0] That example: f[x_] ...

3

Instead of mapping by "hand", use Mathematica /. command to do it for it. Less chance of an error: expr = 2*(-(((1 + (y*u)/(2*Sqrt[x*y]))*(x + (1/2)*Sqrt[x*y]*u))/ (x + y + Sqrt[x*y]*u)^2) + (1 + (y*u)/(4*Sqrt[x*y]))/(x + y + Sqrt[x*y]*u))*(-d + (x + (1/2)*Sqrt[x*y]*u)/(x + y + Sqrt[x*y]*u)); at = {y = 1, d = 1, u = 1}; Limit[{expr, at}, x ...

3

The approach that kguler suggest in your precedent question is completely suitable for the current one: FindSequenceFunction[Table[With[{ d1 = HypoexponentialDistribution[Flatten[Table[{λ, μ}, {i - 1}]]], d2 = HypoexponentialDistribution[{λ, μ}], d3 = ExponentialDistribution[μ], d = ExponentialDistribution[λ]}, ...

2

Update: The problem with NSolve is addressed in Issue with NSolve The problem with obtaining the large peaks is that they occur where the denominator is zero. The function turns out to have a finite limit at those places, so the discontinuity is removable. Since removing it is desired, I would recommend setting the problem up, so that there is no ...

2

You are invoking ForAll with vacuous conditions. Compare: ForAll[{x}, x == x + 1, Element[Abs[x], Reals]] (* output: True *) I think that is really all that's going on here. There is no x in the ForAll for which x==Infinity actually returns true, so it spits out true because the "all" in "for all" is the empty set. It's vacuous. Likewise in the limit, ...

2

The problem is that the definition of b is being substituted (and some of the factorials are being converted to Gamma). You need to keep b from being evaluated. Without knowing how you wish to use the result, here is a possibility: a[n_, x_] := Inactivate[ x^2*D[D[b[n, x], x], x] + (3 x^2 + (1 - 3 n) x) * D[b[n, x], x] + (2 x^2 + (1 - 4 n) x + 2 ...

2

This works much faster: f[r_, z_, from_, to_] := (int = Integrate[r/((l - z)^2 + r^2)^(3/2), z]; Limit[int, z -> to] - Limit[int, z -> from]) sol = f[r, z, 0, L0] The reason is takes much longer when doing definite integration directly is due to assumptions. If you gives assumptions, then it will be fast also. Try ...

2

One can use Expectation on a NormalDistribution, as I've shown before in Mathematica complaints that convergent integral diverges. (Indeed this question is nearly a duplicate of that one.) The expectation of polynomials in a normally distributed variable is a special case in Expectation and are evaluated very quickly. The argument is integrated against ...

2

Response from WRI: Thank you for bringing this issue to our attention. I reproduced the behavior you describe and it appears to be an incorrect result. I have sent a note about this issue to our development team. We are always interested in improving Mathematica and I want to thank you again for taking the time to contact us about ...

2

Just a workaround. In[4]:= Clear["Global*"] In[5]:= f[x_, t_] := Abs[Re[Exp[I*x]/(1 - t*Exp[I*x])]] In[6]:= Timing[ resAn[t_] = Integrate[f[x, EulerGamma], {x, 0, 2*Pi}] /. EulerGamma -> t] Out[6]= {23.104, -((2*(ArcCos[t] + 2*ArcTan[((1 + t)*Tan[ArcCos[t]/2])/(-1 + t)]))/t)} In[7]:= resNum[t_] := NIntegrate[f[x, t], {x, 0, 2*Pi}] ...

1

This is not an answer to your question (hence the community tag) since I do not know why Integrate does not solve this, but to point out that the command Int solves this instantly with no problem. This is using Albert Rich Rubi package: ShowSteps = False; Int[(1 + (1 + 1/(2*Sqrt[x]))/(2*Sqrt[Sqrt[x] + x]))/(2*Sqrt[x + Sqrt[Sqrt[x] + x]]), x]

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