Initial commit of functions from github.com/btracey/optimize

Thanks for the pointer. I left this as a TODO. We do not currently have a Go implementation of the function.