How can I solve the convergence problems when solving a nonlinear system of equartions with Newton Rapshon?
Show older comments
Hi, I am trying to solve the following system of equations by Newton Raphson: R=S*X-Fe+Fnl,where S is a matrix,dim 3*NX3*N; X,Fe and Fnl vectors, dim 3*NX1. This last vector, Fnl, depends on X, the variable. The matrix S and the vector Fe are constant during the Problem. (R is the residual)
The first Iteration would be: X1=X0-R0*(dR0/dX)\ ,where R0 is R evaluated in X0 and (dR0/dX)\ the inverse of the matrix containing the derivatives of R respective X. That is: dR0/dX = S+ dFnl/dX. This matrix dFnl/dX is obtained numerically by finite differences. S, is a matrix that doesn´t Change.
To start the iterations I am considering the solution of the linear System: X0=S\*Fe. Then I evaluate the Fnl vector in X0 and obtain Fnl0. Fe and S are known and invariant.So I calculate R0=S*X0-Fe+Fnl0 I calculate dFnl0/dX by finite diferences dFnl0/dX=[Fnl(X+Delta)-Fnl(X)]/Delta, where: Delta=sqrt(eps)*norm(X0) (eps is the Floating-point relative accuracy) I can calculate then dR0/dX = S+ dFnl/dX I do that at every Iteration, until norm(X)<1e-12 It happens that for some values of the Parameters that define the vector Fnl the Problem isn´t converging. If anybody could help me please tryinf to find the solution I would be very grateful!!!I am not able to find a solution... Thank you very much!
6 Comments
Torsten
on 12 Feb 2015
You are not allowed to use MATLAB's "fsolve" for your problem ?
Best wishes
Torsten.
student
on 12 Feb 2015
Torsten
on 13 Feb 2015
The only thing you will have to supply for fsolve is
Res:=R-(S*X-Fe+Fnl)
fsolve will approximate the derivatives on its own.
Best wishes
Torsten.
student
on 13 Feb 2015
Torsten
on 13 Feb 2015
As far as I understand, you want to have S*X-Fe+Fnl(X) = 0.
If X is the vector of unknowns and you can calculate S*X-Fe+Fnl(X) in every iteration given X, and S*X-Fe+Fnl has as many components as X (number of unknowns = number of equations), you can use fsolve to solve your system.
Best wishes
Torsten.
student
on 16 Feb 2015
Answers (0)
Categories
Find more on Newton-Raphson Method 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!