I was hoping someone could recommend a good book on programming for numerical optimization--including lots of code examples. I am reading Nocedal and Wright, which is great. One of the recommendations that they make is that it helps to do programming exercises along with studying the methods outlined in the book.

I usually work in python, but I have not been able to find any comprehensive treatments of optimization in python. In most cases, optimization is just a chapter in book, but nothing comprehensive. There are a number of good python surveys to scientific computing, such as Kiusalaas's book Numerical Methods in Engineering and Python, but again only a chapter on optimization.

Now the book does not have to be in Python. I am not as familiar with books that use Matlab or R or C. I can always rewrite the code from one language into Python or another language.

I checked out Rao's book Engineering Optimization but it does not really have much code in it.

  • 2
    $\begingroup$ I am not sure you will find such a book, but can find chapters in books like Numerical Recipes, and books that even have a chapter with Python Code, like Ch $10$ of Numerical Methods in Engineering with Python 3, 3rd Edition, by Jaan Kiusalaas $\endgroup$ – Moo Mar 11 '18 at 12:36
  • 1
    $\begingroup$ Maybe you discovered a book writing opportunity. Figure it out, then write a book. $\endgroup$ – Mark L. Stone Mar 11 '18 at 16:25
  • $\begingroup$ The following book has several MATLAB codes maybe it helps: Introduction to Nonlinear Optimization by Amir Beck. $\endgroup$ – Tobias Mar 12 '18 at 16:57
  • $\begingroup$ The attempt an an answer on a question dealing with summation, while not a book, was getting up there in line count with examples on just going back-n-forth between Python and Sigma notation. It also didn't go much into optimization. Which is really tricky to try and answer holistically, and also depends upon what your target is, eg. memory or processor(s) usage vs. time, and many other measures that may (or not) be exclusive... but I'll give ya one big hint Iterators allow for balancing between some measures for optimization. $\endgroup$ – S0AndS0 Mar 28 at 17:18

I don't know about Python, but if you don't mind MATLAB, the following two books could help you:

  • An Introduction to Programming and Numerical Methods in MATLAB (Otto, Denier)
  • Foundations of numerical analysis (with MATLAB examples) (Konstantinov)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.