Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    $\begingroup$ This is good, but it would be better with EvaluationMonitor :> Print["x = ", x , ", x^", a, " - 2 = ", x^a - 2]. With this change, one can see what the actual exponent of x is. $\endgroup$ Commented May 3, 2014 at 21:00
  • $\begingroup$ @m_goldberg Thanks, I have edited my answer accordingly. $\endgroup$ Commented May 3, 2014 at 21:11
  • 1
    $\begingroup$ Also, your solution has the drawback that the three results are not put into the output history. It is not possible to retrieve them later with Out. Because of this I think you should consider another modification -- changing FindRoot[...] to rule[a] = FindRoot[...] -- allowing latter access to the results of FindRoot as rule[1], rule[2], rule[3]. $\endgroup$ Commented May 3, 2014 at 21:56
  • $\begingroup$ @m_goldberg I see your point, but this question is about output formatting. You suggest some kind of memoization which is useful but not strictly related to the question. $\endgroup$ Commented May 3, 2014 at 22:04