I was given the following equation: $$f(x)=a\,|x-b|$$ and the information that both $(2,1)$ and $(10,3)$ are solutions for the equation. The question asked to solve for $a$.
This is what I did: $$a=\frac{1}{2-b}\\[10pt]a=\frac{-1}{2-b}\\[10pt]a=\frac{-3}{10-b}\\[10pt]a=\frac{3}{10-b}$$ all of these seem to be possible solutions for the equation, I just need to find the one that will work with both solution sets. I solved and got multiple values for a and b. The ones that worked for both ordered pairs were the solutions $a=\frac12 \text{ and } b=4$ and $a=\frac14\text{ and } b=-2$.
I feel pretty confident about my answer (perhaps wrongly so :) ) but is there a faster, more efficient way to do this?
Your answers are correct, but there is a more efficient way of finding them using what we know about the vertex in this context.
First, note that $f(x) = a|x-b|$ has two transformations, a shift to the right by $b$ and a vertical stretch by $a$. So, we know that the vertex has coordinates $(b,0)$. Since the vertex must be on the $x$-axis, there are only two possible cases here, each with exactly one possible solution: either the vertex is left of $x = 2$ or it's between $x = 2$ and $x = 10$.
Case 1: $b<2$
If the vertex is left of $x = 2$, we know that $(b,0)$, $(2,1)$, and $(10,3)$ are collinear with slope $a$. We start by finding the slope between $(2,1)$ and $(10,3)$:
$$ a = \frac{3-1}{10-2} = \frac{1}{4} . $$
Then, we use $a$ to find $b$:
$$ \frac{1-0}{2-b} = \frac{1}{4} \Rightarrow 2-b = 4 \Rightarrow b = -2 . $$
The first solution is $a = \frac{1}{4}, b = -2$.
Case 2: $ 2 < b < 10$
Here, we use the absolute value's vertical symmetry about the vertex - the slopes must be opposites on either side of the vertex:
$$ \frac{0-1}{b-2} = -\frac{3-0}{10-b} \Rightarrow b-10=3(b-2) \Rightarrow b = 4 . $$
Then, $a$ is the slope to the right of the vertex:
$$ a = \frac{3-0}{10-b} = \frac{3}{10-4} = \frac{1}{2} . $$
The second solution is $a = \frac{1}{2}, b = 4$.