My original problem was to find a way to calculate the volume under any surface (where possible) using any closed path with integrals. I came up with 2 methods that made enough sense: with the first you integrate one time along parallel segmets ($x=n$ or $y=n$, it's the same) and the second time you intregrate those segments using both times an implicit curve as limit; in the second method you use a parametric/polar path and integrate all the path integrals with different "radii" (similar to how you get the volume of a sphere from it's surface). The second method appears to be faulty.
To verify the methods i used as example $f\left(x,y\right)=\cos x+\cos y$ and the path $\left(\frac{\pi\cos t}{\left|\sin t\right|+\left|\cos t\right|},\frac{\pi\sin t}{\left|\sin t\right|+\left|\cos t\right|}\right)=\left[\left|x\right|+\left|y\right|=\pi\right]$.
- Fist method gives the integral $\int_{-\pi}^{\pi}\int_{\left|y\right|-\pi}^{\pi-\left|y\right|}f\left(x,y\right)dxdy=16$
- Second method gives instead $\int_{0}^{\pi}\int_{-\pi}^{\pi}f\left(\frac{r\cos t}{\left|\sin t\right|+\left|\cos t\right|},\frac{r\sin t}{\left|\sin t\right|+\left|\cos t\right|}\right)\sqrt{\left(\frac{d}{dt}\frac{r\cos t}{\left|\sin t\right|+\left|\cos t\right|}\right)^{2}+\left(\frac{d}{dt}\frac{r\sin t}{\left|\sin t\right|+\left|\cos t\right|}\right)^{2}}dtdr$ which is manually unsolvable and gives as result $22.627...$
Through empirical methods (geogebra 3D) i found that the correct value is $16$, so, the question is, what exactly is the problem with the second method?
Also, i've tried different different paths, and the 2 integrals are equal only when using a circle.