|
 |
On 12/3/2010 12:56 AM, scott wrote:
>
> I started to try and figure it out using calculus but it all got too
> complicated when I tried to write the velocity in terms of the current
> position.
In that case I'll give some more info. I was refraining from saying too
much since I try to let the people who pose puzzles be the ones to talk
about the answer.
[SPOILERS BELOW]
I started by normalizing everything by assuming that the target is at
the origin, that the boat's speed is 1 and that the speed of the river
is v in the y direction. If you try to solve things the way you were
going, you get the equation of motion:
-1/sqrt(x^2+y^2)*(x*dx/dt + y*(dy/dt - v)) = 1
subject to (dx/dt)^2 + (dy/dt - v)^2 = 1
After a bit of algebra you can simplify this to (I think, I didn't check
my work):
v*x + y*dx/dt - x*dy/dt = 0
It's been a while since I've done any differential equations, so I
didn't go this route. Instead I eliminated the `t' variable and rewrote
everything in terms of just the position of the boat (i.e. x and y). In
this view you get the differential equation:
dy/dx = y/x - v*sqrt(1+(y/x)^2)
Where the y/x term is the motion due to the motor of the boat and the
-v*sqrt(1+(y/x)^2) term is due to the river's current. As I said, it's
been a while since I've done any differential equations, so I just
plugged it into wolfram alpha and got the equation:
y = x*sinh(-v*log(x) + c)
Here v is the velocity of the current and c is a free parameter which
you can use to adjust the initial position of the boat. It also handles
cases where |v|>= 1 and the boat can't ever reach the target perfectly well.
If you want to avoid using any calculus, it's easy to show that the boat
moves in a parabola with the target at its focus when v=-1. You can
show this by using two (related) facts about parabolas:
1) A parabola is the set of points equidistant from a point at its focus
and a horizontal line at its directrix.
2) A parabola reflects all vertical rays through its focus.
These two properties are best illustrated in this diagram:
http://upload.wikimedia.org/wikipedia/commons/9/97/Parabola_focus_directrix.svg
Here the (x,y) is the boat's position, the vector to the focus is
parallel to the velocity due to the boat's motor, and the vector down to
the directrix is parallel the velocity due to the current, and
importantly is of equal length to the first vector, corresponding to the
river's speed matching the boat's. So you can see (and it's easy to
prove) that if you sum these vectors you get a line parallel to the
tangent of the parabola at the boat's position. Thus the boat will move
in a parabola with the target at its focus. You can verify that if you
plug v=-1 (or v=1) into x*sinh(-v*log(x)+c) you get a parabola with its
focus at the origin.
I actually solved things this way (with a parabola and geometry) first,
then used it as a model to write the differential equation which gives
answers for when |v| != 1.
> I kind of guessed intuitively it would be an interesting
> shape, I thought like half a water drop or something.
It does looks sort of neat if you plot it for different values of v:
http://fooplot.com/index.php?&type0=0&type1=0&type2=0&type3=0&type4=0&y0=x*sinh%280.5*ln%28x%29%29&y1=x*sinh%280.8*ln%28x%29%29&y2=x*sinh%281.0*ln%28x%29%29&y3=x*sinh%281.1*ln%28x%29%29&y4=x*sinh%281.2*ln%28x%29%29&r0=&r1=&r2=&r3=&r4=&px0=&px1=&px2=&px3=&px4=&py0=&py1=&py2=&py3=&py4=&smin0=0&smin1=0&smin2=0&smin3=0&smin4=0&smax0=2pi&smax1=2pi&smax2=2pi&smax3=2pi&smax4=2pi&thetamin0=0&thetamin1=0&thetamin2=0&thetamin3=0&thetamin4=0&thetamax0=2pi&thetamax1=2pi&thetamax2=2pi&thetamax3=2pi&thetamax4=2pi&ipw=0&ixmin=-5&ixmax=5&iymin=-3&iymax=3&igx=0.1&igy=0.1&igl=0&igs=0&iax=1&ila=1&xmin=-0.47609860408646915&xmax=1.2753839171157066&ymin=-0.9772358187959684&ymax=0.056507871184616004
Post a reply to this message
|
 |