No pressure, no diamonds, Thomas Carlyle.
A vector field is an assignment of a vector $\vec{F}$ to each point $(x, y)$ in the space. In two dimensions, this is written or expressed as $\vec{F}(x,y) = P(x,y)\hat{\mathbf{i}} + Q(x,y)\hat{\mathbf{j}}$, where $P$ and $Q$ are scalar functions of $x$ and $y$, and $\hat{\mathbf{i}}$ and $\hat{\mathbf{j}}$ are the standard unit vectors.
A vector field on a plane can be visualized as a continuous collection of arrows, each attached to a specific coordinate point on the plane. These arrows represent vectors with specific magnitudes and directions.
In physics, work is defined as the energy transferred when a force acts upon an object, causing a displacement. If the force is constant and the path is a straight line, work is simply the dot product of force and displacement ($W = \vec{F} \cdot \vec{d}$).
However, what if the path is curved and the force changes at every point in space? We must use a line integral. The work done by a force field $\vec{F}$ moving an object along a trajectory $C$ is defined as: $W = \int_{C} \vec{F} \cdot d\vec{r} = \int_{C} (P dx + Q dy)$
Alternatively, we can express this using the unit tangent vector $\hat{\mathbf{T}}$ and arc length $s$: $W = \int_{C} \vec{F} \cdot \hat{\mathbf{T}} ds$
The Intuition: The dot product $\vec{F} \cdot d\vec{r}$ isolates the component of the force vector that points exactly in the direction of the curve at that specific microscopic instant. Forces pushing perpendicular to your motion do zero work!
A vector field is conservative if there exist a scalar function $f$ such that $\vec{F} = \nabla f$. This means the vector field is exactly the gradient of some underlying scalar field $f$. This scalar function is known or referred to as the potential function associated with the vector field.
Theorem. The Fundamental Theorem of Calculus for Line Integral. If $\vec{F}$ is a conservative vector field in a simply connected region of space (i.e., a region with no holes), and if $f$ is a scalar potential function for $\vec{F}$ in that region, then the work done moving from point $P_0$ to point $P_1$ is entirely independent of the path taken. Indeed, it depends only on the endpoints: $\int_{C} \vec{F}\cdot d\vec{r} = \int_{C} \nabla f\cdot d\vec{r} = f(P_1)-f(P_0)$ where $P_0$ and$P_1$ are the initial and final points of the curve $C$, respectively.

