Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find a function $f(x)$ that maximizes a functional: $$ J(f)= \int\limits_{-\infty}^{+\infty} e^{-x^2/2}f(x) \,dx$$

Where $$f(x)>0 \ \text{ and} \int\limits_{-\infty}^{+\infty} f(x) \,dx = 1$$ Euler-Langrange equation will simply be:

$$ e^{-x^2/2}=0$$

So does it mean that there are no stationary points for this functional? But how do I search for a maxima/minima then?

Thank you!

share|cite|improve this question
Indeed, the EL equations are a necessary condition for extremizing the functional, so it is immediate there are no $f$ that maximises your function. – Ragib Zaman Sep 15 '12 at 10:31
up vote 3 down vote accepted

The maximum cannot be attained. You're trying to maximize integrating a positive $f$ of mass 1 against $e^{-x^2/2}$, so this means you want to put as much of the mass of $f$ as possible on the large values of $e^{-x^2/2}$; of course this function is strictly maximized at $x = 0$. But then this means you can construct a sequence of functions $f_n(x)$ of increasing sharper peaks about $x = 0$ so that $J(f_n)$ is increasing towards 1; without obsessing over rigor, you can think of this sequence as weakly approaching the Dirac delta function, and one can observe that the upper bound for your functional is 1, which cannot be attained.

share|cite|improve this answer

We can use probability: we have to find the maximum of $E[e^{-X^2/2}]$ where $X$ is a continuous random variable. We try to work with normal laws. Let $f_n(x):=\frac n{\sqrt{2\pi}}\exp\left(-\frac{x^2n^2}2\right)$, then $$\int_{-\infty}^{+\infty}f_n(x)\exp\left(-\frac{x^2}2\right)dx=\frac n{\sqrt{2\pi}}\int_{-\infty}^{+\infty}\exp\left(-\frac{x^2}2(n^2+1)\right)dx.$$ Using the substitution $t=\sqrt{n^2+1}x$, we get $$\int_{-\infty}^{+\infty}f_n(x)\exp\left(-\frac{x^2}2\right)dx=\frac n{\sqrt{n^2+1}},$$ which proves that the maximum is $1$. It's never attained, otherwise we would have $$\int_{-\infty}^{+\infty}f(x)(1-e^{-x^2/2})dx=0$$ for some $f>0$, hence $f(x)(1-e^{-x^2/2})=0$ almost everywhere, which is not possible.

share|cite|improve this answer

The $\delta$-distributon would match, if it is allowed in your search range. Otherwise, I assume you additionally require $f$ to be e.g. continuous. Let $f$ be a continuous function with $f(x)\ge0$ for all $x$ and $\int_{-\infty}^\infty f(x)dx=1$. Then $f(x)\ne0$ for some $x\in\mathbb R$ and by continuity $f(x_0)\ne0$ for some $x_0\ne0$. Let $h=f(x_0)$. Then there is $\epsilon>0$ such that $\epsilon<\frac12|x_0|$ and $f(x)>\frac h 2$ for all $x$ with $|x-x_0|<\epsilon$. Let $$g(x)=\begin{cases}-(x-x_0-\epsilon)(x-x_0+\epsilon)&\mathrm{if\ }x_0-\epsilon<x<x_0+\epsilon\\ (x-\epsilon)(x+\epsilon)&\mathrm{if\ }-\epsilon<x<+\epsilon\\ 0&\mathrm{otherwise}\end{cases}$$ and verify that $g$ is continuous, $\int_{-\infty}^\infty g(x) dx=0$, $J(g)>0$ and $f+c\cdot g\ge 0$ as long as $0\le c \le \frac h{2\epsilon^2}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.