Suppose that we have many towns spread across the country and we are trying to connect them with a network of roads. If we would like to do so by laying as little road as possible, how do we do it? In this blog post, we will use Calculus to tackle a special case of this optimization problem.

**The Case of Four Towns Arranged in a Square**

Let us suppose that we have four towns arranged so that they form the four vertices of a square. Our task is then to connect them by the shortest network of roads possible so that each town is still connected to each other town. To make our problem more concrete, let us label our four towns A, B, C, and D, and assume that they are at the vertices of a square with side length 1 each.

We then quickly notice that one of our roads is superfluous. If we remove any one of our four roads, we get a road system of length 3 that still connects our four cities.

**Reasoning Our Way to the Ideal Configuration of Roads**

It turns out that a similar pattern of roads will be the most efficient way of connecting our four cities. To see why, we could imagine that we had an optimal configuration of roads. Clearly, this set of roads should never venture outside of our original square as that would be suboptimal. There must be a path connecting city A to city C, and a path connecting city B to city D. These paths must cross each other at least once but may do so many times. Let us call the first time that they cross point P and the last time that they cross point Q. Then, our network must have just consisted of the straight segments AP, BP, PQ, QC, and QD, as any other such network would have been longer.

**Most Efficient Road System Using Calculus**

We suppose that the amount of inset of the center joining road from each side of the square is x. Then, our goal is to find the x that minimizes the total length of the road.

## As with most calculus minimization functions, our process has **three steps**:

## Step 1:

## Step 2:

## Step 3:

Voila! We have successfully used calculus to build the most efficient road network connecting our four towns.

*Mathematics – from high school math to graduate school math – is one of our most frequently requested subjects. Teaching math is notoriously difficult and we maintain a staff of mathematicians who are committed to the art of teaching. There is no course or standardized test that we do not have extensive experience teaching. We work with students who loathe math and students who love it, students who haven’t done math in a decade and students who work on mathematical problems every day. Many of our students work with tutors, like Jane, to address courses or exams – such as Geometry, Linear Algebra, Differential Equations – but we also work with students looking to explore more advanced or unconventional topics (like the mathematics of poker, or algrabraic topology, for example).*

*Check out some of our previous blog posts related to the study of mathematics below!*

## The Key to Mastering Mathematics? Quit Memorizing.

## How To Multiply Matrices Quickly and Correctly in Six Easy Steps

## How to Study for a Math Test: 4 Essential Tips