Signs in the integral of work

1. The problem statement, all variables and given/known data
A point mass attached to a string rotates. The string goes through a smooth tube and is pulled slowly, thus encreasing the velocity of the mass. See drawing. The solution is taken from a book.
The work done by the string is:
[tex]W=\int_{r_0}^{r}\frac{L^2}{m}\frac{1}{r^3}\left(-dr\right)=+\frac{L^2}{m}\int_{r}^{r_0}\frac{1}{r^3}dr=\frac{L^2}{2m}\left(\frac{1}{r^2}-\frac{1}{r_0^2}\right)[/tex]
I ask about the minus and plus signs in the first integral (i understand the physics).
Let's say the origin of the axes system is in the center, pointing outward. Then, I understand, the minus sign of the (-dr) is because it is directed to the negative direction, to the center, since the radius decreases. But if so, why is the force:
[tex]F=\frac{L^2}{m}\frac{1}{r^3}[/tex]
taken as positive? it should have been also negative, since work equals to:
[tex]\vec{W}=\vec{F}\cdot\vec{S}[/tex]
And amazingly the result is correct: the work is positive.
I think the reasoning here is mathematical, not physical, since later on the borders of the integral [itex]\int_{r_0}^{r}[/itex] switch to [itex]\int_{r}^{r_0}[/itex], and together with the changing of the sign of the dr, both give a meaningful expression, although in the opposite direction: from r to r0.

1. The problem statement, all variables and given/known data
A point mass attached to a string rotates. The string goes through a smooth tube and is pulled slowly, thus encreasing the velocity of the mass. See drawing. The solution is taken from a book.
The work done by the string is:
[tex]W=\int_{r_0}^{r}\frac{L^2}{m}\frac{1}{r^3}\left(-dr\right)=+\frac{L^2}{m}\int_{r}^{r_0}\frac{1}{r^3}dr=\frac{L^2}{2m}\left(\frac{1}{r^2}-\frac{1}{r_0^2}\right)[/tex]
I ask about the minus and plus signs in the first integral (i understand the physics).
Let's say the origin of the axes system is in the center, pointing outward. Then, I understand, the minus sign of the (-dr) is because it is directed to the negative direction, to the center, since the radius decreases. But if so, why is the force:
[tex]F=\frac{L^2}{m}\frac{1}{r^3}[/tex]
taken as positive?

That's the magnitude of the force, so it's inherently positive. You know the work has to be positive, so it's just going to be equal to the magnitude of the force times the magnitude of [tex]d\textbf{r} = -dr[/tex].

it should have been also negative, since work equals to:
[tex]\vec{W}=\vec{F}\cdot\vec{S}[/tex]

Work is a scalar, so you shouldn't have an arrow over W. If you look at it in terms of vectors, you have

[tex]\vec{F} = -\frac{L^2}{mr^3}\,\hat{r}[/tex]

since the string exerts a force directed back toward the origin, and

[tex]d\vec{r} = dr\,\hat{r}[/tex]

So you'll again get just one negative sign.

And amazingly the result is correct: the work is positive.
I think the reasoning here is mathematical, not physical, since later on the borders of the integral [itex]\int_{r_0}^{r}[/itex] switch to [itex]\int_{r}^{r_0}[/itex], and together with the changing of the sign of the dr, both give a meaningful expression, although in the opposite direction: from r to r0.

