## Solving the Differential Equation: (-xy sin(x) + 2y cos(x)) dx + 2x cos(x) dy = 0

This differential equation is a **first-order, non-linear, exact differential equation**. To solve it, we'll follow these steps:

### 1. Checking for Exactness

A differential equation of the form M(x, y) dx + N(x, y) dy = 0 is exact if:

∂M/∂y = ∂N/∂x

In our case, M(x, y) = -xy sin(x) + 2y cos(x) and N(x, y) = 2x cos(x).

∂M/∂y = -x sin(x) + 2cos(x) ∂N/∂x = 2cos(x) - 2x sin(x)

Since ∂M/∂y = ∂N/∂x, the equation is **exact**.

### 2. Finding the Potential Function

An exact differential equation can be derived from a potential function, u(x, y). This means:

∂u/∂x = M(x, y) ∂u/∂y = N(x, y)

Integrating the first equation with respect to x, we get:

u(x, y) = ∫ (-xy sin(x) + 2y cos(x)) dx = xy cos(x) + 2y sin(x) + g(y)

Here, g(y) is an arbitrary function of y, which will be determined by the second equation.

Differentiating this expression with respect to y, we get:

∂u/∂y = x cos(x) + 2sin(x) + g'(y)

Comparing this to N(x, y), we see that g'(y) = 0. Therefore, g(y) is a constant, which we can set to zero without loss of generality.

### 3. The Solution

The potential function is:

u(x, y) = xy cos(x) + 2y sin(x)

The general solution to the exact differential equation is given by:

**u(x, y) = C**

where C is an arbitrary constant.

Therefore, the general solution of the given differential equation is:

**xy cos(x) + 2y sin(x) = C**

This equation represents a family of curves that are the solutions to the given differential equation.