Answer:
![2*sin(x)+y*cos(x)-cos(y)=C_1](https://tex.z-dn.net/?f=2%2Asin%28x%29%2By%2Acos%28x%29-cos%28y%29%3DC_1)
Step-by-step explanation:
Let:
![P(x,y)=2*cos(x)-y*sin(x)](https://tex.z-dn.net/?f=P%28x%2Cy%29%3D2%2Acos%28x%29-y%2Asin%28x%29)
![Q(x,y)=cos(x)+sin(y)](https://tex.z-dn.net/?f=Q%28x%2Cy%29%3Dcos%28x%29%2Bsin%28y%29)
This is an exact differential equation because:
![\frac{\partial P(x,y)}{\partial y} =-sin(x)](https://tex.z-dn.net/?f=%5Cfrac%7B%5Cpartial%20P%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%20%3D-sin%28x%29)
![\frac{\partial Q(x,y)}{\partial x}=-sin(x)](https://tex.z-dn.net/?f=%5Cfrac%7B%5Cpartial%20Q%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%3D-sin%28x%29)
With this in mind let's define f(x,y) such that:
![\frac{\partial f(x,y)}{\partial x}=P(x,y)](https://tex.z-dn.net/?f=%5Cfrac%7B%5Cpartial%20f%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%3DP%28x%2Cy%29)
and
![\frac{\partial f(x,y)}{\partial y}=Q(x,y)](https://tex.z-dn.net/?f=%5Cfrac%7B%5Cpartial%20f%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%3DQ%28x%2Cy%29)
So, the solution will be given by f(x,y)=C1, C1=arbitrary constant
Now, integrate
with respect to x in order to find f(x,y)
![f(x,y)=\int\ 2*cos(x)-y*sin(x)\, dx =2*sin(x)+y*cos(x)+g(y)](https://tex.z-dn.net/?f=f%28x%2Cy%29%3D%5Cint%5C%20%202%2Acos%28x%29-y%2Asin%28x%29%5C%2C%20dx%20%3D2%2Asin%28x%29%2By%2Acos%28x%29%2Bg%28y%29)
where g(y) is an arbitrary function of y
Let's differentiate f(x,y) with respect to y in order to find g(y):
![\frac{\partial f(x,y)}{\partial y}=\frac{\partial }{\partial y} (2*sin(x)+y*cos(x)+g(y))=cos(x)+\frac{dg(y)}{dy}](https://tex.z-dn.net/?f=%5Cfrac%7B%5Cpartial%20f%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%3D%5Cfrac%7B%5Cpartial%20%7D%7B%5Cpartial%20y%7D%20%282%2Asin%28x%29%2By%2Acos%28x%29%2Bg%28y%29%29%3Dcos%28x%29%2B%5Cfrac%7Bdg%28y%29%7D%7Bdy%7D)
Now, let's replace the previous result into
:
![cos(x)+\frac{dg(y)}{dy}=cos(x)+sin(y)](https://tex.z-dn.net/?f=cos%28x%29%2B%5Cfrac%7Bdg%28y%29%7D%7Bdy%7D%3Dcos%28x%29%2Bsin%28y%29)
Solving for ![\frac{dg(y)}{dy}](https://tex.z-dn.net/?f=%5Cfrac%7Bdg%28y%29%7D%7Bdy%7D)
![\frac{dg(y)}{dy}=sin(y)](https://tex.z-dn.net/?f=%5Cfrac%7Bdg%28y%29%7D%7Bdy%7D%3Dsin%28y%29)
Integrating both sides with respect to y:
![g(y)=\int\ sin(y) \, dy =-cos(y)](https://tex.z-dn.net/?f=g%28y%29%3D%5Cint%5C%20sin%28y%29%20%20%5C%2C%20dy%20%3D-cos%28y%29)
Replacing this result into f(x,y)
![f(x,y)=2*sin(x)+y*cos(x)-cos(y)](https://tex.z-dn.net/?f=f%28x%2Cy%29%3D2%2Asin%28x%29%2By%2Acos%28x%29-cos%28y%29)
Finally the solution is f(x,y)=C1 :
![2*sin(x)+y*cos(x)-cos(y)=C_1](https://tex.z-dn.net/?f=2%2Asin%28x%29%2By%2Acos%28x%29-cos%28y%29%3DC_1)