Consider the function $$ f(x) = 3 \cdot |x - a| + b,~\mathrm{where~} a, b \in \mathbb{R}, $$ which satisfies $f(-2) = 1$ and $f \left(- \frac13\right) = 0$. Find the equation of this function.
This problem was given to two friends, Beata and Eva. They both proceeded the same way within the first two steps:
(1) Since it holds $f(-2) = 1$, we get $1 = 3 \cdot |-2 - a| + b$.
(2) Since it holds $f\left(- \frac13\right) = 0$, we get $0 = 3 \cdot \left|- \frac13 - a\right| + b$.
Then they took different approaches:
Beata:
(3) From both equations, she expressed $b$: $$ \begin{aligned} b &= -3 \cdot |-2 - a| + 1 \cr b &= -3 \cdot \left|- \frac13 - a\right| + 0 \end{aligned} $$ Then, she set those expressions equal, resulting in the equation: $$ -3 \cdot |-2 - a| + 1 = -3 \cdot \left|- \frac13 - a\right| + 0 $$
(4) Next, Beata solved the obtained equation by squaring both sides and simplifying: $$ \begin{gather} 1 - 6 \cdot (2 + a) + 9 \cdot (4 + 4a + a^2) = 9 \left(a^2 + \frac23 a + \frac19 \right) \cr 1 - 12 - 6a + 36 + 36a + 9a^2 = 9a^2 + 6a + 1 \cr 24a = -24 \cr a = -1 \end{gather} $$
(5) Finally, she substituted $a = -1$ into the equation $b = -3 \cdot |-2 - a| + 1$ and obtained: $$ \begin{aligned} b &= -3 \cdot |-2 - (-1)| + 1 = -3 \cdot |-2 + 1| + 1 =\cr &= -3 \cdot |-1| + 1 = -3 \cdot 1 + 1 = -3 + 1 = -2 \end{aligned} $$ So, she concluded that the equation of the function is: $$ f(x) = 3 \cdot |x + 1| - 2 $$
Eva:
(3) She expressed $b$ from the equation $0 = 3 \cdot \left|- \frac13 - a\right| + b$ as: $$ b = -3 \cdot \left|- \frac13 - a\right| $$ Then, she substituted $b$ into the equation $1 = 3 \cdot |-2 - a| + b$: $$ 1 = 3 \cdot |-2 - a| - 3 \cdot \left|- \frac13 - a\right| $$ and modified it to the form: $$ -3 \cdot \left|- \frac13 - a\right| = -3 \cdot |-2 - a| + 1 $$
(4) She squared the equation to eliminate the absolute values and then further simplified it: $$ \begin{gather} 9 \cdot \left(a^2 + \frac19 \right) = 9 \cdot (4 + 4a + a^2) + 1 \cr 9a^2 + 1 = 36 + 36a + 9a^2 + 1 \cr -36a = 36 \cr a = -1 \end{gather} $$
(5) Finally, she substituted $a = -1$ into $b = -3 \cdot \left|- \frac13 - a\right|$ and obtained the same result as Beata.
Both friends got the same result. Did they solve the problem correctly?
No, they did not. Each of them made a mistake in their procedures.
No, they did not. Beata made a mistake in her procedure, however Eva worked correctly.
No, they did not. Eva made a mistake in her procedure, however Beata worked correctly.
Yes, both their procedures and results are correct.
Eva repeatedly made mistakes in squaring. Instead of correct $(a + b)^2 = a^2 + 2ab + b^2$, she wrongly squared as $(a + b)^2 = a^2 + b^2$.
Beata made a mistake in step (4). After the correct squaring of the equation: $$ -3 \cdot |-2 - a| + 1 = -3 \cdot \left|- \frac13 - a\right| + 0 $$ there should be one absolute value left. It is: $$ \begin{gather} 1 - 6 \cdot |2 + a| + 9 \cdot (4 + 4a + a^2) = 9 \left(a^2 + \frac23 a + \frac19\right) \cr 1 - 6 \cdot |2 + a| + 36 + 36a + 9a^2 = 9a^2 + 6a + 1 \end{gather} $$ Next, we separate the absolute value: $$ \begin{gather} -6 \cdot |2 + a| = 9a^2 + 6a + 1 - 1 - 36 - 36a - 9a^2 \cr -6 \cdot |2 + a| = -30a - 36 \end{gather} $$ and dividing by $-6$ we obtain: $$ |2 + a| = 5a + 6 $$ We square the equation again: $$ \begin{gather} 4 + 4a + a^2 = 25a^2 + 60a + 36 \cr 24a^2 + 56a + 32 = 0 \cr 3a^2 + 7a + 4 = 0 \end{gather} $$ Then we find roots of the above quadratic equation: $$ \begin{gather} a_{1,2} = \frac{-7 \pm \sqrt{49 - 48}}{6} = \frac{-7 \pm 1}{6} \cr a_1 = \frac{-7 + 1}{6} = -1 \cr a_2 = \frac{-7 - 1}{6} = - \frac43 \end{gather} $$ The check is necessary because we used non-equivalent transformations. It is not difficult to verify that $a_1 = -1$ is a solution while $a_2 = - \frac43$ is not.
For $a = -1$ we get $b = -2$. So truly, our function $f$ is given by the equation: $$ f(x) = 3 \cdot |x + 1| - 2 $$ Both girls arrived at the correct result by chance, but their procedure is incorrect.