Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I asked Mathematica 9 to execute the SeriesCoefficient command on a rather horrendously complicated expression. After some time I decided to abort the evaluation and try something different.

Somehow, this has caused the Series and SeriesCoefficient commands to stop working properly. They can still correctly expand known functions, for example things like Series[x^2*BesselJ[Sin[x],x],{x,0,5}] do work as expected, but for arbitrary, not-yet-defined functions they no longer work, so Series[f[x],{x,0,2}] now returns just f[x] rather than the expected f[0]+f'[0]x+f''[0]x^2/2+O[x]^3.

Does anyone know what exactly might have caused this and how I could fix it without having to restart the kernel? (Presumably the previous call to SeriesCoefficient changed some obscure internal parameter in the kernel which may be reversible...)

I have a bunch of long, precalculated expressions in the kernel's memory and it would be quite annoying to have to export all of them and reimport into a new kernel.

share|improve this question
1  
Do you have an example of a function that takes "horrendously" long to generate the series? Likely a restart is required, though. –  rcollyer Feb 11 '13 at 14:53
    
@rcollyer These are terms in asymptotic expansions of a curvature tensor in high dimensions, some of them are many hundreds of lines long and take hours to extract. Unfortunately I don't think I can reasonably paste the code which will duplicate my expressions in this space. I understand that I'm not making it easy for people to reproduce this condition, but I thought there might be some attribute which causes Series to avoid processing arbitrary functions. –  Saran Feb 11 '13 at 14:59
    
None that I can think of. What's your memory usage? –  rcollyer Feb 11 '13 at 15:01
    
MathKernel is using just over 580MB. My system still has just under 4GB available though. –  Saran Feb 11 '13 at 15:03
    
You could put such an expression in any pastebin that allows accessing the raw paste data through a link. Then people can Import from that link and test that way. –  Szabolcs Feb 11 '13 at 19:16

1 Answer 1

Of course it's absolutely impossible to give a specific answer, so I can only remark that SeriesCoefficient works differently in version 9. For a list or array of functions, version 8 does not evaluate expressions like this:

SeriesCoefficient[{f[x], h[x]}, {x, 0, 2}]

but version 9 does. Maybe this causes problems somewhere in your expression. But really, I have no idea how else to track down your issue than to go through the list of incompatibilities between the versions one by one. This is the first that came to mind.

share|improve this answer
    
Thanks, but I highly doubt it's related to that. I'm not trying to expand array of expressions, plus, both Series and SeriesCoefficient worked fine until now. (And they still do if I start fresh kernels). I guess there's not much I can do at this point other than restart and hope it doesn't occur again. –  Saran Feb 12 '13 at 12:31

Your Answer

 
discard

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.