I'm studying the infinite grid resistor problem, and I've noticed that at some point Mathematica solution diverges with the one that's on the theorical study

$$\frac{1}{i\pi}\int_{0}^{\pi}\frac{1-e^{i \arccos(2-\cos(\alpha))}\cos(\alpha)}{\sin( \arccos(2-\cos(\alpha)))}d\alpha$$

The problem is that the site gives following answer:


While Mathematica gives this to me:


The sign is the opposite. So I'd like to know what's I didn't understood.

This is the command that I've used for making the integral:

R11 = 1/(Pi I) Integrate[(1 - Exp[I (ArcCos[2 - Cos[a]])] Cos[a])/Sin[ArcCos[2 - Cos[a]]], {a, 0, Pi}]

I'd like to know what I'm doing wrong and how can I fix it.

  • $\begingroup$ The article you sited is wrong, because the integrand is strictly negative. By the way, NIntegrate gives the same answer as Integrate to several significant figures. $\endgroup$
    – bbgodfrey
    Sep 16, 2019 at 18:55

1 Answer 1


The solution starting from the indefinite integral seems to match:

indef = 1/(I Pi) FullSimplify[
  Integrate[(1 - Exp[I (ArcCos[2 - Cos[a]])] Cos[a])/Sin[ArcCos[2 - Cos[a]]], a], 
     Assumptions -> {0 <= a <= Pi}];
Limit[indef, a -> Pi] - Limit[indef, a -> 0]
(* -(2/\[Pi]) *)
  • $\begingroup$ It works also without the limit, (indef /. a -> Pi) - (indef /. a -> 0). So I'm doing the definite integral in the wrong way? $\endgroup$
    – Jepessen
    Sep 16, 2019 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.