# Tag Info

24

Fixed (see below) Here's an approach: r1 = Exp[-x^3 - y] - 1 == z; r2 = y == z; We create ImplicitRegions: reg1 = ImplicitRegion[r1, {x, y, z}]; reg2 = ImplicitRegion[r2, {x, y, z}]; The intersection of these regions is the line you seek: reg = RegionIntersection[reg1, reg2]; And here is the length (note the inclusion of the range of values in ...

21

This is indeed a serious and problematic issue. We know many similar problems with symbolic integration which provides Integrate. There were some improvments in newer versions of the system but also some issues become worse, see e.g. Mathematica 9 can't integrate this function but earlier versions could. ). One can find more problems looking for tags ...

17

Since another answer provides misleading results I'm motivated to explain what's wrong there and suggest a correct solution. One can guess that the error there has been produced by DiscretizeRegion or by an improper parametrization of the curve with RegionIntersection (more likely the former reason). Let's start from the begining defining the following ...

16

After a lengthy study (I'm using version 8) I conclude that there is a bug in Mathematica in the Integrate function when applied to a Sqrt integrand. Ok. let's go (some patience is required because of the long text) Let us define the functions corresponding to your integrals. Remark: because of the relation $1 + cos(2x) = 2 cos^2(x)$ the two forms of ...

16

I'd advocate taking differences between successive peaks and likewise troughs. These can be found by keeping track of when the derivative is zero. pts = Reap[s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1, WhenEvent[y'[x] == 0, Sow[x]]}, {y, y'}, {x, 0, 30}]][[2, 1]] (* Out[290]= {0.448211158984, 4.6399193764, 7.44068279785, 10.953122261, \ ...

16

Maximize[{y, x^2 + y^2 == (2 x^2 + 2 y^2 - x)^2}, {x, y}] {(3 Sqrt[3])/8, {x -> 3/8, y -> (3 Sqrt[3])/8}}

13

This is not an answer (yet). Rather it explores the question in more depth. n = 8; parameters = ConstantArray[{0, 1}, n]; variables = Symbol /@ CharacterRange["a", FromCharacterCode[ToCharacterCode["a"] + n - 1]]; The following takes a long time to evaluate, but the results it produces reveal give us a better view of the problem with Probability. ...

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 + ...

13

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 ...

13

It's not a bug if you consider this behavior as a logical continuation of the following permissible syntax: D[a + b x^3, x, x, x] (* ==> 6 b *) D[a + b x^3, x, x] (* ==> 6 b x *) D[a + b x^3, x] (* ==> 3 b x^2 *) D[a + b x^3] (* ==> a + b x^3 *) The point is that a Sequence of variables is allowed following the first argument of D. And ...

12

In this second answer I give the cause for the mismatch in the integrals, show how to remove it, and make a suggestion to improve the function Integrate[]. Simplified restatement of the problem In order to focus on the core of the problem we consider the simpler integral $\int_0^1 \sqrt{\cos (2 π k r)+1} \, dr$. It has the square root and the cosine ...

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 ...

11

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] *)

11

