{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Differential Equations Solutions 40

# Differential Equations Solutions 40 - • If the function...

This preview shows page 1. Sign up to view the full content.

50 Chapter 9. Solutions: Numerical Methods for Unconstrained Optimization CHALLENGE 9.9. function Hv = Htimes(x,v,h) % Input: % x is the current evaluation point. % v is the direction of change in x. % h is the stepsize for the change, % a small positive parameter (e.g., h = 0.001). % We use a function [f,g] = myfnct(x), % which returns the function value f(x) and the gradient g(x). % % Output: % Hv is a finite difference approximation to H*v, % where H is the Hessian matrix of myfnct. % % DPO [f, g ] = myfnct(x); [fp,gp] = myfnct(x + h * v); Hv = (gp - g)/h; CHALLENGE 9.10. Here is one way to make the decision:
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • If the function is not diFerentiable, use Nelder-Meade. • If 2nd derivatives (Hessians) are cheaply available and there is enough storage for them, use Newton. • Otherwise, use quasi-Newton (with a ±nite-diFerence 1st derivative if neces-sary). CHALLENGE 9.11. • Newton: often converges with a quadratic rate when started close enough to a solution, but requires both ±rst and second derivatives (or good approxima-tions of them) as well as storage and solution of a linear system with a matrix of size 2000 × 2000....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online