My question is, how does one solve
$\displaystyle\sup_{\substack{x,y\in[0,1]^2 \\ x + y\leq 1}}\{a + bx + cy + d(x + y)^2\} $ when $a, b,c,d$ are constants ?
To be honest, I'm not exactly sure how to proceed (haven't had optimization classes for a long time). My vague memories of the subject tell me I should find the roots of the gradient and check when the determinant of the Hessian is positive, compute the value of the function at those points, find the largest one and take its coordinates.
So I tried to do that and I got $(\hat{x},\hat{y}) = \left(-\dfrac{b}{2d}-1,-\dfrac{c}{2d}-1\right), f(\hat{x},\hat{y}) = a - b - c -\dfrac{b^2+c^2}{2d}+\dfrac{(b+c+4d)^2}{4d}$ with $(2d)^2$ as the determinant of the Hessian matrix, which is strictly positive when $d\neq 0$ and $(\hat{x},\hat{y})$ is a maximum if $d>0$ and a minimum when $d<0$
To give some background (and maybe verify if I did this correctly), I'm working with the following problem:
$dB(t)=B(t)rdt,\quad r>0,t\in[0,T]$
$dS(t)=S(t)[\mu dt + \sigma dW_t],\quad \mu\in\mathbb{R},\sigma >0$
$dL(t) = lS(t)[(\mu - e) dt + \sigma dW_t],\quad l\in\mathbb{R},e>0$
Where $W_t$ is a Wiener process
We've got the following constraint
$dX_t=\pi^L_t\frac{dL(t)}{L(t)}+\pi^S_t\frac{dS(t)}{S(t)}+(X_t-\pi^L_t-\pi^S_t)\frac{dB(t)}{B(t)}$ such that $X_t>0$, $0\leq\pi^L_t,\pi^S_t\leq X_t$ and $0\leq\pi^L_t+\pi^S_t\leq X_t$
$\Rightarrow dX_t=\pi^L_tl((\mu - e) dt + \sigma dW_t)+\pi^S_t(\mu dt + \sigma dW_t)+(X_t-\pi^L_t-\pi^S_t)rdt$
$\Rightarrow dX_t=[rX_t+\pi^L_tl((\mu - e) - r)+\pi^S_t(\mu - r)]dt+\sigma(\pi^L_t+\pi^S_t)dW_t$
The objective is to find the strategy (pi pairs) that solve the following Bellman equation (with initial condition $x = X_0$)
$\dfrac{\partial v}{\partial t}(t,x) + \displaystyle\sup_{\substack{i,j\in[0,x]^2 \\ i+j\leq x}}\{[rx+i(l(\mu - e) - r)+j(\mu - r)]\dfrac{\partial v}{\partial x}(t,x)+\frac{1}{2}\sigma^2(i+j)^2\dfrac{\partial^2 v}{\partial x^2}(t,x)\} = 0$
Let's assume that our value functions are of the form $v(t,x)=x^{\gamma}h(t), 0<\gamma<1$
$\Rightarrow x^{\gamma}h'(t) + \displaystyle\sup_{\substack{i,j\in[0,x]^2 \\ i+j\leq x}}\{[rx+i(l(\mu - e) - r)+j(\mu - r)]\gamma x^{\gamma-1}h(t)+\frac{1}{2}\sigma^2(i+j)^2\gamma(\gamma -1)x^{\gamma-2}h(t)\} = 0$
Dividing by $x^{\gamma}$ (which is non-zero with our conditions), making the variable change $\alpha = \frac{i}{x}, \beta = \frac{j}{x}$ and factoring by $\gamma h(t)$ inside the sup gives
$\Rightarrow h'(t) + \gamma h(t)\displaystyle\sup_{\substack{\alpha,\beta\in\mathbb{I}^2 \\ \alpha + \beta\leq 1}}\{r+\alpha(l(\mu - e) - r)+\beta(\mu - r) +\frac{1}{2}\sigma^2(\alpha + \beta)^2(\gamma -1)\} = 0$
And I'm left with the problem above, where $a = r, b = (l(\mu - e) - r), c = (\mu - r), d = \frac{1}{2}\sigma^2(\gamma -1)$.
The problem is that typical values of $\gamma$ are between $0.1$ and $0.9$ so according to the Hessian, this means that the optimum coordinates I calculated, $(\hat{\alpha},\hat{\beta}) = \left(\dfrac{r - l(\mu - e)}{\sigma^2(\gamma -1)}-1,\dfrac{r - \mu}{\sigma^2(\gamma -1)}-1\right)$ are in fact a minimum. So how would I go about finding a maximum? Did I make any mistakes?
There is a very simple answer to this question. Note that your function is bounded by $a+(b\vee c)+d$. This value is actually attained: If $b \geq c$ take $x=1$ and $y=0$ and if $ b<c$ take $x=0$ and $y=1$. Hence the answer is $a+(b\vee c)+d$.
[$b\vee c$ stands for the maximum of $b$ and $c$].