Newton's iteration

2 views (last 30 days)
darlene yen
darlene yen on 8 Nov 2017
Commented: Torsten on 8 Nov 2017
I am trying to do Newton's method of iteration. I have f(TH,R) = @(TH,R)(abs((sqrt(2)/(81*sqrt(pi))).*(6.*R-R.^2).*exp(-R./3).*cos(TH))).^2
%df/dTH = -2*sin(TH)*cos(TH)*(2/(pi*81^2)*(6*R-R^2)^2)*exp(-2*R/3)
%df/dR = -4*exp(-2*R/3)*(R-6)*R*(R^2-12*R+18)*sin(2*TH)/(19683*pi)
%d2f/dTH2 = -4*exp(-2*R/3)*(6*R-R^2)^2*sin(TH)*cos(TH)/(6561*pi)
%d2f/dR2 = -8exp(-2*R/3)*(R^4-24*R^3+171*R^2-378*R+162)*sin(2*TH)/(59049*pi)
%d2f/dRdTH = -2*sin(TH)*cos(TH)*(2/(pi*81^2))*exp(-2*R/3)*(2*(6*R-R^2)*(6-2*R)-(2/3)*(6*R-R^2)^2)
%d2f/dTHdR = 4*exp(-2*R/3)(R-6) R(R^2-12*R+18)*sin(2*TH)/(19683*pi)
x_k = [TH_k;R_k]
i am trying to get x_k+1 = x_k − D[G(x_k)]^−1[G(x_k)] using backslash and stop the iteration when the most recent change D[G(x_k)]^−1[G(x_k)] has a two norm that is less than 1e − 4 times the two norm of the current guess xk+1.
  1 Comment
Torsten
Torsten on 8 Nov 2017
One equation for two unknowns is not suited to apply Newton's method.
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!