Assume that . Thus,

Note that all operations you are doing are either w.r.t. or , so and should be treated as constants, and therefore is a constant. Call it .

Now we want because the derivative of a constant is zero.

Remember how we defined though. We defined it so that . So