A line integral in space extends these concepts to three dimensions, allowing us to integrate a function along a 3D curve. This mathematical tool is the backbone of advanced physics, used to calculate:
Consider a vector field $\vec{F}$ in three dimensional space. A vector field can be expressed as: $\vec{F} = P\hat{\mathbf{i}} + Q\hat{\mathbf{j}}+R\hat{\mathbf{k}}$ where $P$, $Q$, and $R$ are functions of the coordinates $x, y$, and $z$ respectively. Each of these functions represents the components of the vector field in the $\hat{\mathbf{i}}$ ($x$-axis), $\hat{\mathbf{j}}$ ($y$-axis), and $\hat{\mathbf{k}}$ ($z$-axis) directions, respectively.
The vector field $\vec{F}$ can represent various physical phenomena where a vector quantity is defined at every point in space, such as:
To perform a line integral, we first need to describe the curve $C$ along which we are integrating. A curve in three dimensions can be parametrized by a parameter $t$ (often representing time), which varies over an interval $[a, b]$. The curve is represented as: $\vec{r}(t)=\langle x(t), y(t), z(t)\rangle $ where $a \leq t \leq b$. The functions $x(t), y(t)$, and $z(t)$ are the coordinates that describe the positions of points on the curve $C$ as the parameter $t$ varies from $a$ to $b$.
The line integral of the vector field $\vec{F}$ along the curve $C$ is defined as: $\int_{C} \vec{F} \cdot d\vec{r}$ where $d\vec{r}$ represents an infinitesimal vector (small step) strictly tangent to the curve at each point. The vector $d\vec{r}$ can be expressed as: $d\vec{r} = \langle dx, dy, dz\rangle $.
In the context of physics, when the vector field represents a force, the line integral of the vector field along a curve $C$ gives the work done by the force as it moves a particle along the curve.
To compute the line integral, we express $d\vec{r}$ in terms of the parameter $t$. Given the parametrization $\vec{r}(t)=\langle x(t), y(t), z(t)\rangle $, the differential vector $d\vec{r}$ can be written as: $d\vec{r} = \frac{d\vec{r}}{dt}dt = \langle \frac{dx}{dt}, \frac{dy}{dt}, \frac{dz}{dt}\rangle dt$.
Now, substituting $d\vec{r}$ into the line integral expression: $\int_{C} \vec{F} \cdot d\vec{r} = \int_{a}^{b} \vec{F}(\vec{r}(t)) \cdot \frac{d\vec{r}}{dt}dt$
Given the vector field $\vec{F} = P\hat{\mathbf{i}} + Q\hat{\mathbf{j}}+R\hat{\mathbf{k}}$, we can express it as: $\vec{F}(\vec{r}(t)) = \langle P(x(t), y(t), z(t)), Q(x(t), y(t), z(t)), R(x(t), y(t), z(t))\rangle $
Thus, the dot product $\vec{F} \cdot d\vec{r}$ becomes, $\vec{F} \cdot d\vec{r} = \langle P, Q, R \rangle \cdot \left\langle \frac{dx}{dt}, \frac{dy}{dt}, \frac{dz}{dt} \right\rangle dt = \left( P \frac{dx}{dt} + Q \frac{dy}{dt} + R \frac{dz}{dt} \right) dt$
Substituting this into the line integral gives: $\int_{C} \vec{F} \cdot d\vec{r} = \int_{a}^{b} (P\frac{dx}{dt} + Q\frac{dy}{dt} + R\frac{dz}{dt})dt = \int_{a}^{b} (P(x(t), y(t), z(t))\frac{dx}{dt} + Q(x(t), y(t), z(t))\frac{dy}{dt} + R(x(t), y(t), z(t))\frac{dz}{dt})dt$
Conclusion: Given a vector field $\vec{F} = \langle P(x, y, z), Q(x, y, z), R(x, y, z)\rangle $ and a curve $C$ parametrized by $\vec{r}(t)=\langle x(t), y(t), z(t)\rangle $, the line integral is defined as: $\int_{C} \vec{F} \cdot d\vec{r} = \int_{a}^{b} (P\frac{dx}{dt} + Q\frac{dy}{dt} + R\frac{dz}{dt})dt = \int_{a}^{b} (P(x(t), y(t), z(t))\frac{dx}{dt} + Q(x(t), y(t), z(t))\frac{dy}{dt} + R(x(t), y(t), z(t))\frac{dz}{dt})dt$
Let’s work through exercises to illustrate these concepts.
Work done by a force field along a path is calculated using the line integral of the vector field along the curve. If $\vec{F} =\langle P(x,y),Q(x,y)\rangle $ is the vector field and $C$ is the curve, the work done is given by the line integral: $\int_{C} \vec{F}\cdot d\vec{r}$ where $d\vec{r}$ is the differential displacement vector along the curve $C$. The vector field $\vec{F}\cdot d\vec{r}$ represents the dot product of the force field with the tangent to the curve.
Understanding the Curve. $(-1, 1)$ to $(2, 4)$ is not a line segment, they lie on the parabola $y = x^2$. To find the work done along this curve, we can parametrize the curve using a parameter t. A natural choice for this parameterization is: $x = t, y = x^2= t^2$.
Parameter Range. Since $x = t$ ranges from $-1$ to $2$, the parameter $t$ also varies from $-1$ to $2$, $-1 \leq t \leq 2$.
Compute the Differentials. $dx = \frac{d}{dt}(t)dt = dt, dy = \frac{d}{dt}(t^2)dt = 2tdt$
Substitute Parametrization into the vector field $\vec{F}$: $P = x\sin(y) = t\sin(t^2), Q = y = t^2$.
Evaluate the Line Integral. $\int_{C} \vec{F} \cdot d\vec{r} = \int_{C} [P\frac{dx}{dt}+Q\frac{dy}{dt}]dt$ =[Substitute $P, Q$, and their differentials:] $\int_{-1}^{2} [t\sin(t^2)\cdot 1+t^2\cdot 2t]dt = \int_{-1}^{2} [t\sin(t^2)+2t^3]dt$
Integrate each term separately.
$\int_{-1}^{2} t\sin(t^2)dt=$[To solve this integral, we use a substitution method. Let $u = t^2$. Then, $du = 2tdt, \frac{1}{2}du = tdt$] $\frac{1}{2}\int_{-1}^{2} \sin(u)du = -\frac{1}{2}\cos(u)+C =$[Substitute back $u = t^2$] $\frac{-1}{2}\cos(t^2)+C$
For the second term: $\int_{-1}^{2} 2t^3dt = 2\frac{t^4}{4} = \frac{t^4}{2}$
Combine the results and evaluate the definite integral: $\left[ \frac{-1}{2}\cos(t^2) +\frac{t^4}{2} \right]_{-1}^{2} =$
$[\frac{-1}{2}\cos(4) +\frac{16}{2}]-[\frac{-1}{2}\cos(1) +\frac{1}{2}] = \frac{-1}{2}\cos(4) + 8 + \frac{1}{2}\cos(1)-\frac{1}{2} = \frac{-1}{2}\cos(4) + \frac{1}{2}\cos(1) +\frac{15}{2}.$
Conclusion: The work done by the vector field $\vec{F} = \langle x\sin(y), y\rangle $ along the curve $y = x^2$ from $(-1, 1)$ to $(2, 4)$ is $\int_{C} \vec{F} \cdot d\vec{r} =\frac{-1}{2}\cos(4) + \frac{1}{2}\cos(1) +\frac{15}{2}.$
Given a vector field $\vec{F} = \langle P(x, y, z), Q(x, y, z), R(x, y, z)\rangle $ and a curve $C$ parametrized by $\vec{r}(t)=\langle x(t), y(t), z(t)\rangle $, the line integral is defined as: $\int_{C} \vec{F} \cdot d\vec{r} = \int_{a}^{b} (P\frac{dx}{dt} + Q\frac{dy}{dt} + R\frac{dz}{dt})dt = \int_{a}^{b} (P(x(t), y(t), z(t))\frac{dx}{dt} + Q(x(t), y(t), z(t))\frac{dy}{dt} + R(x(t), y(t), z(t))\frac{dz}{dt})dt$
Compute the Differentials: dx = $\frac{d}{dt}(\cos(t))dt = -\sin(t)dt, dy = \cos(t)dt, dz = 2tdt$
Substitute Parametrization into the vector field $\vec{F}$: $P = y = \sin(t), Q = x = \cos(t), R = z = t^2.$
Evaluate the Line Integral.
$\int_{C} \vec{F} \cdot d\vec{r} = \int_{0}^{2\pi} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt$ =[Substitute $P, Q, R$, and their differentials:] $\int_{0}^{2\pi}[\sin(t)(-\sin(t))+\cos(t)\cos(t)+t^2(2t)]dt =[\text{Simplifying inside the integral:}] \int_{0}^{2\pi} [-\sin^2(t)+\cos^2(t)+2t^3]dt$
Integrate Each Term Separately.
We can use the identities, $\sin^2(t)=\frac{1-\cos(2t)}{2}, \cos^2(t)=\frac{1+\cos(2t)}{2}$
$\int_{0}^{2\pi} -\sin^2(t)dt = -\frac{1}{2}\int_{0}^{2\pi}(1-\cos(2t))dt = -\frac{1}{2}(t-\frac{1}{2}\sin(2t))\bigg|_{0}^{2\pi} = -\frac{1}{2}(2\pi-0) = -\pi$
$\int_{0}^{2\pi} \cos^2(t)dt = \frac{1}{2}\int_{0}^{2\pi}(1+\cos(2t))dt = \frac{1}{2}(t+\frac{1}{2}\sin(2t))\bigg|_{0}^{2\pi} = \frac{1}{2}(2\pi-0) = \pi$
$\int_{0}^{2\pi} 2t^3dt = \frac{1}{2}t^4\bigg|_{0}^{2\pi} = \frac{(2\pi)^4}{2}-\frac{0^4}{2} = 8\pi^4$
Combining everything: $-\pi + \pi + 8\pi^4 = 8\pi^4$
Conclusion: $\int_{C} \vec{F} \cdot d\vec{r} = 8\pi^4$
Given a vector field $\vec{F} = \langle P(x, y, z), Q(x, y, z), R(x, y, z)\rangle $ and a curve $C$ parametrized by $\vec{r}(t)=\langle x(t), y(t), z(t)\rangle $, the line integral is defined as: $\int_{C} \vec{F} \cdot d\vec{r} = \int_{a}^{b} (P\frac{dx}{dt} + Q\frac{dy}{dt} + R\frac{dz}{dt})dt = \int_{a}^{b} (P(x(t), y(t), z(t))\frac{dx}{dt} + Q(x(t), y(t), z(t))\frac{dy}{dt} + R(x(t), y(t), z(t))\frac{dz}{dt})dt$
Compute the Differentials, dx = $\frac{d}{dt}(t^3)dt = 3t^2dt, dy = 2tdt, dz = dt$
Substitute Parametrization into the vector field $\vec{F}$: $P = yz = t^2\cdot t = t^3, Q = zx = t^2\cdot t = t^4, R = xy = t^3t^2 = t^5$.
Evaluate the Line Integral.
$\int_{C} \vec{F} \cdot d\vec{r} = \int_{0}^{1} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt $ =[Substitute $P, Q, R$, and their differentials:]$ \int_{0}^{1} [t^3\cdot 3t^2+t^4\cdot 2t+ t^5\cdot 1] dt =[\text{Simplifying inside the integral:}] \int_{0}^{1} 6t^5dt = t^6\bigg|_{0}^{1} = 1.$
Conclusion. The work done by the vector field $\vec{F} = \langle yz, xz, xy\rangle $, along the curve $C$ parametrized by $x = t^3, y = t^2, z = t, 0 \leq t \leq 1$ is: $\int_{C} \vec{F} \cdot d\vec{r} = 1$.
Notice that $\vec{F} = \langle yz, xz, xy \rangle$ is a conservative vector field. We can find a scalar potential function $f(x,y,z)$ such that $\nabla f = \vec{F}$.
By closer inspection, we observe that the scalar function $f(x,y,z) = xyz$ fulfills this condition: $\nabla f = \left\langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right\rangle = \langle yz, xz, xy \rangle = \vec{F}$
Because the field is conservative, the integral is path-independent! We only need the starting point ($t=0$) and ending point ($t=1$):
Applying the Fundamental Theorem of Line Integrals: $\int_{C} \vec{F} \cdot d\vec{r} = f(P_1) - f(P_0) = f(1,1,1) - f(0,0,0) = (1)(1)(1) - (0)(0)(0) = 1$
The curve $C'$ consists of three distinct segments:
The goal is to evaluate the line integral $\int_{C'} \vec{F} \cdot d\vec{r}$ along the piecewise curve.

The line integral of the vector field $\vec{F}$ along the curve $C$’ is: $\int_{C'} \vec{F}d\vec{r} = \int_{C'} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt = \int_{C'} [yzdx +xzdy + xydz]dt$
Since C′ is a piecewise curve consisting of three segments, the line integral can be broken down into three separate integrals, one for each segment (we exploit the property that integrals are additive): $\int_{C'} \vec{F}d\vec{r} = \int_{C_1} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt + \int_{C_2} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt + \int_{C_3} [P\frac{dx}{dt}+Q\frac{dy}{dt}+R\frac{dz}{dt}]dt$
Total Work Done. Adding up the contributions from each segment: $\int_{C'} \vec{F}d\vec{r} = 0 + 0 + 1 = 1$
We have calculated the work by evaluating three separate integrals. However, because $\vec{F} = \langle yz, xz, xy \rangle$ is a conservative vector field, it can be expressed as the gradient of a scalar potential function: $\vec{F} = \nabla f = \nabla (xyz) = \langle yz, xz, xy \rangle$ where $f(x, y, z) = xyz$.
For conservative vector fields, the line integral between two points depends only on the endpoints and not on the path taken. This means that for any two curves $C$ (a straight line) and $C'$ (our stepped piecewise curve) connecting the same points, the line integrals will be identical.
Using the Fundamental Theorem of Calculus for Line Integrals between $P_0(0, 0, 0)$ and $P_1(1, 1, 1)$: $\int_{C'} \vec{F} \cdot d\vec{r} = \int_{C'} \nabla f \cdot d\vec{r} = f(P_1) - f(P_0) = f(1, 1, 1) - f(0, 0, 0) = 1 - 0 = 1$
Both methods obviously yield exactly $1$, but the potential function skips the integration entirely!
In calculus, a vector field $\vec{F} = \langle P, Q, R\rangle $ is considered conservative if it can be expressed as the gradient of some scalar potential function $f(x, y, z)$. In other words, there exists a scalar function $f$ such that: $\vec{F} = \nabla f = \langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\rangle $.
If such a function $f$ exists, it means that the vector field $\vec{F}$ is a gradient field and has a few important properties, such as the fact that the line integral of $\vec{F}$ between two points depends only on the endpoints, not on the path taken.
To determine if a vector field $\vec{F}= \langle P, Q, R\rangle $ is conservative, you can check the following criteria:
A much cleaner way to state this is using the Curl operator. A vector field is conservative if and only if it is “irrotational,” meaning it has zero curl at all points: $\nabla \times \vec{F} = \left( \frac{\partial R}{\partial y} - \frac{\partial Q}{\partial z} \right)\hat{\mathbf{i}} + \left( \frac{\partial P}{\partial z} - \frac{\partial R}{\partial x} \right)\hat{\mathbf{j}} + \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right)\hat{\mathbf{k}} = \vec{0}$.
When given a vector field $\vec{F} = \langle P, Q, R\rangle$, follow these steps to test if it is conservative:
The vector field $\vec{F} = \langle P, Q, R\rangle $ is conservative if there exist a scalar potential function $f$ such that: $\vec{F} = \nabla f = \langle \frac{\partial f}{\partial x},\frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\rangle $. In other words, the vector field is conservative if it can be written as the gradient of some scalar function $f$.
To prove a field is conservative, we must verify two conditions: the domain must be simply connected, and the curl must be zero (which is equivalent to checking the equality of mixed partial derivatives).
An exact differential form means that it can be written as the differential of some scalar potential function $f(x, y, z)$, i.e., $df = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy + \frac{\partial f}{\partial z}dz = Pdx + Qdy + Rdz$. This implies the vector field $\vec{F}$ is conservative.
$\vec{F} = \langle P, Q, R\rangle $ where $P = axy, Q = x^2 +z^3, R = byz^2-4z^3$.
To check if the differential form is exact, we need to verify the equality of mixed partial derivatives:
Thus, the values of $a$ and $b$ such that the differential form is exact are: $a = 2$ and $b = 3$. The exact differential form becomes $2xydx + (x^2+z^3)dy +(3yz^2 -4z^3)dz$
Approach A: Using Line Integrals (The Geometric Method)
Because the field is conservative, the line integral is path-independent. We can find the potential at any point $(x, y, z)$ by integrating from the origin $(0,0,0)$ to $(x,y,z)$ along the easiest possible path: a “staircase” along the coordinate axes (something similar to Figure B).

To prevent variable confusion, we will use $t$ as our parameter for integration.
Adding these up, the potential function is the sum of the work done along the three paths: $f(x, y, z) = 0 + x^2 y + yz^3 - z^4 = x^2 y + yz^3 - z^4 + C$
Approach B: Using the Algebraic Gradient Method. We find a function $f(x, y, z)$ such that $\vec{F} = \nabla f$.
Step 1. Check the Conservative Criteria. The vector field $\vec{F}$ is defined in $\mathbb{R}^3$ (all of three-dimensional space), which is a simply connected domain. In $\mathbb{R}^3$, any closed loop can be contracted to a single point, and there are no “holes”, “tunnels”, “obstacles”, or “missing points” that could prevent the field from being conservative.
Compute the partial derivatives. We verify the mixed partial derivatives for the components $P = y\cos(x) + y$, $Q = \sin(x) + x$, and $R = 1$:
$\star$ $P_y = \cos(x) + 1$ and $Q_x = \cos(x) + 1 \implies P_y = Q_x$
$\star$ $P_z = 0$ and $R_x = 0 \implies P_z = R_x$
$\star$ $Q_z = 0$ and $R_y = 0 \implies Q_z = R_y$
All mixed partials match. The field is conservative.
Step 2. Construct the Potential function.
Step 3: Evaluate the Line Integral
Because the field is conservative, we do not need to parameterize a path. We invoke the Fundamental Theorem of Calculus for Line Integrals, which states that the work done is simply the difference in the potential function between the final and initial points: $\int_{C} \vec{F} \cdot d\vec{r} = f(\pi, 1, 3) - f(0, 2, 1)$
Evaluate the potential at the final point $(\pi, 1, 3)$: $f(\pi, 1, 3) = 1\sin(\pi) + (1)(\pi) + 3 + C = 0 + \pi + 3 + C = \pi + 3 + C$
Evaluate the potential at the initial point $(0, 2, 1)$: $f(0, 2, 1) = 2\sin(0) + (0)(2) + 1 + C = 0 + 0 + 1 + C = 1 + C$
Subtract the initial state from the final state: $\int_{C} \vec{F} \cdot d\vec{r} = (\pi + 3 + C) - (1 + C) = \pi + 2$
The line integral evaluates precisely to $\pi + 2$.