Answer:
[tex]2*sin(x)+y*cos(x)-cos(y)=C_1[/tex]
Step-by-step explanation:
Let:
[tex]P(x,y)=2*cos(x)-y*sin(x)[/tex]
[tex]Q(x,y)=cos(x)+sin(y)[/tex]
This is an exact differential equation because:
[tex]\frac{\partial P(x,y)}{\partial y} =-sin(x)[/tex]
[tex]\frac{\partial Q(x,y)}{\partial x}=-sin(x)[/tex]
With this in mind let's define f(x,y) such that:
[tex]\frac{\partial f(x,y)}{\partial x}=P(x,y)[/tex]
and
[tex]\frac{\partial f(x,y)}{\partial y}=Q(x,y)[/tex]
So, the solution will be given by f(x,y)=C1, C1=arbitrary constant
Now, integrate [tex]\frac{\partial f(x,y)}{\partial x}[/tex] with respect to x in order to find f(x,y)
[tex]f(x,y)=\int\ 2*cos(x)-y*sin(x)\, dx =2*sin(x)+y*cos(x)+g(y)[/tex]
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):
[tex]\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}[/tex]
Now, let's replace the previous result into [tex]\frac{\partial f(x,y)}{\partial y}=Q(x,y)[/tex] :
[tex]cos(x)+\frac{dg(y)}{dy}=cos(x)+sin(y)[/tex]
Solving for [tex]\frac{dg(y)}{dy}[/tex]
[tex]\frac{dg(y)}{dy}=sin(y)[/tex]
Integrating both sides with respect to y:
[tex]g(y)=\int\ sin(y) \, dy =-cos(y)[/tex]
Replacing this result into f(x,y)
[tex]f(x,y)=2*sin(x)+y*cos(x)-cos(y)[/tex]
Finally the solution is f(x,y)=C1 :
[tex]2*sin(x)+y*cos(x)-cos(y)=C_1[/tex]