# How to have Mathematica cancel the infinities in a definite integral

I have this integral: $$\int_z^1 dz_1\frac{z}{z_1(z_1 - z)} \Bigg(\ln z_1 \ln(1 - z_1) - \ln z \ln(1-z)\Bigg)$$.

If I try to solve it in Mathematica it doesn't give any result, though it can solve the indefinite version of it. If I take then the limit of that result for $$z_1\rightarrow z$$ and $$z_1\rightarrow 1$$ to have the answer for the definite integral there are some infinities in separate terms, but in the whole expression they cancel. So terms like this for example: $$-\ln 0 \ln z + \ln 0 \ln z$$ which is obvious the infinities cancel (as they should since this integral describes physical quantity). So far I have been dealing with this problem by hand and cancel these apparent infinities term by term.
My question is: Is there a way to tell Mathematica to manipulate these terms and cancel them itself in the result?
I have tried taking the limit, but it just gives "Indeterminate" every time. I would really appreciate some help.

There seems to be no problems with MA 11.3. There are no divergencies for real values of z. One needs to wait around 40s.

 Integrate[z/(z1(z1-z)) (Log[z1]Log[1-z1]-Log[z]Log[1-z]),{z1,z,1},Assumptions->0<z<1]//Timing

Out[1]= {41.7505,-(1/6) Log[1-z] (Log[1-z]^2+3 Log[1-z] Log[z]+3 Log[z]^2
+6 PolyLog[2,z])+PolyLog[3,z/(-1+z)]}


It should be noted that for $$0 the integrand is real, continuous and free of singularities in the interval $$z\le z_1 \le 1$$. In fact $$z_1=z,1$$ are removable singularities. Therefore, PrincipalValue->True is not needed.

• Very interesting, Mathematica v12 doesn't evaluate. Option PrincipalValue->True is needed. Commented Aug 17, 2020 at 11:01
• @UlrichNeumann I think that is actually the desired behavior. As the OP states, you can do it for "arbitrary" boundaries and then take the limit. Commented Aug 17, 2020 at 12:30
• It evaluates on a Mac with either v12.1.0 or 12.1.1 without needing the option PrincipalValue->True Commented Aug 17, 2020 at 13:39