Table of Contents

Equation of a Sphere


\begin{tikzpicture} % MERC

%% some definitions
\def\R{3} % sphere radius
\def\angEl{25} % elevation angle
\def\angAz{-100} % azimuth angle
\def\angPhiOne{-50} % longitude of point P
\def\angPhiTwo{-35} % longitude of point Q
\def\angBeta{33} % latitude of point P and Q

%% working planes
\pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole
\LongitudePlane[xzplane]{\angEl}{\angAz}
\LongitudePlane[pzplane]{\angEl}{\angPhiOne}
\LongitudePlane[qzplane]{\angEl}{\angPhiTwo}
\LatitudePlane[equator]{\angEl}{0}

%% draw background sphere
\fill[ball color=grey!10] (0,0) circle (\R); % 3D lighting effect

%% characteristic points
\path[pzplane] (\angBeta:\R) coordinate [label={[black]above left:$P$}] (P);
\drawpoint{P}{.5mm}{black};
\coordinate [label={[black]above left:$O$}] (O) at (0,0);
\drawpoint{O}{.5mm}{black};

\path[pzplane] (\R,0) coordinate (PE);
\path[xzplane] (\R,0) coordinate (XE);
\path[pzplane] (\R,0) coordinate [label={[black]above right:$R$}] (R);
\drawpoint{R}{.5mm}{black};
\draw[dotted,black] (O) -- (R);
\drawbrace{O}{R}{2mm}{black}{$r$}{0}{-4mm}{mirror};

%% meridians and latitude circles
\DrawLatitudeCircle[\R]{0} % equator

%% draw lines and put labels
%\draw (-\R,-\H) -- (-\R,2*\R) (\R,-\H) -- (\R,2*\R);
\draw[->] (O) -- (P);

% z axis
\draw[->,dashed,blue] (O) -- +(0,1.5*\R) node[above] {$z$};
% x axis
\path[xzplane] (0:\R) node[below,red] {$x$} coordinate (x);
\draw[->,dashed,red] (O) -- (x);
% y axis
\path[pyplane] (0:\R) node[left,green!50] {$y$} coordinate (y);
\draw[->,dashed,green!50] (O) -- (y);

% projection P
\path[pzplane] (0.8*\R,0) coordinate [label={[black]above right:$Q$}] (Q);
\drawpoint{Q}{.5mm}{black};
\draw[->,dotted] (P) -- (Q);

%angles
\draw[pzplane,->,thin] (0:0.5*\R) to[bend right=15]
    node[midway,right] {$\alpha$} (\angBeta:0.5*\R);
\draw[equator,->,thin] (\angAz:0.5*\R) to[bend right=30]
    node[pos=0.4,below] {$\beta$} (\angPhiOne:0.5*\R);

\end{tikzpicture}

The segment $\overline{OQ}$ is created b the projection of P on $\overline{OQ}$ and is also the bisection of the rectangle described by $\overline{O,y-axis,x-axis,Q}$. $\overline{Q,x-axis}$ is a perpendicular projection on the x-axis and $\overline{Q,y-axis}$ is a perpendicular projection on the $y$-axis.

In the triangle between $\overline{OQ}$ and the x-axis:

\begin{eqnarray*}
\cos(\beta) &=& \frac{x}{\overline{OQ}}
\end{eqnarray*}

In the triangle between $\overline{OQ}$ and the y-axis:

\begin{eqnarray*}
\sin(\beta) &=& \frac{y}{\overline{OQ}}
\end{eqnarray*}

In the triangle given by $\widehat{OPQ}$:

\begin{eqnarray*}
\cos{\alpha} &=& \frac{\overline{OQ}}{\overline{OP}} = \frac{OQ}{r}
\end{eqnarray*}

Now, we take the last equation:

\begin{eqnarray*}
\cos{\alpha} &=& \frac{\overline{OQ}}{r}
\end{aleqnarray*}

and take out $\overline{OQ}$:

