Volume of Viviani’s Window I’m taking Real Analysis and I have an assignment to do on calculating the volume of Viviani’s window or dome. 
I have to solve this for the sphere $$x^2+y^2+z^2=4$$ and the cylinder $$(x-1)^2+y^2=1$$
Here's a visual representation of the problem:

Here's a figure obtained from the intersection of the 2 figures. (I need to find the volume of that figure.) The image shows a curve which does not have a volume but to understand what volume the problem is asking I imagine as if on the inside it is filled with some material 

My problem is that all I have seen on the Internet about this problem involves multivariable calculus, parametrization, polar coordinates, etc. I have not seen any of these yet, so I have to do this problem with integrals in only one variable.
The formulas we have seen in class about the applications of the Riemann Integral are the following:


*

*Arc length L of a curve
$$L= \int_{a}^{b} \sqrt{1+(f’(x))^2} dx$$

*Volume
$$V_1=\int_{a}^{b} \pi (f(x)^2 dx$$
$$V_2=\int_{a}^{b} A(x)dx$$
A(x) is the area of a section of the figure

*Lateral area
$$\int_{a}^{b}2\pi f(x) \sqrt{1+f’(x)}dx$$ 
I thought on expressing the sphere equation and the cylinder equation in terms of the same variable and integrating. The reason behind this was that Viviani’s dome is composed of the points that belong to the cylinder and sphere at the same time, but this reasoning has failed and I don’t know why. 
Any help is very much appreciated and I’m sorry for my broken English.

EDIT
This is all I have for now. Need help for A(x). I don’t know how to treat x as a parameter inside the integral and at the bounds of the integral.


EDIT 2
@Ertxiem I finally solved the integral and got the final answer:
$$\frac{16}{9}(3\pi-4)$$
I still have a few questions though:


*

*When you said: “You can start by thinking about the base.” what did you really meant by the base? I can’t really see what the base of a figure like that would be, since it’s a curve-like figure, how would you visualize that? If you meant the base of the figure, then I understand that studying it is necessary in order to compute the volume but at what point that computation was used?

*What is exactly b(x) and why is it important?

*Regarding the height, A(x) is the integral of a function, which is the height taking x as a parameter and y as a variable but, the graph of the function is in the first quadrant, so, doesn’t this mean that we are actually integrating height/2? 
Conclusion:
Find the base, find the height, find the area of a section by integrating the previous results, find the volume by integrating the area of a section.
Please point out any flaws, errors. Any suggestions for a better explaining, understanding of the problem are welcome. Thanks! 
 A: Here is a detailed expalantion of @DanielWainfleet's idea. Let $\mathcal{V}$ denote the region. Then the the intersection of $\mathcal{V}$ and the plane $x = x_0$ is described by
$$ \mathcal{I}(x_0) \quad : \quad y^2 + z^2 \leq 4 - x_0^2 \quad \text{and} \quad y^2 \leq 1 - (1 - x_0)^2.$$

The area of $\mathcal{I}(x_0)$ can be computed by decomposing this into 4 congruent wedges and two congruent isosceles as in the following figure.

Indeed, note that the four corners of $\mathcal{I}(x_0)$ are given by $(\pm \sqrt{x_0(2-x_0)}, \pm \sqrt{2(2 - x_0)})$, which follows from solving the system of equations $y^2 + z^2 = 4-x_0^2$ and $y^2 = 1 - (1-x_0)^2$. From this, the angle of each of four wedges is given by $\arctan(\sqrt{x_0/2})$, and so, the area of $\mathcal{I}(x_0)$ is given by
$$ S(x_0) := 2(4 - x_0^2) \arctan(\sqrt{x_0 / 2}) + 2 \sqrt{2x_0}(2 - x_0) $$
Then the volume of $\mathcal{V}$ is obtained by integrating this with respect to $x_0$ over $[0, 2]$. Then,
\begin{align*}
\text{[volume of $\mathcal{V}$]}
&= \int_{0}^{2} S(x) \, \mathrm{d}x \\
&= \int_{0}^{2} \left[ 2(4 - x^2) \arctan\left(\sqrt{\frac{x}{2}}\right) + 2 \sqrt{2x}(2 - x) \right] \, \mathrm{d}x \\
&= \left[ \frac{2}{3} (4-x) (x+2)^2 \arctan\left(\sqrt{\frac{x}{2}}\right) - \frac{2}{9} \sqrt{2x} \left(3x^2 - 10x + 24\right) \right]_{0}^{2} \\
&= \frac{16 \pi}{3} - \frac{64}{9}.
\end{align*}
A: Hint:
From the second equation you can get $y(x).
And if you subtract the first equation from the second one, you can get rid of the $y$ and obtain an expression $z(x)$.
So, now you have the coordinates of the points in the curve $(x,y(x),z(x))$.
Can you work from this point onward?

Edit:
The usual approach is to use a tripe integral to get the volume.
Since you said you haven't learned that yet, you can compute the volume using a step-by-step approach.
You can start by thinking about the base.
The values of $x$ are bounded by a minimum value $x_-$ and a maximum value $x_+$. I'm confident you can get those from the equations that you presented.
For a given value of $x \in [x_-; x_+]$, it's possible to compute the interval with the possible values of $y$. By the symmetry of this problem along the $y$ axis, we get that $y \in [-b(x); b(x)]$.
I'll leave it to you to compute $b(x)$ from the equation of the cylinder.
Furthermore, for each pair $(x,y)$, you can get the height $h(x,y)$ from the equation of the sphere. Note that the height is related with $z(x,y)$ but it's not exactly $z(x,y)$.
Therefore, for a fixed value of $x$ the vertical area $A(x)$ along the $y$ axis of the figure is computed by:
$$
A(x) = \int_{-b(x)}^{b(x)} h(x,y) \ dy
$$
Or, equivalently
$$
A(x) = 2 \int_{0}^{b(x)} h(x,y) \ dy
$$
If you are struggling with the integral above, I suggest that you take a look at a related computation.
And, after obtaining the expression for $A(x)$, the volume $V$ is the integral along the $x$ axis between the limits $x_-$ and $x_+$:
$$
V = \int_{x_-}^{x_+} A(x) \ dx
$$
If you have any further questions, please let me know.

Edit 2:
Regarding $h(x,y)$ it will be the double of $z(x,y)$, so
$$
h(x,y) = 2 \sqrt{4 - x^2 - y^2}
$$
Thus the function $A(x)$ gives:
$$\begin{align}
A(x)
& = 2 \int_{0}^{\sqrt{1 - (x-1)^2}} 2 \sqrt{4 - x^2 - y^2} dy \\
& = 4 \int_{0}^{\sqrt{1 - (x-1)^2}} \sqrt{4 - x^2} \sqrt{1 - \frac{y^2}{4 - x^2}} dy
\end{align}$$
Using the transformation $\frac{y}{\sqrt{4 - x^2}} = \sin u$ we get that $\frac{dy}{\sqrt{4 - x^2}} = \cos u \ du$. Therefore,
$$\begin{align}
A(x)
& = 4 \int_{0}^{\sqrt{1 - (x-1)^2}} (4 - x^2) \sqrt{1 - \sin^2 u} \cos u \ du \\
& = 4 (4 - x^2) \int_{0}^{\sqrt{1 - (x-1)^2}} \cos^2 u \ du \\
& = 4 (4 - x^2) \int_{0}^{\sqrt{1 - (x-1)^2}} \frac{1 + \cos 2u}{2} \ du \\
& = 2 (4 - x^2) \left[ u + \frac{1}{2} \sin 2u \right]_{y=0}^{\sqrt{1 - (x-1)^2}} \\
& = 2(4 - x^2) \left[ \arcsin \frac{y}{\sqrt{4 - x^2}} + \sin u \cos u\right]_{y=0}^{\sqrt{1 - (x-1)^2}} \\
& = 2(4 - x^2) \left[ \arcsin \frac{y}{\sqrt{4 - x^2}} + \frac{y}{\sqrt{4 - x^2}} \sqrt{1 - \left( \frac{y}{\sqrt{4 - x^2}} \right) ^2} \right]_{y=0}^{\sqrt{1 - (x-1)^2}} \\
& = 2 \left[ (4 - x^2) \arcsin \frac{y}{\sqrt{4 - x^2}} + y \sqrt{4 - x^2 - y^2} \right]_{y=0}^{\sqrt{1 - (x-1)^2}}
\end{align}$$
Can you take it from here?

Edit 3:
In your computations you got the same result as Sangchul Lee. (I'm sorry but I haven't finished the computations myself.)
Regarding your questions, what I tried to explain in the beginning of my post was a methodological procedure, that you summarized correctly in the end of your post after your 2nd edit. This approach is very common in solving problems (not only in Mathematics): you split a difficult problem in a sequence of steps that are easier to tackle.


*

*In this case, the first thing I though was on the base of the figure as seen from the top, just like the figure on the right in Narasimham's post.
This means that we are looking into the $xy$ plane, and that the limits of the figure will be on the $z$ axis.

*Afterwards we need to use the relation between $x$ and $y$. For each $x$, the values of $y$ will belong to an interval. In this case, since the figure is symmetric with respect to the $yz$ plane it means that, for each $x$ the value of $y$ will be at most given by the bound $b(x)$ and at least it will be given by its symmetric $-b(x)$. So, $-b(x)$ and $b(x)$ are the limits of integration for $y$.

*The function $A(x)$ represents the area of the cross section of the figure by the plane $x$ constant, that is parallel to the $yz$ plane. To obtain this area, we need to integrate the height $h$ over the possible values of $y$.
To simplify the computations, we can compute half of the integral over half the height and multiply the result by $4$.
In the future, you will learn how to compute triple integrals to get the volume (instead of one step at a time, like this time) and you will also learn other system of coordinates, like the polar coordinates (2D), the cylindrical coordinates (3D) and the spherical coordinates (3D) that help us approaching some problems in a simpler way, like it was described in the other answers to your question.
A: The figure bellow shows the situation from above, in the $x,y-$plane. 
Use the cylindrical coordinates
$$\begin{aligned}x&=r\cos t\\ y&=r\sin t\\ z&=z\\J&=r,\end{aligned}$$
where $J$ denotes the Jacobian.
Now, we need to find the bounds for $t,r,z.$ 


*

*The arrows in the green circle (cylinder from above) indicate the movement of the angle $t$ counterclockwise from $-{\pi \over 2}$ to $\pi \over 2.$

*$(x-1)^2+y^2=1\;$ becomes $\;r =2\cos t,$ hence $r$ goes from $0$ to $2 \cos t.$

*$x^2+y^2+z^2\leq 4\;$ becomes $\;r^2+z^2\leq 4,$ from where the bounds for $z.$
The volume is given by the triple integral 
$$\int\limits_{-{\pi \over 2}}^{\pi \over 2}\int\limits_{0}^{2 \cos t}\int\limits_{-\sqrt{4-r^2}}^{\sqrt{4-r^2}}r\,dz\,dr\,dt.$$

A: Attempting to integrate with single polar/azimuth coordinate angle $\theta$
Parametrization of Curve & geometrical introduction
$$ x^2+y^2 +z^2= a^2;\, (a=2) \tag1$$
$$   (x-a/2)^2 +y^2 = (a/2)^2;\, x^2+y^2-ax =0  \tag2 $$
Subtract 2) from 1)
$$ z^2= a(a-x) \tag3 $$
We can parameterize Viviani Curve now as 
$$ (x,y,z)= a (\cos^2\theta, \cos\theta \sin \theta, \sin \theta) \tag4$$

