0

```
#include <iostream>
#include <cmath>
double f1(double);
double f2(double,double);
using namespace std;
int main()
{
double dx, dy,x=1.0, y=1.0,xnew,ynew,eps=0.0000001,err=1.0,m=1;
while ( fabs(err) > eps )
{
dx= -f1(x)/(3.0*sin(x)+cos(x));
dy= (f1(x)*sin(x)+f2(x,y)*(cos(x)-3*sin(x)))/3*sin(x)*(cos(y)+cos(x)*cos(y));
xnew= x+dx;
ynew= y+dy;
m = (xnew*xnew)+(ynew*ynew);
err=sqrt(m);
}
if ( fabs(err) < eps )
cout<< "dx= " <<dx<<endl;
cout<< "dy= "<<dy<<endl;
return 0;
}
double f1(double x)
{
return sin(x)+3.0*cos(x)-2.0;
}
double f2(double x, double y)
{
return cos(x)-sin(y)+0.2;
}
```

Hi guys..This is the question; find the solution of sin x+3cos x -2=0 and cosx-siny +0.2=0 in the vicinity of the point (1,1).

There is no error when I debug but nothing come out in the window. Can somebody please help me

*Edited 6 Years Ago by WaltP*: Code Tags added correctly