The formula $R = \rho L/A$ assumes the same cross section all the way along. Real conductors are not always so tidy: a tapered probe, a cone-shaped contact, or a cable where current flows outward through the insulation. For those, cut the conductor into thin slices, find each slice's resistance, and add.
🔑 Key idea
Slices that carry the current one after another are in series, so their resistances add:
$$R = \int \frac{\rho\,dx}{A(x)}.$$
$dx$ is a slice's thickness along the current and $A(x)$ its area across the current.
💡 Why it works
A thin slice is so thin that its area is nearly constant across it, so the ordinary formula works for it: $dR = \rho\,dx/A(x)$. The same current passes through every slice in turn, which is exactly what series means, and series resistances add. The sum of infinitely many thin slices is an integral, which substitution usually handles.
A nichrome conductor $20\ \text{cm}$ long, widening from $1\ \text{mm}$ to $3\ \text{mm}$ in radius. The thin end's slices (darker) contribute most of the resistance.
Worked examples
✏️ Worked example: A cone-shaped conductor
A nichrome conductor ($\rho = 1.1 \times 10^{-6}\ \Omega\cdot\text{m}$) is $20\ \text{cm}$ long; its radius grows evenly from $1.0\ \text{mm}$ to $3.0\ \text{mm}$. Find its resistance for current from end to end.
The radius is $r(x) = r_1 + \dfrac{r_2 - r_1}{L}x$, so $dR = \dfrac{\rho\,dx}{\pi r(x)^2}$.
Check: if $r_1 = r_2$ this becomes $\rho L/(\pi r^2)$, the familiar formula.
Answer: $R \approx 0.0233\ \text{Ω}$
✏️ Worked example: Current flowing outward
A coaxial cable $0.50\ \text{m}$ long has a thin inner conductor of radius $1.0\ \text{cm}$ and an outer conductor of radius $3.0\ \text{cm}$. The space between is filled with a material of resistivity $100\ \Omega\cdot\text{m}$. What is the resistance for current leaking straight outward?
Now the "slices" are thin cylindrical shells: thickness $dr$ along the current, area $2\pi rL$ across it, and the current crosses them in series.
The slices also tell you where the heat goes. With the same current through every slice, each one turns $I^2\,dR$ into heat, so the thin end, with the largest $dR$ per length, runs hottest. That is why a wire with a nick or a narrow neck heats up and fails right there, and why fuses are made with a deliberately thin section.
⚠️ Common mistake
Using one area for the whole conductor. Taking the average radius, $2.0\ \text{mm}$, in the first example gives $\rho L/(\pi r_{\text{avg}}^2) = 0.0175\ \text{Ω}$, 25% too small. The thin end resists far more than the wide end, and $1/r^2$ punishes thinness more than an average can show. Check: your answer should depend on the area along the whole length, so an integral (or at least a slice-by-slice sum) must appear.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.