The above geometrical introduction is strictly not  necessary, given to identify triangle $OPQ.$ 
Boundary of intersection window in meridian of sphere cylindrical coordinates can parametrized as
$$ r= a \cos\theta,  \, z=a \sin \theta \,\tag5 $$
As an aside consider the right triangle $OPQ,$ with $ \phi $ in the spherical coordinate system
$$\tan \phi= \frac{z}{r} = \frac{\sin \theta}{\cos \theta }= \tan \theta \rightarrow \boxed{\phi=\theta } \tag6$$
an interesting property of Viviani Curve.
To find Volume
Area of triangle $$ OPQ= 
 = \frac12.r.z =  \frac{a^2}{2}{\sin \theta \cos \theta }\tag  7 $$
Location of center of gravity of triangle $OPQ$ from origin 
$ = \frac23. r = \frac23.a \cos\theta \tag 8$
Apply Pappu's theorem to find incremental swept volume
$$ dV= \frac{a^2}{2} \sin\theta \cos\theta . \frac23.a \cos\theta . d\theta= \frac{a^3}{3} \sin\theta \cos^2\theta d\theta \tag{9}$$
Integrating with respect to $\theta$ the Volume in yellow
$$ V= \frac{-a^3 \cos^3 \theta }{9}+c_1 \tag{10} $$
Evaluate between  $\theta$ limits $(0, \pi/2)$,
$$Vol=\dfrac{a^3}{9} \tag{11} $$
Considering four quadrants with symmetry of  $ (xy,xz)$ planes of four octants we multiply by 4 getting
$$ V_{Viviani Window}= \frac{4 a^3}{9}.  \tag{12} $$
