Suppose the vector field is the gradient of the function $f(x,y,z)=-\frac{1}{x^2+y^2+z^2}.$
Find $\int_C F\cdot dr $ where $C$ is the smooth curve joining $(1,0,0) $ to $(0,0,2)$.
I found $\operatorname{grad} f=\left(\dfrac{2x}{(x^2+y^2+z^2)^2},\dfrac{2y}{(x^2+y^2+z^2)^2},\dfrac{2z}{(x^2+y^2+z^2)^2}\right)$
Then parametrizing the curve C we get $r=((1-t),0,2t)$
Then I computed $dr=(-1,0,2)$
So $F(r)\cdot dr=\dfrac{10t-2}{((1-t)^2+4t^2)^2}$
But the answer is not coming Can anyone please help where it is going wrong
I am trying to recollect my vector calculus since I am not in touch for long
Fundamental theorem of calculus: You know the vector field is the gradient of a known scalar function $f$, so the line integral is path-independent and
$$\int_C\nabla f\cdot\mathrm d\mathbf r=f(0,0,2)-f(1,0,0)$$