Solving Nonlinear Equations using Newton-Raphson Method
显示 更早的评论
I have solved the following by hand but am having difficulties implementing the code. If anyone is able to assist me I would great appreciate it.
I would like to use Newton-Raphson to solve:
[ exp( X1*X2 ) = [ 1.2 cos( X1 + X2 ) ] 0.5 ]
Starting at X1(0) = 1 and X2(0) = .5. My tolerance is 0.0005.
Thank you in advance.
3 个评论
Roger Stafford
2014-3-27
If you regard both x1 and x2 as your unknowns, that is not a well-defined problem. You have two unknowns and only one equation, for which there is an infinite continuum of solutions. The fact that you have found a solution does not alter this fact.
If you tried to apply the Newton-Raphson method, you would discover that the necessary Jacobian matrix which is to be used in the recursion is not square and therefore has no inverse, and that means you could not make the recursion work.
Jimmy
2014-11-12
Did anyone figure this problem out? I'm having the same problem, I can get the correct answer by hand but not with my code.
回答(1 个)
Roger Stafford
2014-3-27
编辑:Roger Stafford
2014-3-27
The recursion works very much the way it would in one dimension except that instead of dividing by the function's derivative, you multiply by the two functions' inverse Jacobian. Read about it at:
http://en.wikipedia.org/wiki/Newton's_method#k_variables.2C_k_functions
类别
在 帮助中心 和 File Exchange 中查找有关 Newton-Raphson Method 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!