The fully general formulas are given in the notebook here. Note that g^{[1]}() is the activation function at layer 1. Here’s one of the formulas given in the notebook:
dZ^{[1]} = \left ( W^{[2]T} \cdot dZ^{[2]} \right ) * g^{[1]'}(Z^{[1]})
In that formula g^{[1]'}() is the derivative of the activation function for layer 1, right?
If you want to go deeper on the mathematics of back propagation, here’s a thread with several links to material out on the web.