What will be the minimum drift possible when a boat crosses a river? Imagine a boat with a constant speed $v$ that has to cross a river of width $d$. Let the river flow with a constant velocity $u$. I want to know the angle at which the boat should sail in order to land closest to the point opposite to the starting point.

I know that drift can be zero it the boat travells at an angle such that $v \sin(x)=u$ but this is only possible when $v>u$.
How can I calculate minimum drift and corresponding angle when $u>v$?
 A: The time taken to cross the river is
$\displaystyle t = \frac d {v \cos(x)}$
In this time, the downstream drift $D$ will be
$D = (u - v \sin(x)) t
\\ \displaystyle \Rightarrow D = \frac d v \left( \frac u {\cos(x)} - v \tan(x) \right)
\\ \displaystyle \Rightarrow \frac {dD}{dx} = \frac d v \left( \frac {u \sin(x)}{\cos^2(x)} - \frac v {\cos^2(x)} \right)$
Setting $\frac {dD}{dx}$ to zero, we see that $D$ is minimised when
$\displaystyle \sin(x) = \frac v u$
A: First break the $V$ into two components

The drift $D$ can be written as
$$(u-v\sin x)t=D$$
to find minimum $D$, we differentiate and then equate to $0$
$$\frac{\text{d}D}{\text{d}t}=0 \\ ut-v\sin(x)t=D$$
Differentiating both sides,
$$\left(t\frac{\text{d}u}{\text{d}t}+u\frac{\text{d}t}{\text{d}t}\right)-\left(\frac{\text{d}(v\sin x)}{\text{d}t}+v\sin x\frac{\text{d}t}{\text{d}t}\right)=0 \\ \left(t\frac{\text{d}u}{\text{d}t}+u\frac{\text{d}t}{\text{d}t}\right)-\left(v\frac{\text{d}(\sin x)}{\text{d}t}+\sin(x)\frac{\text{d}v}{\text{d}t}+v\sin x\frac{\text{d}t}{\text{d}t}\right)=0$$
We know,
$$\frac{\text{d}v}{\text{d}t}=0$$
and
$$\frac{\text{d}u}{\text{d}t}=0$$
since acceleration is $0$. So we can write the equation as
$$(0+u)-\left(v\frac{\text{d}(\sin x)}{\text{d}t}+0+v\sin x\right)=0 \\ u-(-v\cos x+v\sin x)=0 \\ u+v\cos x-v\sin x=0 \\ v=\frac{u}{\sin x-\cos x}$$
If we have the velocity of the boat and the velocity of the river, then we can find the angle for which drift is minimum for that particular velocity of boat using the above relation.
