Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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  π}]
share|improve this question
There are two errors in your code: functions are defined with := and Series requires a symbol as a variable. – Hector Mar 21 '14 at 23:38
up vote 3 down vote accepted

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) *)
share|improve this answer
Thanks a lot! I now know how to use the "Normal". – Lawerance Mar 22 '14 at 20:10
@Lawerance: if you are satisfied with the answer you received from Jens (and it seems you are), then please Accept his answer. – Cassini Mar 30 '14 at 17:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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