| OCR Text |
Show 68 and dY n 1 Yu2 Yvv - 2 Yu Yv Yuv + Yv2 Yuu "2 Yuu Yvv '- Yuv2 Note again that we must guard against moving toward a local minimum whereupon dY<O. Note that if discr/=O dun dvn if Yu (-Yu Yvv + Yv Yuv)/discr (-Yv Yuu + Yu Yuv)/discr dun + Yv dvn > Yu du + Yv QV du=dun dv=dvn That is the Newton direction will lead downhill if its dot product with the gradient is negative. Incidentally, note that the numerator of dYn is the same as the numerator of the Hessian. Pulling this all together we can then choose the search direction and distance by the followng algorithm. We pick the Newton direction if it leads uphill and if dYn>dYg. Otherwise we pick the gradient. dydl = Yuu Yu2 + 2 Yuv Yu Yv + Yvv Yv2 dist = Yu2 + Yv discr= Yuu Yvv - Yuv2 if dydl<O then du = -Yu dist/dydl dv = -Yv dist/dydl else du Yu dv = Yv Then apply the increment (du,dv) to the current (u,v) position. Again to avoid overshooting the maximum, check to see that Y(u+du,v+dv»Y(u,v) and repetatively halve the |