# Why doesn't Mathematica evaluate this limit? [closed]

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?

-

## closed as off-topic by Louis, m_goldberg, RunnyKine, Öskå, MarcoBApr 26 at 3:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Louis, m_goldberg, RunnyKine, Öskå, MarcoB
If this question can be reworded to fit the rules in the help center, please edit the 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.