Broyden's Method for Function Minimization

> Broyden := proc(x, DD)
local d, xx;
xx := evalm( x - inverse( DD ) &* gradf( x ) );
d := evalm( xx - x );
if dotprod( d, d ) > 0 then
DD := evalm( DD + ( gradf( xx ) &* transpose( d ) ) / dotprod( d, d ) )
end if;
convert( evalm( xx ), vector ), evalm( DD );
end proc:

>

Initial Matrix: D[0] = I

Initial Matrix: D[0] = Hf(x[0])

>