Multivariable calculus

Curl of the Vector Field (y e^z, xz, e^z)

The curl of the field with components y times e to the z, xz, and e to the z is the vector with components -x, y times e to the z, and z minus e to the z. All three differences survive. Only the last has two nonzero terms, so it is the one worth double checking.

P(x,y,z)=yezP(x,y,z) = y e^{z}
Q(x,y,z)=xzQ(x,y,z) = xz
R(x,y,z)=ezR(x,y,z) = e^{z}
×F=x, yez, zez\nabla \times \mathbf{F} = \langle -x,\ y e^{z},\ z - e^{z} \rangle

Write the six partials, then subtract

With a mixed field it pays to list the partials before assembling anything. Six are needed, and here two of them are zero because R=ezR = e^{z} contains neither xx nor yy.

  • Py=ez\frac{\partial P}{\partial y} = e^{z} and Pz=yez\frac{\partial P}{\partial z} = y e^{z}, since P=yezP = y e^{z} is linear in yy and exponential in zz.
  • Qz=x\frac{\partial Q}{\partial z} = x and Qx=z\frac{\partial Q}{\partial x} = z, from the product xzxz.
  • Rx=0\frac{\partial R}{\partial x} = 0 and Ry=0\frac{\partial R}{\partial y} = 0.
RyQz=0x=x\frac{\partial R}{\partial y} - \frac{\partial Q}{\partial z} = 0 - x = -x
PzRx=yez0=yez\frac{\partial P}{\partial z} - \frac{\partial R}{\partial x} = y e^{z} - 0 = y e^{z}
QxPy=zez\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} = z - e^{z}

Two checks that catch a slip

First, evaluate somewhere easy. At (1,2,0)(1,2,0) the exponential is 11, so the field is 2,0,1\langle 2, 0, 1 \rangle and the curl should be 1,2,1\langle -1, 2, -1 \rangle. Recomputing the three differences by hand at that point takes ten seconds and catches a misplaced partial. Give the coordinates different values while you are choosing: at (1,1,0)(1,1,0) the two partials of PP both come out 11, and a swap between them survives the check.

Second, look at the third component on its own. The inequality ez>ze^{z} > z holds for every real zz, since ezze^{z} - z has its minimum value 11 at z=0z = 0. So zez1z - e^{z} \leq -1 always.

zez1for all real z, with equality only at z=0z - e^{z} \leq -1 \quad \text{for all real } z, \text{ with equality only at } z = 0

That single fact settles a question the algebra would otherwise leave open: the curl is never the zero vector, at any point of space, so this field is not conservative on any region however small.

The mistake: differentiating the exponential in the wrong variable

P=yezP = y e^{z} has two very different partials, and they are easy to swap. In yy, the exponential is a constant multiplier and the answer is eze^{z}. In zz, the yy is the constant multiplier and the answer is yezy e^{z}.

Swapping them puts yezy e^{z} into the third component and eze^{z} into the second, which gives x, ez, zyez\langle -x,\ e^{z},\ z - y e^{z} \rangle: a wrong answer that looks entirely plausible because every symbol on the page is one that belongs somewhere.

The point check above kills it. At (1,2,0)(1,2,0) the correct curl is 1,2,1\langle -1, 2, -1 \rangle while the swapped version gives 1,1,2\langle -1, 1, -2 \rangle, so the two disagree in both of the last two slots. Test at (1,1,0)(1,1,0) instead and both return 1,1,1\langle -1, 1, -1 \rangle, which is exactly why the spot check needs a point with distinct coordinates.

All three components are verified numerically on every build by differentiating P, Q and R at seeded sample points.

Frequently asked questions

Could this field be conservative on some small region?

No region at all. The third curl component is zezz - e^{z}, and since ez>ze^{z} > z for every real zz, that component is at most 1-1 and never zero. There is no point of space where the curl vanishes, let alone an open set, so no potential exists anywhere.

What is the divergence of this field?

It is eze^{z}. The matched partials are Px=0\frac{\partial P}{\partial x} = 0, Qy=0\frac{\partial Q}{\partial y} = 0 and Rz=ez\frac{\partial R}{\partial z} = e^{z}. Both operators return something nonzero here, which is the ordinary situation; fields where one or both vanish are the special cases worth naming.