Let $a$ be a real number. Suppose the function $f(x) = \frac{a}{x-1} + \frac{1}{x-2} + \frac{1}{x-6}$ defined in the interval $3 < x < 5$ attains its maximum at $x=4$. Find the value of $a.$
Source: Hong Kong Team Selection Test 1
Tags: function, algebra
Let $a$ be a real number. Suppose the function $f(x) = \frac{a}{x-1} + \frac{1}{x-2} + \frac{1}{x-6}$ defined in the interval $3 < x < 5$ attains its maximum at $x=4$. Find the value of $a.$