Problem 2.16 from Morin's Classical Mechanics: Given a semi-infinite stick (one that goes off to infinity in one direction), determine how its density should depend on position so that it has the following property: If the stick is cut at an arbitrary location, the remaining semi-infinite piece will balance on a support that is located a distance $l$ from the end.
I am having a hard time understanding part of the solution to the above worked problem (2.16) in Morin’s Classical Mechanics text. He arrives at the following expression for total torque applied to the balanced rod which makes sense to me:
$\tau = \int_{x_0}^\infty \rho(x)(x-(x_0+l))gdx=0$
He then argues that because $\tau = 0$ regardless of where the rod is cut (ie for all $x_0$), that $\tau’=0$, which I also understand.
In order to find a differential equation to solve for $\rho(x)$, he then replaces $x_0$ with $x_0 + dx_0$ to differentiate $\tau$ with respect to $x_0$ to arrive at:
$0 = \frac{d\tau}{dx_0} = gl\rho(x_0) - g\int_{x_0}^{\infty}\rho(x)dx$
What I don’t understand is
how he can just replace $x_0$ with $x_0 + dx_0$,
what he is expanding as a first order approximation, and
why he has to do that in the first place.