There are various ways to calculate the volume of a cone. The one that I am trying is by evaluating the following integral $$\text{V} = \int_{x^2+y^2 \le a^2} \int_{0}^{\frac{h}{a} \sqrt{a^2-x^2-y^2}} \ 1 \ dz \ dK = \frac23 \pi a^2 h$$ which is twice as the expected one! Where do I do wrong?
PS I got $z$ by using some trigonometric; as $\dfrac{z^2}{h^2} = \dfrac{a^2-x^2-y^2}{a^2}.$ I guess that here $z$ is not like a 'normal' function of $(x,y)$ different from types like infinite paraboloid but even if so I don't know how it is related.
Because $\dfrac{z^2}{h^2} = \dfrac{a^2-x^2-y^2}{a^2}$ is wrong. The correct one is $\dfrac{z}{h} = \dfrac{a-\sqrt{x^2-y^2}}{a}$ which gives the correct answer $1/3 \pi a^2 h$.