From Paris to ... London (Excuse the pun in the title, couldn't resist)
Paris and London are connected by a straight underground tunnel, as shown in the diagram below.  A train travels between the two cities powered only by the gravitational force of the Earth. Find the maximum speed of the train and the time taken to travel from Paris to London.  The distance between the two cities is $d$ and the radius of the Earth is $R$. Neglect friction. $x$ is the horizontal distance from Paris to the location of the train.
We are inside the Earth, so the gravitational force is not constant. The distance of the train from the centre is $r$ and the gravitational force is $-mg r/R$. The component of this that accelerates the train is $-mg r/R \sin \theta$ if $\theta$ is the angle between the line segment $h$ and the position vector of the train. This gives the differential equation $$\frac{dv}{dt} = v \frac{dv}{dr} =  -g \frac{r}{R} \sin \theta$$ Now, $r^2 = h^2 + r^2 \sin^2 \theta$ from the diagram, which means $\sin \theta = \sqrt{1-h^2/r^2}$ . Plugging this into the integrand and simplifying yields $$v \frac{dv}{dr} = -\frac{g}{R} \sqrt{r^2 - h^2}$$  so that $$\int_0^{ v} \tilde v d \tilde v = -\frac{g}{R} \int_R^{\sqrt{(x-d/2)^2 + h^2}} \sqrt{r^2 - h^2} dr$$ which may be solved by a hyperbolic substitution.

Do I have the set up right? When I try to put in the limits, the computation starts to get very messy. Thanks for any pointers.
 A: You are massively overthinking the problem. The question was "find the maximum speed".
If you know the greatest depth of the tunnel, then compute the difference in potential energy between the surface and that point.
Now convert that to kinetic energy, and then to velocity.
Evaluating 
$$U = \frac{mgr^2}{2R}$$
at both $r=R$ and $r=h$, and setting the difference equal to the kinetic energy, you obtain
$$v = \sqrt{gR\left(1-\frac{h^2}{R^2}\right)}$$
You may recognize that the latter part of this expression looks a lot like the sine of the half angle subtended by the start and end point seen from the center of the earth. You can compute that angle from the distance between the two cities. The rest should now be easy...
UPDATE as for doing this with differential equations - as I hinted in my comments, it's all about getting the right coordinates. If you measure $x$ from the center of the hole, you can write the following:
$$r^2 = x^2 + h^2\\
sin \theta = \frac{x}{r}\\
F_{gravity} = \frac{mgr}{R}\text{ (pointing to center)}\\
F_{horizontal} = F sin\theta = - F \frac{x}{r} = -\frac{mgx}{R}$$
And now integrating the equations of motion is really quite trivial...