\begin{eqnarray*}
OQ &=& r * \cos{\alpha}
\end{eqnarray*}

and substitute $\overline{OQ}$ in the first two equations:

\begin{eqnarray*}
\cos{\beta} &=& \frac{x}{r * \cos{\alpha}} \\
\sin{\beta} &=& \frac{y}{r * \cos{\alpha}}
\end{eqnarray*}

we extract x and y since it is what we are looking for:

\begin{eqnarray*}
x &=& r * \cos{\alpha} * \cos{\beta} \\
y &=& r * \cos{\alpha} * \sin{\beta}
\end{eqnarray*}

we also need z, so we go back to the triangle $\widehat{OPQ}$:

\begin{eqnarray*}
\sin{\alpha} &=& \frac{\overline{PQ}}{\overline{OP}} = \frac{z}{r}
\end{eqnarray*}

so we extract z:

\begin{eqnarray*}
z &=& r * \sin{\alpha}
\end{eqnarray*}

Now, concluding, we obtain:

\begin{eqnarray*}
x &=& r * \cos{\alpha} * \cos{\beta} & \\
y &=& r * \cos{\alpha} * \sin{\beta} & \\
z &=& r * \sin{\alpha}
\end{eqnarray*}

which is the parametric form of the equation of a sphere in space. If you follow what we did, we really did the same thing that we did for a sphere, but we just did it several times in order to obtain z as well.

Volume of a Sphere


\begin{tikzpicture}
%% some definitions
\def\R{3} % sphere radius
\def\angEl{25} % elevation angle
\def\angAz{-100} % azimuth angle
\def\angPhiOne{-50} % longitude of point P
\def\angPhiTwo{-35} % longitude of point Q
\def\angBeta{33} % latitude of point P and Q

%% working planes
\pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole
\LongitudePlane[xzplane]{\angEl}{\angAz}
\LongitudePlane[pzplane]{\angEl}{\angPhiOne}
\LongitudePlane[qzplane]{\angEl}{\angPhiTwo}
\LatitudePlane[equator]{\angEl}{0}

%% draw background sphere
\fill[ball color=grey!10] (0,0) circle (\R); % 3D lighting effect

% circles
\foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }
%\foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }

% z axis
\draw[->,dashed,blue] (O) -- +(0,\R) node[above] {$z$} coordinate (z);
% x axis
\path[xzplane] (0:\R) node[below,red] {$x$} coordinate (x);
\draw[->,dashed,red] (O) -- (x);
% y axis
\path[pyplane] (0:\R) node[left,green!50] {$y$} coordinate (y);
\draw[->,dashed,green!50] (O) -- (y);

% Ox
%\drawbrace{O}{x}{2mm}{black}{$r$}{4mm}{0}{};
% Oy
%\drawbrace{O}{y}{2mm}{black}{$r$}{0}{4mm}{};
% Oz
%\drawbrace{O}{z}{2mm}{black}{$r$}{-4mm}{0}{};

% right-angle
%\node[square,minimum size=1mm, dotted] at (0.1,0.1) [draw,fill] (O) [magenta] {};
%\coordinate[label={[magenta]above right:$90^{\circ}$}] (90) at (0.2, 0.2);

\coordinate [label={[black]left:$O$}] (O) at (0,0);
\drawpoint{O}{.5mm}{black};

\path[pzplane] (\angBeta:\R) coordinate [label={[black]right:$P$}] (P);
\drawpoint{P}{.5mm}{black};

\draw[->,black] (O) -- (P);
\drawbrace{O}{P}{2mm}{black}{$r$}{0}{-4mm}{mirror};

\coordinate [label={[black]left:$Q$}] (Q) at (0,0.5*\R);
\drawpoint{Q}{.5mm}{black};

\draw[dotted] (P) -- (Q);

\end{tikzpicture}

A sphere can be seen as infinitely many disks placed on top of each other, each representing the cross-section of the sphere at a certain point along the $z$ axis.