Thanks. You are right about the vector sign above the work (shouldn't be).
What you are saying is that the minus sign comes from the force that is directed backwards, to the center, and not from the (dr), which is: [itex]d\vec{r} = dr\,\hat{r}[/itex], so it's magnitude is positive since [itex]d\vec{r}[/itex] is always directed outwards, in the direction of [itex]\hat{r}[/itex], correct?
I agree, but you gave 2 reasonings for the minus sign: one, that I stated above (if I'm correct), and the other:

That's the magnitude of the force, so it's inherently positive. You know the work has to be positive, so it's just going to be equal to the magnitude of the force times the magnitude of [tex]d\textbf{r} = -dr[/tex].

.
That I don't understand, why does the magnitude of (dr) equal to (-dr), or you just meant the opposite, that the magnitude of (-dr) is positive and equals to (dr). I f so, where, according to this reasoning, comes the minus sign from, if the work, justifiably, is positive and both are magnitudes are have to be positive?

If I may ask, you used 2 [itex]LaTeX[/itex] commands: the comma in: [itex]d\vec{r} = dr\,\hat{r}[/itex] and textbf in: [itex]d\textbf{r} = -dr[/itex]. What does the comma make, and where have you taken these from, since I haven't found them in the [itex]LaTeX[/itex] refference.

Thanks. You are right about the vector sign above the work (shouldn't be).
What you are saying is that the minus sign comes from the force that is directed backwards, to the center, and not from the (dr), which is: [itex]d\vec{r} = dr\,\hat{r}[/itex], so it's magnitude is positive since [itex]d\vec{r}[/itex] is always directed outwards, in the direction of [itex]\hat{r}[/itex], correct?

Right.

That I don't understand, why does the magnitude of (dr) equal to (-dr), or you just meant the opposite, that the magnitude of (-dr) is positive and equals to (dr). I f so, where, according to this reasoning, comes the minus sign from, if the work, justifiably, is positive and both are magnitudes are have to be positive?

Here, you have to look at the limits of the integral. Because you're integrating from a bigger value of r to a smaller value of r, you can think of dr being a negative quantity, so you have

If I may ask, you used 2 [itex]LaTeX[/itex] commands: the comma in: [itex]d\vec{r} = dr\,\hat{r}[/itex] and textbf in: [itex]d\textbf{r} = -dr[/itex]. What does the comma make, and where have you taken these from, since I haven't found them in the [itex]LaTeX[/itex] refference.

The comma adds a small space. I think it looks clearer with a space between dr and the unit vector. You can search the web for LaTeX guides, like this one. There are tons of them out there.

That's the magnitude of the force, so it's inherently positive. You know the work has to be positive, so it's just going to be equal to the magnitude of the force times the magnitude of [itex]d\textbf{r} = -dr[/itex]

And:

you can think of dr being a negative quantity, so you have
[tex]dW = \vec{F}\cdot d\vec{r} = |\vec{F}| |d\vec{r}|\cos 0 = \frac{L^2}{mr^3} (-dr)[/tex]

Isn't magnitude of a vector positive by definition?

2.

since the string exerts a force directed back toward the origin, and
[tex]d\vec{r} = dr\,\hat{r}[/tex]

Shouldn't it be [itex]d\vec{r} = -dr\,\hat{r}[/itex]?

3. Any way you look at it, the force and the displacement [itex]d\vec{r}[/itex] are in the same direction, towards the center, and thus produce positive work which increases the velocity, which is our case.
So, according to my logic, both, the force and displacement should be equal signed, but they aren't, and that's the right answer, how come?

No. If you're integrating from small r to large r, dr>0 and dr should point outward. If you're integrating from large r to small r, dr<0 and dr should point inward. In both cases, you need [itex]d\vec{r} = dr\,\hat{r}[/itex] for the direction to work out properly.

3. Any way you look at it, the force and the displacement [itex]d\vec{r}[/itex] are in the same direction, towards the center, and thus produce positive work which increases the velocity, which is our case.
So, according to my logic, both, the force and displacement should be equal signed, but they aren't, and that's the right answer, how come?

To see If I understand:
From the physical point of view, I need a positive work, a positive integral. I could have gotten it if the borders were from small to large, but they are not.
So I use a mathematical "trick": I use -dr. This is because the integral function is defined in mathematics from small to large, and if we reverse the order:
[tex]\int_{a}^{b} f(x) dx = -\int_{b}^{a} f(x) dx[/itex]
Right?
Here dr is a positive variable.