# how to calculate work done in moving a charge, when the path and point charge don't lie on one line?

Problem: A charge Q in point O=(0,0) and a test charge q in point A=(4,1) lie in a plane. How much work W needs to be done to move q to point B=(2,2). Q always stays at (0,0). Q=q= 2*10^-4. One unit here equals 1 meter.

I found two formulas to calculate the work done. One is with this path integral:

$$W_{AB}$$ = W($$r_A,r_B$$)=q* $$\int_{r_A}^{r_B} E*dr$$
but here is the one I tried to use:

$$W_{AB}$$ = qΔ U = q($$\frac {kQ} {r_A}$$ - $$\frac {kQ} {r_B}$$ )

Now here's my problem, what are the distances $$r_A$$and $$r_B$$ that i have to use here? It would be easy if all the points would be on one line , but here I am not sure what I am supposed to do.

Can I just use: this length $$r_A$$=$$| \vec {OA} |$$ = $$\sqrt 17$$ $$r_B$$ = $$| \vec {OB} |$$ = $$\sqrt 8$$.

Or do I have to do something else, like do I maybe need to follow the equipotential lines like this?:

If so ,then how can I put this into mathematics so i can plug it into one of the equations?

• Surely $r_B$ is simply $2 \sqrt 2$ ? Commented Jan 14, 2020 at 23:36
• You don't need the co-ordinates of C. Just note that $r_C = r_B = 2 \sqrt 2$. Commented Jan 15, 2020 at 0:04