I would like to evaluate/simplify a series of expressions. The first set of expressions works fine, but when I try to evaluate the second line of my code (a very simple expression), the program keeps on "running" until I either have to abort or I get the following message:


I have seen a post with a similar question where the issue seemed to be a memory problem. In my case, the calculations are really simple (until recently, I have been doing many more complicated ones without any problem) so I don't think it can be a memory problem.

Here is my example:

f[x_, k_, b_, γ_] = (b/x)*(x^((k - 1)/k) + γ)^(k/(k - 1))
Derf[x_, k_, b_, γ_] = FullSimplify[D[f[x, k, b, γ], x]]
Der2f[x_, k_, b_, γ_] = FullSimplify[D[Derf[x, k, b, γ], x]]
epsf[x_, k_, b_, γ_] = FullSimplify[-f[x, k, b, γ]/(x*Derf[x, k, b, γ])]
rhof[x_, k_, b_, γ_] = FullSimplify[-x*Der2f[x, k, b, γ]/Derf[x, k, b, γ]]

The above expression get evaluated fine, but the next one does not:

r[x_, k_, b_, γ_] = x*f[x, k, b, γ]

The output I get is:

x f[x, k, b, γ]
  • 1
    $\begingroup$ Try again with a fresh kernel (evaluation->quit kernel->local). It works fine here, There is nothing dynamic in your equations, so it must be interference from some previous calculation. $\endgroup$ – bill s Mar 26 '19 at 0:46
  • $\begingroup$ Sometimes it happens when you have other notebooks (e.g. documentation) opened and Dynamics inside them are triggered because of reasons.\ $\endgroup$ – Kuba Mar 26 '19 at 7:40
  • $\begingroup$ Thank you very much! (evaluation->quit kernel->local) solved my problem right now. However, I do not quite understand why I have been having this problem recently. It happens even when I start up my computer from fresh, without anything running (no other applications, documentation...) and when I open this notebook as the only one. $\endgroup$ – Lednacek Mar 27 '19 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.