I am trying to solve Zermelo's Navigation Problem.

One of the cases I'm looking at is when the river's current is a function of the $$x$$-position only.

From what I learned in Fluid Mechanics courses, I know that at the two ends when (i.e. the river banks) the velocity should be zero. Then in the center the velocity is at its maximum value.

In other words: $$v_{(x=0)} = v_{(x=L)} = 0$$, and $$v_{(x=0.5L)} = V_{max}$$

Everything I learned in the past was these velocities as function of radius, which makes sense for pipes and tubes, but since this can be thought of a 2D rectangular flow, I can't figure this out.

I know it should be a quadratic expression.

Any help is appreciated. Thanks

Here is a sketch of the function I am trying to model: