# Multivariable caculus: Am I or is Maple wrong?

Well, the problem goes as follows:

$$\int_{\Omega}(x^2+y^2)dxdy\quad\Omega:=\{(x,y)\mid x^4+y^4\le 1\}$$

My approach:
By symmetry I needed only to find $$\int_{\Omega_1}(x^2+y^2)dxdy\quad\Omega_1:=\{(x,y)\mid x^4+y^4\le 1\wedge x,y\ge 0\}$$ Let $(x,y)=(r\cos\theta, r\sin\theta)$ where $\theta\in[0,\frac{\pi}{2}]$ and $r\in[0,(\cos^4\theta+\sin^4\theta)^{-1/4}]$ (the constraint for $r$ follows naturally from the boundary equation, I think). Thus the transformation Jacobi determinant is $\partial(x,y)/\partial(r,\theta)=r$, and $$\int_{\Omega_1}(x^2+y^2)dxdy=\int_{D_{r\theta}}r^2\cdot rdrd\theta\quad D_{r\theta}:=\{(r,\theta)\mid \theta\in[0,\frac{\pi}{2}]\wedge r\in[0,(\cos^4\theta+\sin^4\theta)^{-1/4}]\}$$ After some simple adjustment I got $$\int_{D_{r\theta}}r^2\cdot rdrd\theta=\frac14\int_{0}^{\frac{\pi}{2}}\frac{d\theta}{\sin^4\theta+\cos^4\theta}=\frac14\frac{\pi}{\sqrt 2}$$ which was also confirmed by Maple. Therefore $$\int_{\Omega}(x^2+y^2)dxdy=\frac{\pi}{\sqrt 2}$$
However, when I switch to another approach: directly applying Fubini's Theorem, the result seems to be different.

By Fubini, we immediately have $$\int_{\Omega_1}(x^2+y^2)dxdy=\int_{0}^{1}dx\int_{0}^{(1-x^4)^{1/4}}(x^2+y^2)dy=\int_{0}^{1}(x^2\cdot(1-x^4)^\frac14+\frac13(1-x^4)^\frac34)dx$$ This integral was undoable by hand. So I turned to Maple for a numerical result just to see if my previous result is right, and Maple gave me this $$\int_{0}^{1}(x^2\cdot(1-x^4)^\frac14+\frac13(1-x^4)^\frac34)dx\approx0.9443468503$$ But $\frac14\frac{\pi}{\sqrt 2}\approx 0.55536$. It was quite disappointing. I went through my previous approach one more time and still couldn't find out where I was wrong. I think maybe I'm right, but I have always trusted Maple...

Smart people of MSE, could you help me out? I'd be grateful to any kind of clarification.

EDIT I was using the "evalf" function, (BTW I'm a newbie at Maple and literally don't know how to do multivariable calculus on that)

• Not sure what you did, but I am getting the same answer both ways. – Braindead Jun 18 '15 at 15:08
• I think the problem might lie in the transformation, but I can't prove that it is NOT a diffeomorphism between adjusted $\Omega_{1}$ and $D_{r\theta}$ (both shorn of a Lesbegue measure zero set and left to be two open sets so that transformation is a diffeomorphism) – Vim Jun 18 '15 at 15:08
• 4*integrate(x^2+y^2,x=0..surd(1-y^4,4),y=0..1) on maple gives me $\dfrac{\pi}{\sqrt{2}}$. – Braindead Jun 18 '15 at 15:09
• @Braindead So is your answer pi/sqrt 2 too? – Vim Jun 18 '15 at 15:10
• Yup. Both polar and Fubini gives me the same $\pi/\sqrt{2}$. – Braindead Jun 18 '15 at 15:10

## 2 Answers

I get the same answer both ways:

• Ok, my fellow using Mathematica and also got the same result just now.. But my Maple still doesn't work the right way (see the newly uploaded image in my post). Could you find if I wasn't using the "evalf" right? or something wrong with my typesetting? – Vim Jun 18 '15 at 15:19
• Holy.. I just realized that I should insert $\cdot$ between $x^2$ and $(1-x^4)^{1/4}$ in my first integrand term.. – Vim Jun 18 '15 at 15:21

There's something wrong with the numerical value of the second. Let us do the integral exactly. First, I agree with your form $$\int_0^1 \left( x^2 (1-x^4)^{1/4} + \frac{1}{3}(1-x^4)^{3/4} \right) \, dx.$$ Let's change variables to $x=u^{1/4}$ to start with. Then we have $dx = \frac{1}{4} u^{-3/4} \, du$, so the integral becomes $$\frac{1}{4}\int_0^1 \left( u^{-1/4} (1-u)^{1/4} + \frac{1}{3}u^{-3/4}(1-u)^{3/4} \right) \, du.$$ We now have two integrals of the form $\int_0^1 u^{-s}(1-u)^s \, du = \int_0^1 (u^{-1}-1)^s \, du$, so let's try and evaluate a general one, and hence only do one calculation. Set $u= \frac{1}{1+v}$, so $du = -\frac{dv}{(1+v)^2},$ $$\int_0^1 (u^{-1}-1)^s \, du = \int_0^{\infty} \frac{v^{s}}{(1+v)^2} \, dv.$$ Integrating this by parts gives $$\int_0^{\infty} \frac{v^{s}}{(1+v)^2} \, dv = 0 + s\int_0^{\infty} \frac{v^{s-1}}{1+v} \, dv,$$ providing $0<s<1$. I've done this integral before: is $$\pi s\csc{\pi s},$$ so we find that the overall answer is $$\frac{\pi}{4} \left( \frac{1}{4\sin{(\pi/4)}}+\frac{1}{3}\frac{3}{4\sin{(3\pi/4)}} \right) = \frac{\pi}{4\sqrt{2}}.$$