# Maximization over function - Pointwise Maximization vs Derivative

I am trying to solve functional maximization problems. They are typically of the following form (where support of $\theta$ is [0,1]):

$\displaystyle \max_{x(\theta)}$ $\displaystyle \int[v(\theta, x(\theta)) + u(\theta,x(\theta))-u_1(\theta,x(\theta))(\frac{1-F(\theta)}{f(\theta)})] f(\theta)d\theta$

Now one way that was proposed to me was of point-wise maximization. That is you fix a $\theta$ and then solve:

$\displaystyle argmax_{x(\theta)} v(\theta, x(\theta)) + u(\theta,x(\theta))-u_1(\theta,x(\theta))(\frac{1-F(\theta)}{f(\theta)})$.

Solving this problem would give me a number $x$ for each $\theta$ and I will recover a function $x(\theta)$ that will maximize the original objective function.

I have two questions related to this:

1) Does such point-wise maximization always work?

2) What happens if rather than doing point-wise maximization I try and take the derivative of the objective function with respect to $x(\theta)$ and equating the first order condition to 0? Is this a legitimate way of solving the problem? Can someone show exactly what such a derivative would look like and how to compute it?

Regarding your second question, no you cannot, precisely because you are solving a functional maximization problem. You do not know if $x(\theta)$ is continuous, differentiable, etc. For instance, imagine $x(\theta) = 1, \forall d$. Then taking the derivative of the objective function with respect to $x(\theta)$ does not make any sense.