find the general solution of the following first order differential equation.

dx/d(theta)=(xtan(theta))-(cos(theta))

show working

To find the general solution of the given first-order differential equation, we can use the method of separating variables. Follow these steps:

Step 1: Rearrange the equation to separate the variables, x and θ:
dx/(x tan(θ)) = dθ - cos(θ)

Step 2: Integrate both sides of the equation separately with respect to x and θ:
∫(1/(x tan(θ))) dx = ∫(dθ - cos(θ))

Step 3: Evaluate the integrals on each side:
ln|sec(θ)| = θ - sin(θ) + C

where C is the constant of integration.

Step 4: Rewrite the equation using the properties of logarithms:
sec(θ) = e^(θ - sin(θ) + C)

Step 5: Use trigonometric identities to simplify further:
sec(θ) = e^(θ) * e^(-sin(θ)) * e^(C)
sec(θ) = e^(θ) * (e^(-sin(θ)) * e^(C))

Step 6: Combine the two exponential terms into one constant:
sec(θ) = A * e^(θ)

where A = e^(-sin(θ)) * e^(C) is the new constant.

Step 7: Rewrite sec(θ) in terms of cos(θ):
1/cos(θ) = A * e^(θ)

Step 8: Isolate x on one side of the equation:
x = 1/(A * e^(θ) * cos(θ))

Therefore, the general solution to the given first-order differential equation is:
x = 1/(A * e^(θ) * cos(θ)), where A is a constant.