We derive a formula connecting the derivatives of parallel section functions of an origin-symmetric star body in R^n with the Fourier transform of powers of the radial function of the body. A parallel section function (or (n-1)-dimensional X-ray) gives the ((n-1)-dimensional) volumes of all hyperplane sections of the body orthogonal to a given direction. This formula provides a new characterization of intersection bodies in R^n and leads to a unified analytic solution to the Busemann-Petty problem: Suppose that K and L are two origin-symmetric convex bodies in R^n such that the ((n-1)-dimensional) volume of each central hyperplane section of K is smaller than the volume of the corresponding section of L; is the (n-dimensional) volume of K smaller than the volume of L? In conjunction with earlier established connections between the Busemann-Petty problem, intersection bodies, and positive definite distributions, our formula shows that the answer to the problem depends on the behavior of the (n-2)-nd derivative of the parallel section functions. The affirmative answer to the Busemann-Petty problem for n\le 4 and the negative answer for n\ge 5 now follow from the fact that convexity controls the second derivatives, but does not control the derivatives of higher orders.