EvaluationMonitor
✖
EvaluationMonitor
is an option for various numerical computation and plotting functions that gives an expression to evaluate whenever functions derived from the input are evaluated numerically.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Print information with every function evaluation used to find a root:

https://wolfram.com/xid/05fmrzwc0a-74t3k


https://wolfram.com/xid/05fmrzwc0a-c2s32o

Use Reap and Sow to collect evaluation data:

https://wolfram.com/xid/05fmrzwc0a-pe7d2b

Show the superlinear convergence of the method:

https://wolfram.com/xid/05fmrzwc0a-m72fpx

Monitor the time integration of a wave equation:

https://wolfram.com/xid/05fmrzwc0a-se6uzv

Scope (5)Survey of the scope of standard use cases
Monitor the solution progress when solving the sine–Gordon PDE:

https://wolfram.com/xid/05fmrzwc0a-8v3nl

Evaluations for a numerical minimization:

https://wolfram.com/xid/05fmrzwc0a-d1w0vy


https://wolfram.com/xid/05fmrzwc0a-di3o33

Evaluations for computing a numerical integral with NIntegrate:

https://wolfram.com/xid/05fmrzwc0a-lxoqek

https://wolfram.com/xid/05fmrzwc0a-r778b

Show a plot of the evaluation position versus evaluation number:

https://wolfram.com/xid/05fmrzwc0a-bb7oq7

Evaluations for solving a differential equation with NDSolve with a extrapolation method:

https://wolfram.com/xid/05fmrzwc0a-sb83c
A plot shows that with this method, not all evaluations are on the solution curve:

https://wolfram.com/xid/05fmrzwc0a-b2l3gi

Count evaluations for doing a surface plot:

https://wolfram.com/xid/05fmrzwc0a-420fh

https://wolfram.com/xid/05fmrzwc0a-c5ku9b

When the function is evaluated, it takes fewer evaluations since symbolic derivatives are used:

https://wolfram.com/xid/05fmrzwc0a-ehuia9

Generalizations & Extensions (2)Generalized and extended use cases

https://wolfram.com/xid/05fmrzwc0a-dnwnce

With a different starting value, the computation is stopped:

https://wolfram.com/xid/05fmrzwc0a-v344q

Distinguish between function and derivative evaluations in doing a numerical minimization:

https://wolfram.com/xid/05fmrzwc0a-fhvgeh

Show function, gradient, and Hessian evaluations in blue, yellow and red, respectively:

https://wolfram.com/xid/05fmrzwc0a-f3hjzg

Applications (6)Sample problems that can be solved with this function
Show where evaluations were done for part of a plot using a tooltip that indicates order:

https://wolfram.com/xid/05fmrzwc0a-h9vy

Show number of evaluations required to find a root as a function of starting value:

https://wolfram.com/xid/05fmrzwc0a-cmijhv

https://wolfram.com/xid/05fmrzwc0a-pem8f6

Compare evaluations required for different local minimization methods:

https://wolfram.com/xid/05fmrzwc0a-c17nfk

Compare evaluations and timing required for different ODE integration methods in NDSolve:

https://wolfram.com/xid/05fmrzwc0a-2xsju

https://wolfram.com/xid/05fmrzwc0a-bxrzb6

https://wolfram.com/xid/05fmrzwc0a-g3c7re

Steps and evaluations as a function of PrecisionGoal and AccuracyGoal in NDSolve:

https://wolfram.com/xid/05fmrzwc0a-dby3mh
Use a fixed order explicit Runge–Kutta method:

https://wolfram.com/xid/05fmrzwc0a-el3och


Use an adaptive order extrapolation method:

https://wolfram.com/xid/05fmrzwc0a-f2jkal


Compare the two methods. Beyond a goal of about 12, adaptive order is clearly superior:

https://wolfram.com/xid/05fmrzwc0a-jw3316

Evaluations in parameter space for a nonlinear fit:

https://wolfram.com/xid/05fmrzwc0a-wteui

https://wolfram.com/xid/05fmrzwc0a-bed63a

https://wolfram.com/xid/05fmrzwc0a-d7c8c7

The evaluation points on a contour plot of the sum of squares:

https://wolfram.com/xid/05fmrzwc0a-gg2b8b


https://wolfram.com/xid/05fmrzwc0a-gjzqal


https://wolfram.com/xid/05fmrzwc0a-lxh28

Compare the two fits with the data:

https://wolfram.com/xid/05fmrzwc0a-g7e1pe

Properties & Relations (1)Properties of the function, and connections to other functions
Evaluation done for EvaluationMonitor is scoped like Block:

https://wolfram.com/xid/05fmrzwc0a-befxvt

https://wolfram.com/xid/05fmrzwc0a-dinbid

This is effectively using Block with assignments of numerical values of the variable:

https://wolfram.com/xid/05fmrzwc0a-cui5lm

https://wolfram.com/xid/05fmrzwc0a-bxg0dr

Wolfram Research (2003), EvaluationMonitor, Wolfram Language function, https://reference.wolfram.com/language/ref/EvaluationMonitor.html (updated 2007).
Text
Wolfram Research (2003), EvaluationMonitor, Wolfram Language function, https://reference.wolfram.com/language/ref/EvaluationMonitor.html (updated 2007).
Wolfram Research (2003), EvaluationMonitor, Wolfram Language function, https://reference.wolfram.com/language/ref/EvaluationMonitor.html (updated 2007).
CMS
Wolfram Language. 2003. "EvaluationMonitor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/EvaluationMonitor.html.
Wolfram Language. 2003. "EvaluationMonitor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/EvaluationMonitor.html.
APA
Wolfram Language. (2003). EvaluationMonitor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EvaluationMonitor.html
Wolfram Language. (2003). EvaluationMonitor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EvaluationMonitor.html
BibTeX
@misc{reference.wolfram_2025_evaluationmonitor, author="Wolfram Research", title="{EvaluationMonitor}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/EvaluationMonitor.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_evaluationmonitor, organization={Wolfram Research}, title={EvaluationMonitor}, year={2007}, url={https://reference.wolfram.com/language/ref/EvaluationMonitor.html}, note=[Accessed: 25-March-2025
]}