  We study a convex optimization framework for bounding extreme events in
nonlinear dynamical systems governed by ordinary or partial differential
equations (ODEs or PDEs). This framework bounds from above the largest value of
an observable along trajectories that start from a chosen set and evolve over a
finite or infinite time interval. The approach needs no explicit trajectories.
Instead, it requires constructing suitably constrained auxiliary functions that
depend on the state variables and possibly on time. Minimizing bounds over
auxiliary functions is a convex problem dual to the non-convex maximization of
the observable along trajectories. This duality is strong, meaning that
auxiliary functions give arbitrarily sharp bounds, for sufficiently regular
ODEs evolving over a finite time on a compact domain. When these conditions
fail, strong duality may or may not hold; both situations are illustrated by
examples. We also show that near-optimal auxiliary functions can be used to
construct spacetime sets that localize trajectories leading to extreme events.
Finally, in the case of polynomial ODEs and observables, we describe how
polynomial auxiliary functions of fixed degree can be optimized numerically
using polynomial optimization. The corresponding bounds become sharp as the
polynomial degree is raised if strong duality and mild compactness assumptions
hold. Analytical and computational ODE examples illustrate the construction of
bounds and the identification of extreme trajectories, along with some
limitations. As an analytical PDE example, we bound the maximum fractional
enstrophy of solutions to the Burgers equation with fractional diffusion.
