Define the cross-entropy of two probability distributions $p(x)$ and $q(x)$ as
$$ H(p,q):=\int_{- \infty}^{+\infty} p(x) \log q(x) \, dx$$
Taking $p(x)$ as a fixed distribution I would like to find the equation that $q(x)$ has to satisfy to maximize this functional.
Assuming $q(x) \in C([-\infty, +\infty])$ I rewrite the problem using a Lagrange multiplier as
$$\max_{q(x) \in C([-\infty, +\infty])} \left( H(p,q) - \lambda \left( \int_{- \infty}^{+\infty} q(x) \, dx -1 \right) \right)$$
because I have to add in the condition that $q(x)$ integrates to one.
Now I wish to use the Euler-Lagrange equations, so I notice that $\frac{d}{dq} H(p,q) = p(x) / q(x)$ and that
$$ \frac{d}{dq} \left( H(p,q) - \left( \int_{- \infty}^{+\infty} q(x) \, dx -1 \right) \right) = p(x)/ q(x) -1$$
But I do not understand how to put this all together to find the equation that $q(x)$ has to satisfy, could someone explain this to me clearly?