# Work done by gravity in moving particle from A to B. (change of variable in integration)

Consider a moving particle m under the influence of gravity. What's the work done by gravity in moving m from A to B?

$$\int_A^B \vec{F}\cdot \vec{dS}= \int_{rA}^{rB} \vec{F}\,dr$$

I din't understand this change of variables. Why the work can be calculated using dr instead of dS without considering the angle between dS and dr?

Thank you!

• What are $S$ and $r$? – user7530 Apr 21 '17 at 16:08
• This is likely a central force problem where the gravitational force is in the r direction – Paul Apr 21 '17 at 16:11

Imagine that the path connecting $A$ and $B$ is a curve $c$. At any point ${\bf r}$ the direction tangent to the curve $c$ can be written as the linear combination of the radial unitary vector $\hat{\bf r}$, and a perpendicular vector $\hat{\bf r}_\perp$ (in three dimensions, this is actually two vectors).
$$d{\bf S} = dr\hat{\bf r} + dq \hat{\bf r}_\perp$$
Now, the gravitational force is radial so ${\bf F} = F{\bf \hat{r}}$, this means that
$${\bf F}\cdot d{\bf S} = (F{\bf \hat{r}})\cdot (dr\hat{\bf r} + dq \hat{\bf r}_\perp) = Fdr$$
$$\int_A^B {\bf F}\cdot d{\bf S} = \int_{r_A}^{r^B}F dr$$