9.11. Contour lines solution for Calculus of Variations using the VBA code

Let us see now how the second approximate numerical approach (see end of Section 9.2) can be implemented easily in Excel using a simple VBA code.

Example 1

Continuing the Examples 3.a and 3.b of Section 9.2, the original problem was to find the extremal of the functional in the following problem, with exact optimal path y ( t ) = 1 24 t 3 + 23 24 t + 1 image :
min J = 0 1 ( t y + 2 y 2 ) d t
image
s . t . y ( 0 )

Get Elements of Numerical Mathematical Economics with Excel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.