%Volume of a ball in R^4
%If you modify this file, please indicate here and in the footnote
%Math263D
\documentclass[11pt]{article}
\usepackage{amsmath}
\pagestyle{empty}
\addtolength{\textwidth}{1.2in}
\addtolength{\textheight}{1.2in}
\addtolength{\oddsidemargin}{-.58in}
\addtolength{\evensidemargin}{-.58in}
\renewcommand{\baselinestretch}{1.0}
\parindent = 0cm
\parskip = .1cm
\begin{document}
\begin{center}
{\Large
The Volume of a Ball in $4$-Space
\footnote{Copyright \copyright 2009 Steve Chapin and Todd Young.
All rights reserved. Please address comments to young@math.ohiou.edu.}}
\end{center}
Let $B(a)$ be the (closed) ball centered at the origin of radius $a$ in
$\mathbf{R}^{4}$. So,
\[
B(a)=\left\{(x,y,z,w)\in \mathbf{R}^{4} : x^{2}+y^{2}+z^{2}+w^{2}\le
a^{2}\right\}.
\]
Let $S(a)$ be the sphere centered at the origin of radius $a$ in
$\mathbf{R}^{4}$. So,
\[
S(a)=\left\{(x,y,z,w)\in \mathbf{R}^{4} : x^{2}+y^{2}+z^{2}+w^{2}=
a^{2}\right\}.
\]
Let $V(a)$ be the volume of $B(a)$ and $A(a)$ be the (surface) area
of $S(a).$
Now,
\[
V(a)=\iiiint\limits_{B(a)} dV =
\int_{-a}^{a}\!\!\int_{-\sqrt{a^{2}-x^{2}}}^{\sqrt{a^{2}-x^{2}}}
\!\!\int_{-\sqrt{a^{2}-x^{2}-y^{2}}}^{\sqrt{a^{2}-x^{2}-y^{2}}}
\!\!\int_{-\sqrt{a^{2}-x^{2}-y^{2}-z^{2}}}^{\sqrt{a^{2}-x^{2}-y^{2}-z^{2}}}
\,dw\,dz\,dy\,dx.
\]
Integrating once and using the symmetry we see the iterated
integral is equal to
\[
16\int_{0}^{a}\!\!\int_{0}^{\sqrt{a^{2}-x^{2}}}
\!\!\int_{0}^{\sqrt{a^{2}-x^{2}-y^{2}}}
\,\sqrt{a^{2}-x^{2}-y^{2}-z^{2}}
\,dz\,dy\,dx.
\]
We can use \textsc{Matlab} to compute this iterated integral.
\begin{enumerate}
\item Enter the following commands:\\
\verb& syms x y z&\\
\verb& syms a positive& \dotfill Makes $a>0$. \\
\verb& 16*int(int(int(sqrt(a^2-x^2-y^2-z^2),z,0,sqrt(a^2-x^2-y^2)), ... &
\\
\verb& y,0,sqrt(a^2-x^2)),0,a)&
\item Given that
\[
V(a)=\int_{0}^{a}A(r)\,dr
\]
find $A(a)$. Hint: Use the Fundamental Theorem of Calculus.
\item Modify the commands above to find the volume of the ball of
radius $a$ in $\mathbf{R}^{5}$. Then find the (surface) area of the
sphere of radius $a$ in $\mathbf{R}^{5}$.
\item Using the formulas that you already know in $\mathbf{R}^{2}$ and in
$\mathbf{R}^{3}$, try to come up with a general formula for
the volume of the ball of radius $a$ and the (surface) area of the
sphere of radius $a$ in $\mathbf{R}^{n}$. (Hint: You will need
different formulas for $n$ even and $n$ odd.)
\end{enumerate}
\vfill
\noindent
\textsf{The student uses \textsc{Matlab} to assist in computing the
volume of balls and the (surface) area of spheres in $\mathbf{R}^{4}$
and $\mathbf{R}^{5}$.}
\end{document}