Is mathematica wrong about this integral?

  • Context: Graduate 
  • Thread starter Thread starter geoduck
  • Start date Start date
  • Tags Tags
    Integral Mathematica
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 3K views
geoduck
Messages
257
Reaction score
2
When I type in this integral into Mathematica:

$$\int_1^\infty \int_1^\infty \frac{dxdy}{(x+y^2)^2}$$
using a large number like 1020 instead of ∞, Mathematica gives me 0.785398. No matter what large number I use, Mathematica always gives me around that value.

However, doing the integral by hand, I get it diverges. I make the substitution u=x+y^2 and v=y. The Jacobian of the transformation is 1, so I get:

$$\int_1^\infty \int_1^\infty \frac{dxdy}{(x+y^2)^2}=

\int_1^\infty dv \int_2^\infty \frac{du}{u^2}=(\infty-1)(\frac{1}{2})
$$

which is divergent.

Also, I noticed weird behavior by Mathematica too. If I change the exponent ##(x+y^2)^2## to a non-integer like ##(x+y^2)^{2.1}##, then the integral jumps from being zero or very large.

Does anyone know what's going on here?
 
Physics news on Phys.org
Your u-v limits of integration are off. The image of the transformation that you used is not a rectangle. Think about the images of the boundary curves x=1 and y=1 of the original region to deduce the boundary curves for the transformed region.

Alternatively, you might find it easier to just evaluate the original iterated integral using the "elementary" techniques of integration from single-variable calculus; i.e. how would you have evaluated $$\int_1^{\infty}\frac{1}{(x+a)^2}dx$$ last semester?
 
  • Like
Likes   Reactions: 1 person
The Jacobian is du/dx dv/dy-du/dy dv/dx, and since dv/dx is zero I figured it doesn't matter what du/dy is, even if du/dy approaches infinity.
 
gopher_p said:
Your u-v limits of integration are off. The image of the transformation that you used is not a rectangle. Think about the images of the boundary curves x=1 and y=1 of the original region to deduce the boundary curves for the transformed region.

Alternatively, you might find it easier to just evaluate the original iterated integral using the "elementary" techniques of integration from single-variable calculus; i.e. how would you have evaluated $$\int_1^{\infty}\frac{1}{(x+a)^2}dx$$ last semester?

Thanks, I got the area wrong. That weird area makes the integral tricky, so your suggestion is better.
 
The integral can be done by just calculating the two succesive integrals. Start with
[tex]f(y)=\int_1^{\infty} \mathrm{d} x \frac{1}{(x+y^2)^2} = \left . -\frac{1}{(x+y^2)} \right|_{x=1}^{\infty}=\frac{1}{1+y^2}.[/tex]
The [itex]y[/itex] integral gives
[tex]\int_1^{\infty} \mathrm{d} y \frac{1}{1+y^2}=\left . \arctan y \right|_{y=1}^{\infty}=\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}.[/tex]
Mathematica 9 gives the right answer analytically.
 
  • Like
Likes   Reactions: 1 person
vanhees71 said:
The integral can be done by just calculating the two succesive integrals. Start with
[tex]f(y)=\int_1^{\infty} \mathrm{d} x \frac{1}{(x+y^2)^2} = \left . -\frac{1}{(x+y^2)} \right|_{x=1}^{\infty}=\frac{1}{1+y^2}.[/tex]
The [itex]y[/itex] integral gives
[tex]\int_1^{\infty} \mathrm{d} y \frac{1}{1+y^2}=\left . \arctan y \right|_{y=1}^{\infty}=\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}.[/tex]
Mathematica 9 gives the right answer analytically.

What if you have the integral

$$\int_{-\infty}^\infty \int_{-\infty}^\infty \frac{dxdy}{1+(x+y^2)^2}$$

I'm not interested in the answer but more in how to tell if it converges or not. The denominator never goes to zero, and far away the integrand is zero. In single-variable calculus, I think it is sufficient that the integrand falls off faster than 1/x at infinity, and doesn't blow up at any finite value of x.

Is there a similar statement with multivariables? For some reason I thought the substitution u=(x+y2) and v=y would help me see it better, but the boundaries are kind of weird when you do this. In fact I don't really understand the new boundaries when x and y can range freely from -∞ to ∞ .

For example take the boundary y=∞, x=anything:

Then the corresponding boundary is: v=∞, u=anything+(∞)^2

I don't know how to handle anything+(∞)^2...is it equal to anything? If it is equal to anything, then the line y=∞, x=anything maps to the line v=∞, u=anything.

Also the boundary x=∞, y=anything is weird too:

then you have: u=x+y2=x+v^2, or the parabola u-v^2=∞. What type of boundary is this?

Or more simply, is the boundary of u and v also a box from -∞ to ∞?