New Reply

code for 2 dimesional newtons method.

 
Share Thread Thread Tools
Mar5-12, 08:34 AM   #1
 

code for 2 dimesional newtons method.


Hey,
I'm trying to figure out how to do newtons method in 2 dimensions. That is, I want it to take in an input of my initial matrix {x0,y0} and then follow the algorithm to find the solution to f1(x,y)=0, f2(x,y)=0. The algorithm is {x1,y1}={x0,y0}-A^-1*F{x0,y0}
where A is the matrix of mixed partials and F{x,y} is the matrix of {f1,f2} evaluated at {x0,y0}.

I'm new at mathematica so I'm having more trouble on the coding side than the logic side. I was able to figure out how to do the code for single variable newton's method, but I don't know how to let it take in a matrix as an input. I know that matrices are written with brackets, but I don't know how to let a function be a matrix. Like in the one dimensional case I had:

g[x_] := x - f[x]/(D[f[t], t] /. t -> x)

but I cant get x to be a general matrix in the 2d example.

Any help at all with the coding or anything would be awesome
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> King Richard III found in 'untidy lozenge-shaped grave'
>> Google Drive sports new view and scan enhancements
>> Researcher admits mistakes in stem cell study
Mar5-12, 12:18 PM   #2
 
Remembering the gradient from multivariable calculus might get you started.
New Reply
Thread Tools


Similar Threads for: code for 2 dimesional newtons method.
Thread Forum Replies
Newtons method? Calculus & Beyond Homework 2
Newtons Method - A little help Calculus & Beyond Homework 3
newtons method. Calculus 2
newtons method Calculus & Beyond Homework 3
newtons method Calculus 5