We review various problems of extremization that arise in the calculus of variations, with wide-ranging applications in mathematics, physics and biology. Euler-Lagrange equations come from the extremum of an action functional, and we reformulate this as an optimization problem. Hence the task of solving systems of differential equations can be recast as the problem of finding the minimum of a suitable quantity, which is appropriate for the application of artificial immune system (AIS) algorithms. We also show how the problem of finding roots of polynomial functions is naturally viewed as another minimization problem. In numerical analysis, the Newton-Raphson method is the standard approach to this problem, and the basins of attractions for each root have a fractal structure. Preliminary investigations using the B-Cell Algorithm (BCA) introduced by Kelsey and Timmis suggest that the behaviour of AIS algorithms themselves can display fractal structure, which may be analyzed with dynamical systems techniques.