A spring has a length of 12 inches when a 2-pound weight is attached, and a length of 18 inches when a 5-pound weight is attached. Use the rate of change to find the length of the spring when no weight were attached.

Let's denote the length of the spring with no weight attached as $x$ inches.

From the given information, we can form two equations:

When a 2-pound weight is attached, the length of the spring is 12 inches:
$x + 2 = 12$

When a 5-pound weight is attached, the length of the spring is 18 inches:
$x + 5 = 18$

Solving these equations, we can find the value of $x$:
$x = 12 - 2 = 10$ (from the first equation)
$x = 18 - 5 = 13$ (from the second equation)

Since the rate of change of the spring length is linear, we can take the average of the two values of $x$ to find the length of the spring when no weight is attached:

$\frac{10 + 13}{2} = \frac{23}{2} = 11.5$

Therefore, the length of the spring when no weight is attached is 11.5 inches.