# Gradient theorem in line integrals

For the line integral
$$\int_{C} \left( \frac{dx}{x} + z^2 dy + 2yz dz \right)$$ where $C$ is the path of the line segment from $(1,0,0)$ to $(1,2,1)$ followed by the line segment from $(1,2,1)$ to $(2,1,4)$.
Can I employ the gradient theorem here? Is it safe to say that the vector field $\mathbf{f}$ is conservative? I found that the curl of the vector field is zero, BUT there's a singularity at $x=0$. However, the path never passes through that $x=0$, so is this okay?

Well you can definitely write

$$\int_{C} \left( \frac{dx}{x} + z^2 dy + 2yz dz \right) = \int_{C} \nabla (\ln(x) + yz^2)\cdot(dx,dy,dz).$$

Then the gradient theorem implies that line integrals through gradient fields are path independent. See Gradient theorem wiki for more on this.

To answer your question in the comment below. Every conservative field can be written as the gradient of a scalar field. This is what I have done above.

So what we have done is written a conservative vector field $\mathbf{V}(r)$ as the gradient of some scalar field $\nabla S(r)$ i.e.

$$\mathbf{V}(r) = \nabla S(r).$$ Now, we are free to take the curl of the above i.e.

$$\nabla \times \mathbf{V}(r) = \nabla \times \nabla S(r) = 0.$$

In vector calculus the curl of a gradient is zero. Hence, the curl of a conservative vector field $\mathbf{V}(r)$ is always zero!

• How would we determine that it is conservative via looking at its curl and region? I recall that if the curl is zero AND the region (domain?) is simply connected, it is conservative. Why is this region simply connected? – Twenty-six colours May 7 '17 at 6:24
• @PaulWoch I've edited my answer to address why the curl of a conservative vector field is always zero. – Rumplestillskin May 7 '17 at 6:37

Yes - the vector field is conservative.

The integrand is $\vec {\nabla} f \cdot d \vec r$ where $f$ is the scalar field given by $$f(x,y,z)=\ln x + yz^2$$

The value of the integral depends only on the endpoints of your path.

• Thanks. I think my query is mostly based on the other question - in the other comment on this thread – Twenty-six colours May 7 '17 at 6:24