Newton Raphson Method - negative square roots causing problems in next iterations

327 Views Asked by At

I have a system of four nonlinear equations. Each of these equations contain one or more $\sqrt{x}$ , $\sqrt{y}, \dots $ I have written a C# code to solve this system I choose positive values for my initial values. however in next iterations the corrected values of $x,y,\dots$ become negative and I can not go further because of negative numbers under radicals.

Is there a work around for this?

Thanks in advance

Here are the equations: y2$\sqrt{y1}*c1+y3\sqrt{y1}*c2+ y0+y1+y2+y3+\sqrt{y3}*c4+\sqrt{y1}*c5+\sqrt{y1}\sqrt{y3}*c3+\sqrt{y0}\sqrt{y1}*c7+\sqrt{y0}*c6-1=0$

$2y3\sqrt{y1}*c2+2y3+\sqrt{y3}*c4+\sqrt{y1}\sqrt{y3}*c3 -(m/n)*(y2\sqrt{y1}*c1+y2)=0$

$2y2\sqrt{y1}*c1+y3\sqrt{y1}*c2+2y1+y2+\sqrt{y1}*c5+\sqrt{y1}\sqrt{y3}*c3+\sqrt{y0}\sqrt{y1}*c7-(2a/(phi*n))*(y2\sqrt{y1}*c1+y2)=0$

$2y0+\sqrt{y0}\sqrt{y1}*c7+\sqrt{y0}*c6-(7.52a/(phi*n))*(y2\sqrt{y1}*c1+y2)=0$

in these equations c1,c2,c3,c4,c5,c6,c7, a , phi,m ,n are constants and y0,y1,y2,y3 are unknowns