How to calculate $I=\iint\limits_D(x^2 - y^2)d\sigma, D:0\le y\le \sin x, 0 \le x \le \pi$ For this double integral $$I=\iint\limits_D(x^2 - y^2)d\sigma, D:0\le y\le \sin x, 0 \le x \le \pi$$
I am calculating it like this: 
$$I = \int_0^\pi dx \int_0^{\sin x} (x^2 - y^2) dy = \int_0^\pi (x^2y - \frac13y^3)\bigg|_0^{\sin x} dx=\int_0^\pi (x^2\sin x-\frac13\sin^3 x)dx$$ 
$$=-\int_0^\pi x^2d\cos x -\frac13 \int_0^\pi (\sin x -\sin x\cos ^2x) dx$$
This becomes rather complex, am I doing it in right approach or have I got anywhere wrong? Is there a simpler way to solve this?
 A: Use $$\sin^3 x={1\over4}(3\sin x-\sin 3x)$$
So $$\int_0^\pi\sin^3 x\,dx=\left(-{3\over4}\cos x+{1\over12}\cos3x\right)\Big{|}_{0}^\pi={3\over2}-{1\over6}={4\over3}$$
And using integration by parts we have
$$
\int_0^\pi x^2\sin x\,dx=-x^2\cos x\Big{|}_0^\pi+2\int_0^\pi x\cos x\,dx=\pi^2+2x\sin x\Big{|}_0^\pi-2\int_0^\pi\sin x\,dx\\
=\pi^2-4 
$$
A: You have:
$$=-\int_0^\pi x^2d\cos x -\frac13 \int_0^\pi (\sin x -\sin x\cos ^2x) dx$$
The first integral is (integrating by parts):
$$-\int_0^\pi x^2d\cos x=-x^2\cos x\big|_0^\pi+\int\limits_{0}^{\pi}{2x\cos xdx}=\pi^2+2x\sin x\big|_0^\pi-2\int\limits_{0}^{\pi}\sin xdx=\pi^2-4$$
The other two integrals are also clear:
$$-\frac13 \int_0^\pi \sin x dx=\frac{1}{3}\cos x\big|_0^\pi=-\frac{2}{3}$$
$$\frac{1}{3}\int\limits_{0}^{\pi}{\sin x\cos ^2xdx}=-\frac{1}{3}\int\limits_{0}^{\pi}{\cos^2xd\cos x}=-\frac{1}{3}\frac{\cos^3x}{3}\big|_0^\pi=\frac{2}{9}$$
A: Your approach is correct, and
$$
\int_0^{\pi} (x^2 \sin x -\frac{1}{3}\sin^3 x)dx
$$
can be solved termwise by integral by parts and substitution. Get
$$
\int_0^{\pi} x^2\sin xdx=\pi^2-4
$$
and
$$
\int_0^{\pi}\sin^3 x dx = \frac{4}{3}
$$
