Question:medium

Solve the differential equation \( (x - \sin y) \, dy + (\tan y) \, dx = 0 \), given \( y(0) = 0 \).

Show Hint

For solving separable differential equations, ensure that the integrals are correctly computed and that initial conditions are applied to find the constant of integration.
Updated On: Jan 14, 2026
Show Solution

Solution and Explanation

The differential equation provided is: \[ (x - \sin y) \, dy + (\tan y) \, dx = 0 \] Rearranging to separate variables yields: \[ (x - \sin y) \, dy = - (\tan y) \, dx \] Further separation gives: \[ \frac{dy}{\tan y} = - \frac{dx}{x - \sin y} \] Integrating each side: The left-hand side integral is: \[ \int \frac{1}{\tan y} \, dy = \ln |\sin y| \] The right-hand side integral is: \[ \int \frac{1}{x - \sin y} \, dx \] This integral evaluates to: \[ \ln |x - \sin y| \] Combining these results gives the general solution: \[ \ln |\sin y| = - \ln |x - \sin y| + C \] where \( C \) is the constant of integration. Exponentiating both sides removes the logarithms: \[ |\sin y| = \frac{C}{|x - \sin y|} \] Applying the initial condition \( y(0) = 0 \) to determine \( C \): \[ \sin(0) = \frac{C}{|0 - \sin 0|} \quad \Rightarrow \quad C = 0 \] Consequently, the specific solution to the differential equation is: \[ \boxed{\sin y = 0} \]
Was this answer helpful?
0