So I had this question in my homework, but I could not solve it.
The question is as follows:
There is a closed path going from (0,0,0) to (1,0,0) to (0,1,0) to (0,1,2) to (0,0,0). I have first transformed this to spherical coordinates This gets me (with $(r,\theta,\phi)$ with theta the angle with the z-axiom and $\phi$ with the x): $$1:(0,0,0) $$$$ 2:(1,\pi/2,0)$$$$ 3:(\sqrt5,\arctan(1/2),\pi/2)$$$$ 4:(0,0,0)$$ There is a vector field : $$\mathbf A = r\cos^2\theta\,\boldsymbol{\hat r}-r\cos\theta\sin\theta\,\boldsymbol{\hat\theta}+3r\,\boldsymbol{\hat\phi}$$ And I have to solve the line integral of A over this path. I have tried solving it by dividing the closed integral in 4 different ones and summing those up. For each of these integrals I have defined a different ds-vector. For the first one , $$ds=rd\phi\boldsymbol{\hat\phi}$$ For the second one, $$ds=dr\hat r$$ For the 3rd and 4th ones, $$ds=rd\theta\hat\theta+dr\hat r$$
I struggle with the 3rd and 4th integrals, because I only have a d$\theta$ but in my integral r isn't constant in this interval; I don't know how to solve this. I thought of entering my r values together with my $\theta$ values even though I don't integrate those. Doing this I came up with the answer $$1+1.5\pi$$ , but the correct answer is only $$1.5\pi$$ Could someone help me out?
Hi I'm really sorry I forgot to mention that all paths are straight lines, except the one from (1,0,0) to (0,1,0). This one is a quarter of a circle.