So you want to differentiate:
with respect to q?
In which case, we have:
But the (everything except the ) is just constant. It's a stable value, like 4 or 7 - it isn't a variable.
For the sake of simplicity, I'm going to let
When we differentiate with respect to , we get: .
When we differentiate with respect to , we get:
So, differentiating, we get:
Then, slipping c back in as , we have:
and which is where that number arises.