I want to evaluate this integral, but it won't work. Does anyone knows why?


dm = (M/(2 π a)) a ;

i[ϵ_] = 1/(a Sqrt[1 - 2 (ϵ) Cos[θ] + (ϵ)^2]);
i1[ϵ_] = Series[i[ϵ], {ϵ, 0, 1}];
invertdist[r_] = i1[a/r];

ϕ[r_] = -Integrate[G dm invertdist[r], {θ, 0, 2  π}]
  • 1
    $\begingroup$ There are two errors in your code: functions are defined with := and Series requires a symbol as a variable. $\endgroup$
    – Hector
    Mar 21, 2014 at 23:38

1 Answer 1


The only thing wrong with your code is that Series doesn't return an expression suitable for evaluation at specific values of the expansion variable. You first have to convert the SeriesData object to a normal expression using Normal. This is the only change needed:

i1[ϵ_] = Normal[Series[i[ϵ], {ϵ, 0, 1}]];

With this, the integration works as expected:

ϕ[r_] = -Integrate[G dm invertdist[r], {θ, 0, 2 Pi}]

(* ==> -((G M)/a) *)
  • $\begingroup$ Thanks a lot! I now know how to use the "Normal". $\endgroup$
    – Lawerance
    Mar 22, 2014 at 20:10
  • $\begingroup$ @Lawerance: if you are satisfied with the answer you received from Jens (and it seems you are), then please Accept his answer. $\endgroup$
    – Cassini
    Mar 30, 2014 at 17: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.