There is exactly one value of $x$ for which the distance from $(5,6)$ to $(3x-1,ax+5)$ is $4$. If $a \neq 0,$ what is $a$?
The distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) in the Cartesian plane is given by the distance formula:
\[d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.\]
In this case, we are given the points \((x_1, y_1) = (5, 6)\) and \((x_2, y_2) = (3x - 1, ax + 5)\), and we know that the distance \(d\) is \(4\):
\[4 = \sqrt{(3x - 1 - 5)^2 + (ax + 5 - 6)^2}.\]
Simplify inside the square root:
\[16 = (3x - 6)^2 + (ax - 1)^2.\]
Expand:
\[16 = 9x^2 - 36x + 36 + a^2x^2 - 2ax + 1.\]
Combine like terms:
\[16 = (9 + a^2)x^2 - (36 + 2a)x + 37.\]
Now, we want to find the value of \(a\) for which there is exactly one value of \(x\) that satisfies this equation. For there to be exactly one solution, the quadratic equation must have a discriminant of \(0\):
\[(36 + 2a)^2 - 4(9 + a^2)(37) = 0.\]
Simplify and solve for \(a\):
\[1296 + 288a + 4a^2 - 1332 - 4a^2 = 0.\]
Simplify:
\[288a - 36 = 0.\]
Solve for \(a\):
\[a = \frac{36}{288} = \frac{1}{8}.\]
Therefore, the value of \(a\) is \(\boxed{\frac{1}{8}}\).