I'm studying electrostatic and I'm getting pretty frustrated because with the definition of work I'm getting that it's always positive and it doesn't make any sense.
So here I have 2 positive particles. $q_1$ it's fixed in it's position, and I'm gonna move $q_2$ from $A$ to $B$.
To calculate the work done by $q_2$ from $A$ to $B$ I use the following equation:
$$ W=\int_a^b{\vec{F}.\vec{ds}} $$
Where $\vec{ds}$ is the direction of travel, and $\vec{F}$ it's the force that $q_1$ does to $q_2$. And turns into this:
$$ W=\int_a^b{F.ds.cos(\theta)} $$
Since $\vec{F}$ and $\vec{ds}$ are going in the same direction, the angle between them $\theta$ is $0$, and $cos(0)=1$ so the equation looks like this:
$$ W=\int_a^b{F.dr} $$
Ok so far so good. If I resolve that integral, since both particles are positive, the work should be positive, because I'm moving in the direction of the force.
And TBH I don't need to continue to get to the part that confuses me.
Say that now I want to go from B to A:
$$ W=\int_b^a{F.ds.cos(\theta)} $$
But now, since I'm moving against the force, $\theta=180^\circ$ so $cos(180^\circ)=-1$
So the equation ends up like this:
$$ W=-\int_b^a{F.dr} $$
Since $\int_a^b = -\int_b^a$, I get the following:
$$ W=\int_a^b{F.dr} $$
And it doesn't make any sense, because it's the same integral I was doing while pulling the particles apart! So there is definitively something I'm doing wrong, but I don't know what.
In a book I have, it just skips the fact that $\theta$ it's gonna be $180^\circ$, so I'm guessing it has to do with that.
And I'm really hoping it's not too dumb, so I don't feel like an idiot, but it probably is :P