# Differentiation Question

Hi,

I have this derivation, and I am not sure how to derive it:

$$\frac{d}{dp(x)}\int_{-\infty}^{\infty}p(x)\,log(p(x))\,dx$$

I mean, what to do with the integral?

Another thing, how to integrate:

$$\int_{-\infty}^{\infty}e^{x^2}\,dx$$

Hi,

I have this derivation, and I am not sure how to derive it:

$$\frac{d}{dp(x)}\int_{-\infty}^{\infty}p(x)\,log(p(x))\,dx$$

I mean, what to do with the integral?

Another thing, how to integrate:

$$\int_{-\infty}^{\infty}e^{x^2}\,dx$$

Squaring something means multiplying it by itself:

I2 =
$$(\int_{-\infty}^{\infty}e^{x^2}\,dx)(\int_{-\infty}^{\infty}e^{x^2}\,dx)$$

x is a dummy variable of integration. You can change it to "y" (or your favorite letter)

$$(\int_{-\infty}^{\infty}e^{x^2}\,dx)(\int_{-\infty}^{\infty}e^{y^2}\,dy)$$

This is similar to a double integral where it got split up because the first integrand was independent of the other variable. You can put them back together (you should know what Fubini's theorem says).

Switch to polar coordinates and it becomes a simple integral over the entire r-theta plane.

Square root the answer at the end (since you just calculated the square of the answer, remember you squared the integral)

dextercioby
Homework Helper
Hi,

I have this derivation, and I am not sure how to derive it:

$$\frac{d}{dp(x)}\int_{-\infty}^{\infty}p(x)\,log(p(x))\,dx$$

I mean, what to do with the integral?

Good question. :) You perform it and end up with a number which, when differentiated wrt to a function gives 0, because it won't depend on x, or on p(x) anymore.

S_David said:
Another thing, how to integrate:

$$\int_{-\infty}^{\infty}e^{x^2}\,dx$$

The function under the integral diverges when nearing the 2 infinities. The integral cannot be computed, because it's infinite.

HallsofIvy
Homework Helper
Good point bigubau! The others were thinking of
$$\int_{-\infty}^{\infty} e^{-x^2}dx$$

S David, you seem to have difficulty distinguishing between a "definite" integral and "indefinite" integral. The first problem was also a "definite" integral and so, also as bitubau said, a constant. It's derivative is 0. The others were thinking of differentiating the "indefinite integral"
$$\frac{d}{dp(x)}\int p(x)\,log(p(x))\,dx$$

Good point bigubau! The others were thinking of
$$\int_{-\infty}^{\infty} e^{-x^2}dx$$

S David, you seem to have difficulty distinguishing between a "definite" integral and "indefinite" integral. The first problem was also a "definite" integral and so, also as bitubau said, a constant. It's derivative is 0. The others were thinking of differentiating the "indefinite integral"
$$\frac{d}{dp(x)}\int p(x)\,log(p(x))\,dx$$

Thank you all for these comments. Actually HallsofIvy, the integral in hand came from an optimization problem, and if it is 0, then we can not find the optimum solution. The problem is:

$$\underset{p(x)}{\text{max}}-\int_{-\infty}^{\infty}p(x)\log_2[p(x)]\,dx$$

subject to:

$$\int_{-\infty}^{\infty}p(x)\,dx=1$$

Mute
Homework Helper
Hi,

I have this derivation, and I am not sure how to derive it:

$$\frac{d}{dp(x)}\int_{-\infty}^{\infty}p(x)\,log(p(x))\,dx$$

It looks like what you actually want to be doing here is taking a functional derivative.

That is, I think what you want is

$$\frac{\delta}{\delta p(y)}\int_{-\infty}^{\infty}p(x)\,log(p(x))\,dx$$

The usual rules of regular calculus usually apply, but note

$$\frac{\delta f(x)}{\delta f(y)} = \delta(x-y)$$
where $\delta(x-y)$ is the dirac delta. In doing this you will not get zero as an answer.