How does the product rule work for a double derivative, $\frac{\partial^2 }{\partial x^2}$? I have this function $$A_x=A_0\frac{1}{1+e^{-az}}e^{ik(z-ct)}$$ where $A_0$ is a constant and $a$ and $k$ are constants with dimensions of inverse length and $z \in \mathbb{R}$
I wish to compute $$\frac{\partial^2 A_x}{\partial z^2}$$

So my attempt is 
$$\frac{\partial^2 A_x}{\partial z^2}=A_0\left[\frac{\partial^2}{\partial z^2} \left(\frac{1}{1+e^{-az}}\right)-\frac{k^2}{1+e^{-az}}\right]e^{ik\left(z-ct \right)}$$
where I have simply applied the product rule for differentiation making the assumption that it works for double derivatives.
The reason why I have done it this way is to simplify the calculation further by using the following result: 
$$\frac{\partial^2}{\partial z^2}\left(\frac{1}{1+e^{-az}}\right)=a^2\frac{e^{-az}\left(e^{-az}-1\right)}{\left(1+e^{-az}\right)^3}$$

The problem, however, is that the correct answer is 
$$\frac{\partial^2 A_x}{\partial z^2}=A_0\left[\frac{\partial^2}{\partial z^2} \left(\frac{1}{1+e^{-az}}\right)+\color{blue}{2ik\frac{\partial}{\partial z}\left(\frac{1}{1+e^{-az}}\right)}-\frac{k^2}{1+e^{-az}}\right]e^{ik\left(z-ct \right)}$$
My answer is identical with the exception of the blue term, I don't understand where this term comes from and I know that my answer is wrong, but I would like to know where this term comes from and hence why the product rule does not apply to double derivatives?

The notation 
$$\frac{\partial^2 f}{\partial x^2}$$
is an abbreviation of 
$$\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right)$$
which is where you are confused. It means differentiate twice. Try this and you'll get the right answer. 
