I have
$$ h_\theta(x) = \frac 1 {1+e^{-\theta x}} $$
I need to get $ \frac d {d\theta} h_\theta(x) $. Here is my work.
$$\begin{eqnarray} \frac d {d\theta} h_\theta(x) &=& \frac d {d\theta} (1 + e^{-\theta x})^{-1} \\ &=& -(1 + e^{-\theta x})^{-2} \cdot \frac d {d\theta} (1 + e^{-\theta x}) \\ &=& -(1 + e^{-\theta x})^{-2} \cdot \left[ 0 + \frac d {d \theta} e^{-\theta x} \right] \\ &=& -(1 + e^{-\theta x})^{-2} \cdot e^{-\theta x} \cdot \frac d {d \theta} (-\theta x) \\ &=& \left[ \frac 1 {1 + e^{-\theta x}} \right]^2 \cdot e^{-\theta x} \cdot x \\ &=& \left[ h_\theta(x) \right]^2 \cdot \frac x {e^{\theta x}} \end{eqnarray}$$