Integrable systems are systems which have $2n-1$ time-independent, functionally independent conserved quantities ($n$ being the number of degrees of freedom), or $n$ whose Poisson brackets with each other are zero.
The way I understand it, these conditions correspond directly to us being able to do the Hamilton-Jacobi transformation, which is roughly equivalent to saying that the $2n-1$ conserved quantities are the initial conditions of the problem, which itself is a way of saying that the map from the phase space position at some time $t_0$ to that at time $t$ is invertible. But, if the last statement is right, why are there systems which are non-integrable at all? Shouldn't all systems' trajectories be uniquely determined by the equations of motion and initial conditions? Or is it that all non-integrable systems are those whose Lagrangians can't be written (non-holonomic constraints, friction etc)?
I've heard that Poincare proved that the gravitational three-body problem in two dimensions was non-integrable, but he showed that there were too few analytic conserved quantities. I don't know why exactly that means non-integrability, so if someone could help me there that would be great too.