Determine the volume of $$ M:=\left\{(x,y,z)\in\mathbb{R}^3: z\in [0,2\pi],(x-\cos(z))^2+(y-\sin(z))^2\leq\frac{1}{4}\right\} $$
My idea is to use the principle of Cavalieri, i.e. to set $$ M_z:=\left\{(x,y)\in\mathbb{R}^2: (x,y,z)\in M\right\} $$ and then calculate $$ \operatorname{vol}_3(M)=\int\limits_0^{2\pi}\operatorname{vol}_2(M_z)\, dz $$
So I have to calculate $\operatorname{vol}_2(M_z)$.
I set $a:=x-\cos(z)$ and $b:=y-\sin(z)$ and then the condition $a^2+b^2\leq\frac{1}{4}$ means that $$ \lvert a\rvert\leq\frac{1}{2}\Leftrightarrow \cos(z)-\frac{1}{2}\leq x\leq\cos(z)+\frac{1}{2},~~~~~\lvert b\rvert\leq\frac{1}{4}\Leftrightarrow\sin(z)-\frac{1}{2}\leq y\leq\sin(z)+\frac{1}{2}. $$
So I used Fubini and calculated $$ \operatorname{vol}_2(M_z)=\int\limits_{\sin(z)-\frac{1}{2}}^{\sin(z)+\frac{1}{2}}\int\limits_{\cos(z)-\frac{1}{2}}^{\cos(z)+\frac{1}{2}}1\, dx\, dy=1. $$
But then I get $$ \operatorname{vol}_3(M)=2\pi $$
and the result should be $\frac{\pi^2}{2}$. So where is my mistake?
You are making a significant mistake at the point "So I used Fubini...". Your double integral is over a square, when it should be over a circle. The inner integral should have limits that depend on the outer integral's variable.