First find the Jacobian:

Now Newton's method proceeds from a initial approximation of guess: to the next approximation using by solving:

for , then the next estimate is:

.

Then the general itteration step is:

solve:

for , then the next estimate is:

.

In Matlab the equation J dP= P is solved using a statement of the form:

dP=J\P

if I recall correctly

RonL