I am reading this lecture note about Variational Inference. It is optimizing the ELBO by mean field factorization and coordinate ascent. However, I cannot understand how the formula $(23)$ is derived from $(22)$.
$$\tag{22} L_{k} = \int q(z_{k})E_{-k}[\log p(z_{k}|z_{-k},x)] \,dz_{k} - \int q(z_{k})\log q(z_{k}) \,dz_{k} $$ Take the derivative with respect to $q(z_{k})$ $$\tag{23} \frac{dL_{k}}{dq(z_{k})} = E_{-k}[\log p(z_{k}|z_{-k},x)] - \log q(z_{k}) - 1 = 0 $$ how does it take the derivative of the integral $(23)$ with respect to $q(z_{k})$?