Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 am trying to evaluate a few limits in Mathematica, and I can only get it to evaluate them in certain cases. I don't fully understand the evaluation order and when it substitutes numerical values in for variables. If anyone could explain to me how to do these I would appreciate it. Mn, g, and extent have numerical values that are determined before this. x0 and order are parameters that I input manually when plotting and using for matching, etc.

DeltaAnalytic[k_?NumericQ, g_?NumericQ, extent_?NumericQ] := 
  ArcTan[((Sin[k*extent])^2)/(k*extent*Mn/g - Sin[k*extent]*Cos[k*extent])];

EffRangeExp[k0_, x0_?NumericQ, order_?NumericQ, coupling_?NumericQ, extent_?NumericQ] :=
  Limit[Normal[Series[DeltaAnalytic[k, coupling, extent], {k, x, order}]], x -> x0] /. 
    k -> k0;

Now when I try to plot the above, EffRangeExp, or just get it to spit out a numeric value at some k with various parameters, it is clearly evaluating something in the wrong order. I just don't know how to fix this problem. Would it help to make the variables local in the above function?

share|improve this question
I guess the problem is that the ?NumericQ on DeltaAnalytic prevents Limit and Series from seeing the analytic formula. – celtschk Jun 25 '13 at 16:09
Well, one think that probably isn't helping is that Mn in DeltaAnalytic is, as far as I can tell, a purely symbolic constant. – Pillsy Jun 25 '13 at 18:19
It would help a lot if you were to provide definitions of all the free variables and also give us some test data that clearly shows the problem. – m_goldberg Jun 25 '13 at 18:57
Thank you for your comments. I will be more clear in the future. @celtschk that fixed the problem. Thanks. – pawprintz5533 Jun 26 '13 at 14:31
If you found a fix, please post an answer. Otherwise this will not be helpful in the future and possibly closed. – Yves Klett Jun 26 '13 at 14:57

The problem is that the ?NumericQ on DeltaAnalytic's parameters prevents Limit and Series from seeing the analytic formula.

The solution is to remove ?NumericQ from DeltaAnalytic's parameters.

share|improve this answer

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.