Suppose I have a calculus of variation problem. That is to say a functional of the form $f(t) \mapsto \int_0^1 L \big (t,f(t),f'(t) \big ) dt$ which I want to find extrema over all differentiable functions subject to some boundary conditions $f(0)=a$ and $f(b)=b$ say. The standard approach is to write down the Euler-Lagrange equations and try to solve them.
However suppose I'm only interested in those functions $f$ that take their values in the interval $[0,1]$. For example suppose the functional is some sort of utility function I want to minimise and $f$ describes some control system that makes a choice at each point of time. I want to find the extrema $F$ over all possible control systems.
My only idea so far is to replace $[0,1]$ with $[-\pi, \pi]$ and instead look for the functions $\tan(F(t))$ using Euler-lagrange then apply arctan to get $F(t)$ back. As you might imagine the equations become nasty very quickly. Maybe replacing $\tan$ with a different diffeomorphism $(-\pi, \pi) \to \mathbb R$ might be easier. . . .
Is there any more sophisticated way to approach this kind of problems where we want to find extrema of a functional over some proper subset of the function space?