# Calculating the charge of an $sp_z$ hybridized orbital using charge density $\rho$

I have a homework problem that is asking to verify that the total charge for an electron is -1. The electron is in an $$sp_z$$ hybridized orbital with the shape:

We are given the charge density as:$$\rho(r,\theta,\phi)=-\frac 1 {64\pi}e^{-r}(r-2-r\cos\theta)^2.$$

I understand the simple equation to find the total charge is $$Q=\rho V$$ where $$V$$ is the volume of a sphere, but here, we don't have a sphere. I am wondering how to parameterize this shape and if I can set up an integral such as $$\int_{0}^{R}dr\int_{0}^{2\pi}d\theta\int_{0}^{2\pi}d\phi$$ to integrate the charge density to find the total charge. Anyone have any thoughts on this?

I understand the simple equation to find the total charge is $$Q=\rho V$$ where $$V$$ is the volume of a sphere,

The simple equation $$Q=\rho V$$ is applicable only if the charge density is homogenous, i.e. independent of position in space. But in your case the charge density $$\rho(r,\theta,\phi)$$ does depend on the position in space ($$r,\theta,\phi$$). Therefore you can only use differential relation $$dQ=\rho\ dV$$ which is valid for infinitesimal small volume elements $$dV$$.

I am wondering how to parameterize this shape and if I can set up an integral such as $$\int_{0}^{R}dr\int_{0}^{2\pi}d\theta\int_{0}^{2\pi}d\phi$$

Yes, that is roughly the way to go.

But you got the ranges of the spherical coordinates $$r$$ and $$\theta$$ wrong. Look at the geometrical definition of spherical coordinates to get the correct ranges.

You also need to express the volumen element $$dV$$ in terms of $$r$$, $$\theta$$, $$\phi$$. Hint: It is not simply $$dV=dr\ d\theta\ d\phi$$. I'm sure you will find the correct expression in your textbook or course notes.

Then you can finally calculate the integral $$Q=\int dQ=\int \rho\ dV=...$$