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?
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.