Homework Help: Piecewise Defined Function

1. Mar 7, 2007

1. The problem statement, all variables and given/known data
The equation $$\left| {x + a} \right| = \left| {x - b} \right|$$ has exactly one solution; at x=2. Find the value(s) of a and b

2. The attempt at a solution
Here is the way in which I have approached the situation:
$$\begin{array}{l} \left| {x + a} \right| = \left| {x - b} \right| \\ x + a = x + b \\ \end{array}$$
this solution is not possible as the x's on either side of the equation cancel each other out, and a is not equal to b, so;
$$\begin{array}{l} x + a = - x + b \\ 2x + a = b \\ 4 + a = b \\ a = k \\ a = k + 4 \\ \end{array}$$

However I'm not sure on my my final answer, as I have not evaluated the values for a or b, as i have left them in the term of k. However what I have interpreted from the question, I have not been given enough information. Thank you to those who reply, and correct me if anything I have stated is wrong

2. Mar 7, 2007

theperthvan

Not sure how you got this step:
$$\begin{array}{l} \left| {x + a} \right| = \left| {x - b} \right| \\ x + a = x + b \\ \end{array}$$
If you are taking both to be positive, it should be $$x + a = x - b$$
Then you can kill the x's. so a=-b.

3. Mar 12, 2007

ive used those steps as a simply does not equal -b as the x can be anywhere on the number line. by stating that a=-b, x is a fixed point at zero, which is incorrect as z is given the value of 2

or is that completely wrong?
thanks