#a<b<c<d#. How do you find the solution(s) of |x-a|+|x-c|=|x-b|+|x-d|? It is verifiable that, for #(a, b, c, d)=(1, 2, 3, 5), x=7/2# is a solution.

2 Answers
Jan 12, 2018

You need case analysis.

Explanation:

There are several cases, in the point view of the value of #x#.

[Case1]
If #x< a#, the equation will be

#-(x-a)-(x-c)=-(x-b)-(x-d)#
#-2x+a+c=-2x+b+d#
#a+c=b+d#

This result is inconsistent with the fact #a< b< c< d#. So there is no solutions in this case.

[Case2]
If #a<= x< b#,

#(x-a)-(x-c)=-(x-b)-(x-d)#
#-a+c=-2x+b+d#
#2x=a+b-c+d#
#x=(a+b-c+d)/2#

For example, if #(a,b,c,d)=(1,2,3,5)#, #x=(1+2-3+5)/2=5/2#.
But this is an inappropriate solution as the result is inconsistent with #1<= x <2#.

Then, proceed to the following cases.
[Case3] #b<= x< c#

#(x-a)-(x-c)=(x-b)-(x-d)#
#-a+c=-b+d#
#a+d=b+c#

If #a+d# equals to #b+c#, every #x# that satisfy #b<= x< c# is the solution. Otherwise, no #x# in this domain will be the answer.

[Case4] #c<= x< d#

#(x-a)+(x-c)=(x-b)-(x-d)#
#2x-a-c=-b+d#
#2x=a-b+c+d#
#x=(a-b+c+d)/2#

When #(a,b,c,d)=(1,2,3,5)#, the solution is
#x=(1-2+3+5)/2=7/2# and this is the appropriate solution.(#3<= 7/2 <5#

[Case5] #d<= x#
In this case, there is no solution. The reason is same as [Case1].

Jan 12, 2018

Here is the alternative way(drawing the graph)

Explanation:

Let #f(x)=abs(x-a)+abs(x-c)#.

This can be written as a piecewise function:
#f(x)=-2x+a+c# #(x< a)#
#f(x)=-a+c# #(a <= x < c)#
#f(x)=2x-a-c# #(c<= x)#

You can write #g(x)=abs(x-b)+abs(x-d)# as a piecewise function in the same way.

Then, draw the two graphs: #y=f(x)# and #y=g(x)#.
The graphs below is for #(a,b,c,d)=(1,2,3,5)#. You can see that the two graphs crosses at #(7/2,3)#.
graph{(abs(x-1)+abs(x-3)-y)(abs(x-2)+abs(x-5)-y)=0 [-6.05, 13.95, -1.64, 8.36]}