I have the following formula and I would like to take the derivative of this function with respect to a where we know that $x$ is a vector of our data and $z$ is constant. how can I do this?
$$f(x) = \log\left(1 - {\left(e^{a\frac{x^2}{2}}\right)}^{e^{z}}\right)$$