Find $a\in\mathbb{R}$ such that $\int_1^2 \frac 1{|x-a|+1}dx=\ln a+\ln(3-a)$ 
Find $a\in\mathbb{R}$ such that $\int_1^2 \frac 1{|x-a|+1}dx=\ln a+\ln(3-a)$

My atempt is simple: $$I=\int_1^2\frac 1{|x-a|+1}dx=\ln(\frac {|2-a|+1}{|1-a|+1})$$But I think that's not really the way to go since it can't bring me nowhere near the answer.. How should I approach this kind of problems?
 A: The $|x-a|$ term causes problems when the point $a$ is in the midst of the integration interval $[1,2]$. When $a\leq 1$, resp.,  $a\geq2$, we can replace $|x-a|$ during the integration without ado by $x-a$, resp., by $a-x$. When $1<a<2$ we have to split the integral into two parts. Therefore we  have to distinguish the three cases
(i) $\quad a\leq 1:\qquad I=\int_1^2{dx\over x+(1-a)}\>,$
(ii) $\quad 1< a< 2 :\qquad I=\int_1^a{dx\over (a+1)-x}+\int_a^2{dx\over x-(a-1)}\>,$
(iii) $\quad a\geq 2:\qquad I=\int_1^2{dx\over (a+1)-x}\>$.
Do the computations for each of these cases, and check for which values of $a$ you obtain the desired result.
A: I propse another answer which is in fact the same as the @Christian but changing the order of the steps.
You have compute your integral and you have found the expression
$$ \log\left( \frac{|2-a|+1}{|1-a|+1}\right) .$$
Hence your equation becomes
$$ \log\left( \frac{|2-a|+1}{|1-a|+1}\right) = \log(a)+\log(3-a)=\log(a(3-a)) .$$
Since $\log$ is an injective function in its tdomain, the above is equivalent to
$$\frac{|2-a|+1}{|1-a|+1} = a(3-a) ,$$
which seems more friendly (even it is the same). Now you have to study the different cases: $a\leq 1, 1<a<2$ and $a\leq 2$ and try to find solutions.
PD: Clearly $a=1$ is a solution (the one I was thinking about in my comment. But there are more.
