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_{\text{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: Plot of River's Current vs x-Position
Any polynomial has factors corresponding to its roots. You assumed that the function is quadratic, so we should have
$$v=k(x−0)(x−L)=-kx(L-x)$$
for some constant $k$. By the nature of the problem, $0\leq x\leq L$, which implies $L-x\geq0$ and thus $x(L-x)\geq0$. This quadratic is maximized at $x=L/2$ (you can use calculus or just complete the square to prove this), with value $(L/2)^2$. So $v$ is maximized or minimized (depending on the sign of $k$) with value $v_m=-k(L/2)^2$. Now we have $k=-4v_m/L^2$, and
$$v=\frac{4v_m}{L^2}x(L-x).$$