This means that we can represent the difference in volume as a summation of all the surfaces of the circles (each having the area $A_{\bullet}=\pi * r^{2}$) aligned along the $z$ axis and write that:


\begin{eqnarray*}
V &\approx& \sum{A_{\bullet}^{\infty}*\delta{z}}
\end{eqnarray*}

if we apply this to the whole range on the $z$ axis while sweeping the dimension of the circles starting at the south and up to the north pole, in both cases where $y=0$. This makes the radius range from $-r$ at the south pole to $r$ at the north pole and the equation becomes:


\begin{eqnarray*}
V &=& \int_{-r}^{r}{\pi*y^{2}*dz}
\end{eqnarray*}

At any given $z$, a right-angle triangle is formed by (for example) $\widehat{O,P,Q}$ in which we can apply Pythagoras. This translates to an universal right-angle triangle in point $Q$ so that at any value of $z$ we can map:


\begin{eqnarray*}
\overline{OQ} &\mapsto& z \\
\overline{OP} &\mapsto& r \\
\overline{QP} &\mapsto& y \\
\end{eqnarray*}

and leading to Pythagoras:


\begin{eqnarray*}
\overbar{y}^{2}&=&r^{2}-z^{2}
\end{eqnarray*}

Now we can replace $y^{2}$ in the integral equation and obtain:


\begin{eqnarray*}
V &=& \int_{-r}^{r}{\pi*(r^{2}-z^{2})*dz}
\end{eqnarray*}

we can take out the constant $\pi$ and rewrite the integral as:


\begin{eqnarray*}
V &=& \pi*\int_{-r}^{r}{(r^{2}-z^{2})*dz}
\end{eqnarray*}

and expand using definite integral rules to:


\begin{eqnarray*}
V &=& \pi*[\int_{-r}^{0}{r^{2}dz} - \int_{0}^{r}{z^{2}*dz}] & \\
&=& \pi*[ r^{2}z\biggr\rvert_{-r}^{0} - \frac{1}{3}z^{3}\biggr\rvert_{0}^{-r} ] & \\
&=& \pi*\{ (r^{2}*0) - (r^{2}*-r) - [ \frac{1}{3}(-r)^{3} - \frac{1}{3}(0)^{3} ]\} & \\
&=& \pi*( r^{3} + \frac{1}{3}*r^{3} ) & \\
&=& \pi*( \frac{3*r^{3} + r^{3}}{3} ) & \\
&=& \pi*( \frac{4*r^{3}}{3} )
\end{eqnarray*}

and rearranging the terms nicely, we obtain the volume as:


\begin{eqnarray*}
V &=& \frac{4}{3}\pi*r^{3}
\end{eqnarray*}

Area of a Sphere


\begin{tikzpicture}
%% some definitions
\def\R{3} % sphere radius
\def\angEl{25} % elevation angle
\def\angAz{-100} % azimuth angle
\def\angPhiOne{-50} % longitude of point P
\def\angPhiTwo{-35} % longitude of point Q
\def\angBeta{33} % latitude of point P and Q

%% working planes
\pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole
\LongitudePlane[xzplane]{\angEl}{\angAz}
\LongitudePlane[pzplane]{\angEl}{\angPhiOne}
\LongitudePlane[qzplane]{\angEl}{\angPhiTwo}
\LatitudePlane[equator]{\angEl}{0}

%% draw background sphere
\fill[ball color=gray!10] (0,0) circle (\R); % 3D lighting effect
\fill[ball color=gray!75] (0,0) circle (0.75*\R); % 3D lighting effect

% circles
%\foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }

% z axis
\draw[->,dashed,blue] (O) -- +(0,\R) node[above] {$z$} coordinate (z);
% x axis
\path[xzplane] (0:\R) node[below,red] {$x$} coordinate (x);
\draw[->,dashed,red] (O) -- (x);
% y axis
\path[pyplane] (0:\R) node[left,green!50] {$y$} coordinate (y);
\draw[->,dashed,green!50] (O) -- (y);

% Ox
%\drawbrace{O}{x}{2mm}{black}{$r$}{4mm}{0}{};
% Oy
%\drawbrace{O}{y}{2mm}{black}{$r$}{0}{4mm}{};
% Oz
%\drawbrace{O}{z}{2mm}{black}{$r$}{-4mm}{0}{};

% right-angle
%\node[square,minimum size=1mm, dotted] at (0.1,0.1) [draw,fill] (O) [magenta] {};
%\coordinate[label={[magenta]above right:$90^{\circ}$}] (90) at (0.2, 0.2);

\coordinate [label={[black]left:$O$}] (O) at (0,0);
\drawpoint{O}{.5mm}{black};

\path[pzplane] (\angBeta:\R) coordinate [label={[black]right:$P$}] (P);
\drawpoint{P}{.5mm}{black};

\draw[->,black] (O) -- (P);
\drawbrace{O}{P}{2mm}{black}{$r$}{0}{-4mm}{mirror};

\coordinate [label={[black]left:$Q$}] (Q) at (0,0.5*\R);
\drawpoint{Q}{.5mm}{black};

\draw[dotted] (P) -- (Q);

\end{tikzpicture}

The total volume inside a sphere of radius $r$ can be thought of as the summation of the surface area $A(r)$ of an infinite number of spherical shells of infinitesimal thickness concentrically stacked inside one another from radius $0$ to radius $r$.

At any given radius $r$ the incremental volume $\delta V$ equals the product of the surface area at radius $r(A(r))$ and the thickness of the shell $\delta r$.

Thus, we can write that:

\begin{eqnarray*}
V &\approx& \sum{A(r)}\delta r
\end{eqnarray*}

as $\delta r$ approaches zero, we can integrate from $0$ to $r$ (all the internal shells, from radius zero to the radius of the big sphere).

\begin{eqnarray*}
V &=& \int_{0}^{r}A(r)dr
\end{eqnarray*}

We have already derived the volume, so we can now substitute the volume into the equation and rewrite:

\begin{eqnarray*}
\frac{4}{3}\pi*r^{3} &=& \int_{0}^{r}A(r)dr
\end{eqnarray*}

Now we differentiate both sides of the equation with respect to $r$ in order to get rid of the integral and derive the area $A$ as a function of the radius $r$:

\begin{eqnarray*}
\frac{d}{dr}\biggr{[}\frac{4}{3}\pi*r^{3}\biggr{]} &=& \frac{d}{dr}\biggr{[}\int_{0}^{r}A(r)dr\biggr{]}
\end{eqnarray*}

Differentiating on the left side, we obtain:

\begin{eqnarray*}
\frac{4}{3}\pi*3*r^{2} &=& \frac{d}{dr}\biggr{[}\int_{0}^{r}A(r)dr\biggr{]}
\end{eqnarray*}

while differentiating on the right side, the defined integral from $0$ to $r$ does not matter, we just use the differentiation integral rule:

\begin{eqnarray*}
\frac{d}{d{\bf{x}}}\biggr{[}\int {\bf{x}}d{\bf{x}}\biggr{]} &=& {\bf{x}}
\end{eqnarray*}

and obtain:

\begin{eqnarray*}
\frac{4}{3}\pi*3*r^{2} &=& A(r)
\end{eqnarray*}

Finally, simplifying on the left side:

\begin{eqnarray*}
4\pi r^{2} &=& A(r) 
\end{eqnarray*}

and turning the equality around so it looks like a forumula, yields the area of the sphere:

\begin{eqnarray*}
A(r) &=& 4\pi r^{2}
\end{eqnarray*}

Since we already know that the area is a function of $r$, we can abbreviate this to:

\begin{eqnarray*}
A &=& 4\pi r^{2}
\end{eqnarray*}

and obtain the final area of the large sphere.