# Gauss divergence theorem

I'm trying to solve the following problem using the Gauss divergence theorem. I have to calculate the Flux through a sphere. The sphere is given as $$x^2 +y^2+z^2==4$$ where as the z is resticted from $$\sqrt{3} \; to \; 2$$ I determined the divergence to $$4z$$ I first tried to use spherical coordinates which resolve to:

$$\int _{\sqrt{3}}^2\int _0^{\pi /6}\int _0^{2\pi }4 *r*\text{Cos}[o]*r^2*\text{Sin}[o]dpdodr = \frac{7 \pi }{4}$$

To confirm this solution I tried to solve this problem using a regular volume integral. Which resolve to: $$\int _{\sqrt{3}}^2\int _{-\sqrt{4-z^2}}^{\sqrt{4-z^2}}\int _{-\sqrt{4-y^2-z^2}}^{\sqrt{4-y^2-z^2}}(4 *z) dxdydz = \pi$$ I guess the error lies in my changed z variable. I replaced it with $$r*\text{Cos}[o]$$ Could you guys please take a look into it? Thanks

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.959648847579956, "perplexity_flag": "head"}