The answer is no because of fundamental mathematical limitations which origin in the set theory regarding countability (see e.g. Cantor's theorem) - functions over a given set are more numerous than its (power) cardinality. Neither Mathematica nor any other system can integrate every function in even much more restricted class, namely Riemann integrable ...

11

One can simply use: Limit[((1 + a x)^(1/4) - (1 + b x)^(1/4))/x, x -> 0] to get the result. However Limit does know about the l'Hopital rule. Nonetheless there are different ways to go, e.g. let's use Series to write down the first few terms of the Taylor series of ((1 + a x)^(1/4) - (1 + b x)^(1/4))/x: Series[((1 + a x)^(1/4) - (1 + b x)^(1/4))/x, ...

11

I suspect you are correct in your assessment. Since there are approximate numbers in the input, Maximize punts to NMaximize, which uses penalty methods to enforce some constraints (not sure why it needs them here for linear constraints; I need to check into that). You can get better behavior by forcing real values. NMaximize[{Re[(h*10)/(300*(100 - (l^.5 + ...

10

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 + ...

10

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 ...

10

I don't think the limit is $1$. $$\begin{split} P:=&\frac{1}{n^n}\prod _{k=1}^n \frac{n\sqrt{n}+(n+1)\sqrt{k}}{\sqrt{n}+\sqrt{k}}\\ =&\exp\left( \sum_{k=1}^{n} \log\frac{\left(\frac{1}{n}+1\right) \sqrt{\frac{k}{n}}+1}{\sqrt{\frac{k}{n}}+1} \right) \end{split}$$ So when $n\to\infty$, by expanding the $\log(\cdots)$ terms againt $1/n$ around $0$, we ...

10

From NSum: You should realize that with sufficiently pathological summands, the algorithms used by NSum can give wrong answers. In most cases, you can test the answer by looking at its sensitivity to changes in the setting of options for NSum. For instance: NSum[((-1)^n)/(n - (-1)^n), {n, 1, Infinity}, NSumTerms -> 100000] (* 0.693149 - ...

10

Like the example in the documentation Limit can return different values for this limit as follows: Limit[Tanh[β*A], β -> ∞, Assumptions -> #] & /@ {A > 0, A == 0, A < 0} {1, 0, -1} When given a ∈ Reals the documentation example returns unevaluated: Limit[x^a, x -> Infinity, Assumptions -> (a ∈ Reals)] Limit[x^a, x -> ∞, ...

10

You could use Lagrange multipliers to maximize $f(x,y)=y$ subject to the constraint that $$g(x,y) = x^2 + y^2 - (2 x^2 + 2 y^2 - x)^2 = 0.$$ f[x_, y_] = y; g[x_, y_] = x^2 + y^2 - (2 x^2 + 2 y^2 - x)^2; eqs = {D[f[x, y], x] == lambda*D[g[x, y], x], D[f[x, y], y] == lambda*D[g[x, y], y], g[x, y] == 0}; Solve[eqs, {x, y, lambda}] // InputForm (* Out: { ...

10

Here is the derivation promised earlier. I have chosen to create a new answer in order not to mix things up and because it shows some handling which I like to call "man-machine" interaction with Mathematica. And, sorry for the "Greeks", but I find it very cumbersome to reedit them :-( $Version "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" ... 10 The limit is definitely computed correctly. Keep in mind that Limit assumes the variable (n, in this case) is continuous. Thus, this is a specific example of the general fact that$f(x)\sin(g(x))$oscillates back and forth over the whole real line, whenever$f(x)$and$g(x)$both increase to$\infty$with$x$. A plot verifies this is correct. ... 10 Thanks to Artes for helping me sort out bugs in this answer. Solve[E^(-x^3 - y) - 1 - y == 0, y] {{y -> -1 + ProductLog[E^(1 - x^3)]}} To account for that fact that$-4 < y = z < 4$we need to find the range of allowed$x$values. FindRoot[-1 + ProductLog[E^(1 - x^3)] == 4, {x, 1}] {x -> -1.77681} FindRoot[-1 + ProductLog[E^(1 - ... 10 Using a symbolic functionality like Maximize with an expression involving approximate numbers is not in general a good idea, even though Maximize calls automatically NMaximize in such cases. However if we rewrite the expression to an exact form, then Maximize will run very long time returning no symbolic results. The problem one encounters here is most ... 10 Solve also works Solve[y == 30 x^2 (1 - x)^2 && 0 < x < 1, x, Reals] {{x -> ConditionalExpression[Root[-y + 30 #1^2 - 60 #1^3 + 30 #1^4 &, 2], 0 < y < 15/8]}, {x -> ConditionalExpression[Root[-y + 30 #1^2 - 60 #1^3 + 30 #1^4 &, 3], 0 < y < 15/8]}} Use ToRadicals to get it in a nice looking form. 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[μ]}] (* ... 9 Artes gives a good overview of the problems inherent in symbolic integration. Changing the form of the integral can yield different results, but then the problem is determining the correct one. Using ExpToTrig on the integrand yields a different result: ans1 = Integrate[Exp[-I θ]/(1 + b Cos[θ]), {θ, 0, 2 π}, Assumptions -> b < 1 && b > ... 9 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 ...

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