# Determining if a vector field is conservative

I have a bad habit of deciding how I would solve the concepts presented to us in lecture before the instructor covers the method. I try my methods immediately and use the textbook method if I hit a road block.

This leads to problems for me.

Right now we are covering line integrals over conservative vector fields. We are determining whether or not a field is conservative with the curl method.

However, I've solved every problem without it.

I take the vector field, integrate the i component wrt x, the j component wrt y, and decide that way. If they differ by an added constant or a function of the other variable, I add the two integrated functions together.

This has always led me to a function that if I find the gradient of it, I get the vector field.

If it is not conservative, it is apparent early on after viewing the two integrated functions.

However, if the curl method wasn't necessary it would not be presented. Where will my method break down?

## Answers and Replies

HallsofIvy
Homework Helper
Your mistake is thinking that you can integrate each component with respect to a single variable and have only an added constant.
If you have
$$\nabla g= \frac{\partial g}{\partial x}\vec{i}+ \frac{\partial g}{\partial y}\vec{j}+ \frac{\partial g}{\partial z}\vec{k}= F_x\vec{i}+ F_y\vec{j}+ F_z\vec{k}$$

Yes, because the partial derivative with respect to x treats y and z as constants, you can integrate $F_x$ with respect to x only but the "constant of integration" may be a function of y and z because you are treating them as constants.

For example, suppose we have $\nabla g= \vec{F}= 2xy\vec{i}+ x^2\vec{j}+ \vec{k}$. Then we can say
$$\frac{\partial g}{\partial x}= 2xy$$
so that $$g= x^2y+ \phi(y,z)$$
where $\phi(y,z)$ is an unknown function of y and z only- which is treated as constants when differentiating with respect to x.

And we also have
$$\frac{\partial g}{\partial y}= x^2$$
so that $$g= x^2y+ \psi(x,z)$$
Comparing those two, its reasonable to think that $g= x^2y+ C$, a constant. But we still have z to handle! From
$$\frac{\partial g}{\partial z}= 1$$
we get $g= z+ \chi(x,u)$ where now it is important that we have added a function of z, not a constant! We might be able to see that $\chi(x,y)= x^2+ C$ and so $g(x, y, z)= x^2y+ z+ C$.

A simpler way to do this is, starting with the first equation, integrate with respect to x to get $g(x,y,z)= x^2y+ \phi(y,z)$. Now, differentiate that, with respect to y, to get
$$\frac{\partial g}{\partial y}= x^2+ \frac{\partial\phi(y,z)}{\partial y}= x^2$$
from which we get
$$\frac{\partial \phi}{\partial y}= 0$$
which means that $\phi$ must not be a function of y. Not that is is a constant, because it still might be a function of z.

Now we have $g= x^2y+ \phi(x)$ and, differentiating with respect to z,
$$\frac{\partial g}{\partial z}= \frac{d\phi}{dz}= 1$$
and from that, $\phi(z)= z+ C$ where C really is a constant because $\phi$ is a function of z only.

That gives $g(x, y, z)= x^2y+ z+ C$.

HOI, I'm on mobile so can't really type out a good reply, but when I said "constant or a function of other variable" I meant to consider any function of variables considered constants during integration.

Ok, back, and armed with itex..

I would just do:

$\int 2xy dx = x^{2}y + n(y,z)$
$\int x^{2} dy = x^{2}y + k(x,z)$
$\int dz = z + q(x,y)$

Which I view as a simple system of equations that can be solved by looking at it, with:
n(y,z) = k(x,z) = z
or q(x,y) = x^{2}y.

Thus f = x^{2}y + z + C

And if the 'system' has no solution then the field is nonconservative.

HallsofIvy
Homework Helper
If all you want to do is determine whether or not it is conservative, rather than actually finding the potential, you can use the "cross condition":
If there exist g such that $\partial g/\partial x= F_x$, $\partial g/\partial y= F_y$, and $\partial g/\partial z= F_z$.

Then $\partial^2g/\partial x\partial y= \partial^2 g/\partial y\partial x$
becomes $\partial F_x/\partial y= \partial F_y/\partial x$
while the other partial derivatives give
$\partial F_x/\partial z= \partial F_z/\partial x$
$\partial F_z/\partial y= \partial F_y/\partial z$

For this particular example, $\vec{F}= 2xy\vec{i}+ x^2\vec{j}+ \vec{k}$
we have
$$\frac{\partial F_x}{\partial x}= 2y= \frac{\partial F_y}{\partial x}$$
$$\frac{\partial F_y}{\partial z}= 0= \frac{\partial F_z}{\partial y}$$
$$\frac{\partial F_z}{\partial x}= 0= \frac{\partial F_x}{\partial z}$$