# Need help understanding differentiation. Question and Answer provided

Could someone walk me through this derivative?

Thanks.

-

Note, however, that there is an obvious typo in that solution: there should be $- \frac{1}{k}Qf(\frac{Q}{k})$ instead of $- \frac{1}{k}Q (\frac{Q}{k})$.
EDIT: While the solution you linked is instructive, it is by far not the simplest one. In particular, note that $$\frac{d}{{dQ}}\int_{Q/k}^\infty {Qf(x)dx} = \frac{d}{{dQ}}\bigg[Q\int_{Q/k}^\infty {f(x)dx} \bigg] = \bigg[1 - F\bigg(\frac{Q}{k}\bigg)\bigg] + Q\frac{d}{{dQ}}\bigg[1 - F\bigg(\frac{Q}{k}\bigg)\bigg].$$