# Optimization of Functional

I am looking to maximize a functional for $q(\theta)$ of the following form: $$\max_{q(\cdot)} \int p(\theta) q (\theta) - \max\{\theta a, (1-\theta)b \} \; \mathrm{d} \theta$$ subject to $$\int q(\theta) \; \mathrm{d} \theta = c$$ where $p(\theta) \in \mathbb{R}_+$, $\theta \in [0,1]$, $q(\theta) \in [a,b]$, $a,b,c \in \mathbb{R}_+$, and boundary conditions are such that $q(0) = a$, $q(1)=b$.

I am very new to functional analysis and am unfamiliar with how I might approach a problem like this. Any resources would be appreciated. I first thought of using Euler-Lagrange, but the linearity of the objective in $q$ means no information comes out about the optimal $q(\theta)$. As far as the constraint goes, I've had some experience with Lagrange maximization, but only functions and not functionals.

Lastly, I'm wondering how this would extend to arbitrary $n$ dimensions for $q(\boldsymbol{\theta})$: $$\max_{\boldsymbol{q}(\boldsymbol{\cdot})} \int_D \boldsymbol{p}(\boldsymbol{\theta}) \boldsymbol{q}(\boldsymbol{\theta}) - \max\{\theta_1b_1,\cdots, \theta_n b_n\} \; \mathrm{d} \boldsymbol{\theta}$$ subject to $$\int q_1(\theta_1) \; \mathrm{d} \theta_1 = c_1$$ $$\vdots$$ $$\int q_n(\theta_n) \; \mathrm{d} \theta_n = c_n$$ where $\boldsymbol{\theta} \in \mathbb{R}^n$, and $\boldsymbol{p}, \boldsymbol{q}: \mathbb{R}^n \to \mathbb{R}^n$, and the constraints are 1-dimensional component-wise. Here, $D=\times_{i=1}^n [0,1]$, and like before, $\boldsymbol{q}(\boldsymbol{\theta}) \in [a_1,b_1] \times \cdots \times [a_n,b_n]$, with $a_i,b_i,c_i \in \mathbb{R}_+$ for all $i$. Lastly, boundary conditions are such that $\boldsymbol{q}((x_1,\cdots, 0_j, \cdots, x_n)) = (y_1, \cdots, 0_j, \cdots, y_n)$. Essentially, the image of $\boldsymbol{q}$ takes on the corner values when evaluated at the vertices of its compact support.

Any help or resource would be greatly appreciated. Thanks again.

• Does $p$ has any specific structure? – John D Aug 15 '17 at 22:10
• It is some type of regularity condition on a distribution. In my particular case, it is $\theta f(\theta) + F(\theta)$. The only structure it possesses is really just that it is always positive. – JDY Aug 15 '17 at 23:16
• Typically, there will only be bang-bang solutions, I.e. $q(\theta) \in \{a,b\}$ for (almost) all $\theta$, so variational calculus will get you nowhere. – Niels J. Diepeveen Aug 18 '17 at 9:43
• Is there any way I could characterise those solutions, even maybe knowing how many different solutions it could take? Do you mind pointing me to a reference for such a problem? – JDY Aug 18 '17 at 16:58

This is not really a typical variational problem, but more a disguised linear programming problem.

Note that the term $- \max\{\theta a, (1-\theta)b \}$ in the functional does not depend on $q$, so for the purpose of finding maximizers, we can simply ignore it. We are then left with the problem of maximizing $\int p(\theta) q (\theta) \; \mathrm{d} \theta$ subject to the constraints $a \le q(\theta) \le b$ and $\int q(\theta) \; \mathrm{d} \theta = c$.

The solution to this problem is to make $q$ as large as possible wherever $p$ is large, and as small as possible wherever $p$ is small. To be precise, if we put $$\begin{eqnarray} y &=& \inf \left\{ z \mid \lambda(p \ge z) \le \frac{c-a}{b-a} \right\} \\ A &=& \{\theta \in [0,1] \mid p(\theta) < y \} \\ B &=& \{\theta \in [0,1] \mid p(\theta) > y \} \\ \end{eqnarray}$$ then a function $q$ satisfying the constraints is a maximizer iff $q(\theta) = a$ almost everywhere in $A$ and $q(\theta) = b$ almost everywhere in $B$. Thus maximizers are essentially unique if $\lambda([0, 1]\setminus A \setminus B)$ = 0.

The only relevant property of $[0,1]$ is that it is a finite measure space, so this should carry over without any problem to the multidimensional case.

• Thanks for your answer Niels. This was helpful for me to think about, as I kept thinking about this from the variational calculus standpoint. What you said makes a lot of sense to me. I have been thinking about my problem and may have mis-specified my question, so my apologies for that. I was wondering how I might deal with another term in the integrand, say $p_1(\theta) q(\theta) - h(q(theta))$, that also interacts linearly in $q$. The difference is that $h(q)$ takes the form of $h(q(\theta)) = \text{min } \{a-q(\theta),0\}$, so there are some kinks. I will edit my question accordingly. – JDY Aug 20 '17 at 19:07
• @JDY: It is usually considered a bad idea to make substantial changes to a question that has already been answered. (provided that it was a sensible question to begin with) See for example math.meta.stackexchange.com/q/3561/3457 – Niels J. Diepeveen Aug 20 '17 at 20:22
• @Neils J. Diepreveen: My apologies -- I see why that would be the case. You did help me with one part of my problem, so I should have just accepted and asked another one. I don't have enough reputation to upvote your answer, but if no other answer comes, I will accept yours as you did provide me with some insight into the structure of such questions. – JDY Aug 20 '17 at 23:00
• Or should I just roll back to the previous edit and accept the answer and ask a new question? – JDY Aug 20 '17 at 23:06
• @JDY: Yes, you should. There are bigger issues involved than just which answer to accept. If question and answer are left as is, it will confuse and annoy people reading it. Also, I think you will have a better chance of getting an answer if you post a new question that links back to this one. – Niels J. Diepeveen Aug 20 '17 at 23:35