# Simplifying an expression involving a complex logarithm

I asked WolframAlpha to solve a certain differential equation and it gave it in this form: $$f(x)=(x-1)(\ln(x-1)-i\pi-1)$$. Now I am only interested in this function when $$x$$ is in the interval $$(0,1)$$. In this case, I think $$f(x)$$ will always be a real number.

My question is, is there a way to simplify this expression in the interval $$(0,1)$$, so that it makes no reference to complex logarithms or imaginary numbers? I just want to express it in terms of real functions.

• Probably not; even if $x$ is real you'll still have that $i\pi$. – Parcly Taxel Mar 15 at 2:09
• @ParclyTaxel But if $x$ is between 0 and 1, then $f(x)$ is a real number. So you should be able to express one real number in terms of another real number without referring to imaginary numbers. – Keshav Srinivasan Mar 15 at 2:10
• What is the differential equation in question, out of curiosity? – Eevee Trainer Mar 15 at 2:12
• @EeveeTrainer This one. – Keshav Srinivasan Mar 15 at 2:13
• @EeveeTrainer FYI, here is the question that prompted this question: math.stackexchange.com/q/3148842/71829 – Keshav Srinivasan Mar 15 at 3:26

We assume principal values for the multivalued functions we invoke here. Since $$x\in(0,1)$$, $$x-1$$ is negative and $$\ln(x-1)=\ln(1-x)+i\pi$$ Thus $$(x-1)(\ln(x-1)-i\pi-1)=(x-1)(\ln(1-x)+i\pi-i\pi-1)=(x-1)(\ln(1-x)-1)$$