Aproximating the volume of a sphere by dividing it into infinitesimal cubes I have spent hours trying to solve it by substituting into two right triangles, asked multiple teachers but none can answer... This is not a homework, its just out of pure curiosity. I did the same with a circle (divide it into infinitesimal squares and solved the integral and obtained the correct area of the area of a circle and I want to extend this in 3D to get the volume of a sphere. 
Basically the integral to solve is :
$$\iint \sqrt{r^2 - x^2 - z^2} dxdz$$
where $r$ is radius and $x$ and $z$ are in Cartesian coordinates 
I'm not asking for a complete resolution, just the thechnique, I would like to continue working on it myself, I just want a helping hand.
I have also extended this integral to $N$-dimensions, but that's a project for the future.
On second thought, a full resolution would be nice... Thanks!
 A: For a sphere's surface area:
Divide the sphere into square patches, much as you would with infinitesimals:
$$dA = \sin \theta R^2\ d\theta\ d\phi$$
$$\Delta A_{ij} 
= \sin \left(\frac{i\pi}{N}\right) \frac{\pi}{N}\frac{2\pi}{M}R^2$$
Now sum using the following identity:
$$\sum_{j = 1}^{N} \sin{(j \theta)} = \frac{\cos{\left (\frac{\theta}{2} \right)} - \cos{\left ((N + \frac{1}{2})\theta \right )}}{2 \sin{ \left ( \frac{\theta}{2} \right )}}R^2$$
So that:
$$S_{N,M} = \sum_{i=0,j=0}^{N,M}\sin \left(\frac{i\pi}{N}\right) \frac{\pi}{N}\frac{2\pi}{M} = \frac{2\pi^2}{N}
\frac{\cos{\left (\frac{\pi}{2N} \right)} - \cos{\left ((1 + \frac{1}{2N})\pi \right )}}{2 \sin{ \left ( \frac{\pi}{2N} \right )}}$$
Thus, using $\lim_{x\to 0} \sin x/ x = 1$ we have:
$$S=\lim_{N\to\infty} S_N = 4\pi R^2$$
Addendum:
Although this happens to give the correct result, as others have noted, the correct definition of the surface area is given by the Lebesgue Measure of the surface, which involving finding the infimum of all possible patch divisions.
For a sphere's volume with cubes:
To make life easier, start with a hemisphere of radius $R$, and divide into $N$ disks. The area of each disk can be calculated by your $2D$ method, and then summed up.
We have for each disk at height $h=i\cdot R/N$, a radius of $\sqrt{R^2−h^2}$, so that the volume of each disk is:
$$V_i = \pi (R^2-h^2)R/N$$
Now sum these up:
$$\frac{V_N}{2}\equiv\text{Hemisphere Vol.}=\sum_{i=1}^N  \frac{\pi R^3}{N} \left(1-\frac{i^2} {N^2}\right)$$
using the formula for sums of powers,
$$\sum_{k=1}^nk^2 = \frac{2n^3 + 3n^2 + n}{6}$$
We get:
$$V_N=2N\cdot \frac{\pi R^3}{N} +
2N\cdot\frac{\pi R^3}{N^3}\left(\frac{2N^3 + 3N^2 + N}{6}\right)$$
$$= \pi R^3 \cdot\left(\frac{4 N-1/N-3}{3 N}\right)$$
So that:
$$V\equiv \lim_{n\to\infty} V_N = \frac{4\pi R^3}{3}$$
