I have conjured a problem, for which I believe I have numerically found the solution for, but for which I am not sure about. I'm not able to solve it analytically (or maybe only a numerical approach would work). It goes like this:
For the family of functions $f(x)$ that satisfy: $$ f(0) = 0 $$ $$ |f'(x)| \le 1, \forall x \in [0, 1] $$ $$ \int_0^1f(x)dx = 0, $$ find the function that maximizes the value of $f(1)$.
I am not sure if this is a well known problem or not, I've come up with it trying to solve a specific problem of physical nature, which I will reveal if the question is resolved.
Can anyone guide me on how one might approach this? I have a limited knowledge of calculus of variations, but I cannot find a way to apply it here.
I would also welcome complete solutions, if anyone is willing to spend the time.
Edit: I should probably also point out that my solution is only piecewise differentiable in $[0, 1]$, as it is a piecewise function. The second condition for the family of functions implies that they belong in $C^1$.
Second edit: Quite some time has passed, so I'm guessing the question is considered solved. I am accepting the given answer.
As promised, I will now reveal the problem I was trying to solve, which was the following:
I have a piece of wire (or similar structure) which I can shape in any form I like, and whose mass is evenly distributed along its length. If I hang the wire from one of its endpoints, so that it can rotate freely, what's the shape I should give to it so that the other endpoint protrudes the most (in the horizontal plane), when the wire is balanced?
In my question above, $x$ is a parametric variable that is $0$ at the first endpoint and $1$ at the other; $f$ is the amount the wire protrudes (i.e. the horizontal dimension).
The first condition is for fixing the first endpoint.
The second condition ensures that the wire can exist in a Euclidian space (if $|f'(x)|$ was greater than $1$, it would mean that the wire extends in the horizontal plane faster than its length allows it).
The third condition is the mass balancing part.
What the solution tells me is that in order to maximize the protrusion, the wire must be shaped such that it goes horizontally in the opposite direction of the desired protrusion for $b/2$ (taken from the accepted answer), make a sharp U-turn, and continue horizontally in the direction of the desired protrusion until the end.
In the end, the maximum protrusion of the wire will be $(\sqrt 2 - 1)$ times its length.