How to find values of a and b for the absolute valued function:
f : x -> |x-a| + b,
for values: f(3) = 3, f(-1) = 3?
I am student of O'Levels. In my book additional mathematics, in chapter Functions and in the topic Absolute Value Functions. I have tried it like this:
(i) f(3) = 3
|3 - a| + b = 3
3 - a + b = 3 OR -3 + a + b = 3
-a + b = 0 OR a + b = 6
adding (-a + b = 0) into (+a + b = 6)
=> 2b = 6
=> b = 3 and hence a=3 (a+b=6 => a+3 = 6)
these values are different than the book which say a=1 and b=1
we have
$f(3)=|3-a|+b=3$
and
$f(-1)=|-1-a|+b=3$.
this gives
$|3-a|=|-1-a|$ and
$3-a=1+a$ which gives
$\color{red}{a=1}$
$\color{red}{b=1}$.
so
$\color{green}{f(x)=|x-1|+1}$.
check
$f(3)=|3-1|+1=3$.
$f(-1)=|-1-1|+1=|2|+1=3$. Correct !.