hw06_p05_newton

# hw06_p05_newton - f function g_x = gx xold yold h =.000001...

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

function [xnew, ynew] = hw06_p05_newton( xold, yold) A(1,1) = fx(xold, yold); A(1,2) = fy(xold, yold); A(2,1) = gx(xold, yold); A(2,2) = gy(xold, yold); A b(1,1) = -f(xold, yold); b(2,1) = -g(xold, yold); b delta = A\b; d xnew = xold + delta(1,1); ynew = yold + delta(2,1); y function f_x = fx( xold, yold ) h = .000001; f1 = f(xold+h,yold); f2 = f(xold-h,yold); f f_x = (f1-f2)/(2*h); f function f_y = fy( xold, yold ) h = .000001; f1 = f(xold,yold+h); f2 = f(xold,yold-h); f f_y = (f1-f2)/(2*h);
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f function g_x = gx( xold, yold ) h = .000001; g1 = g(xold+h,yold); g2 = g(xold-h,yold); g g_x = (g1-g2)/(2*h); g function g_y = gy( xold, yold ) h = .000001; g1 = g(xold,yold+h); g2 = g(xold,yold-h); g g_y = (g1-g2)/(2*h); g function f_ = f( xold, yold ) f_ = (15*xold + 10*yold)/(15*(1-xold)*(40-30*xold-10*yold)^2)-5*10^(-4); f function g_ = g( xold, yold ) g_ = (15*xold + 10*yold)/(10*(1-yold)*(40-30*xold-10*yold))-4*10^(-2);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online