yes partial derivative.
and yes sorry i should have said "Differentiate in respect to"
dont know how this maths coding thing works
instead of Q-S divided by 2 should be (Q-S) to the power of 2
similarly S to the power of 2 divided by Q
hope that makes sense