Question:medium

Solve the differential equation \[ x\frac{dy}{dx}=y-x\sin^2\left(\frac{y}{x}\right), \quad \text{given that } y(1)=\frac{\pi}{6}. \]

Show Hint

When a differential equation contains the ratio \(y/x\), use the substitution \(v=\frac{y}{x}\). This converts the equation into a separable form.
Updated On: Mar 10, 2026
Show Solution

Solution and Explanation

Step 1: Use substitution
We begin by making a substitution to simplify the equation. Let: \[ v = \frac{y}{x}, \quad \text{so that} \quad y = vx. \] Differentiating $y = vx$ with respect to $x$ gives: \[ \frac{dy}{dx} = v + x \frac{dv}{dx}. \]

Step 2: Substituting into the differential equation
Now, substitute $y = vx$ and $\frac{dy}{dx} = v + x \frac{dv}{dx}$ into the given differential equation: \[ x \left( v + x \frac{dv}{dx} \right) = vx - x \sin^2(v). \] Simplifying this: \[ x v + x^2 \frac{dv}{dx} = vx - x \sin^2(v). \] The terms involving $vx$ on both sides cancel out, leaving: \[ x^2 \frac{dv}{dx} = -x \sin^2(v). \]

Step 3: Simplify and separate variables
Dividing both sides by $x$: \[ x \frac{dv}{dx} = -\sin^2(v). \] Now, separate variables: \[ \frac{dv}{\sin^2(v)} = -\frac{dx}{x}. \] The left-hand side can be rewritten as: \[ \int \frac{dv}{\sin^2(v)} = \int -\frac{dx}{x}. \] The integral of $\frac{1}{\sin^2(v)}$ is $-\cot(v)$, and the integral of $\frac{1}{x}$ is $\ln|x|$. Therefore: \[ -\cot(v) = -\ln|x| + C. \] Simplifying this gives: \[ \cot(v) = \ln|x| - C. \]

Step 4: Use the initial condition
We are given that $y(1) = \frac{\pi}{6}$, so when $x = 1$, we have: \[ v = \frac{y}{x} = \frac{\pi}{6}. \] Substituting this into the equation $\cot(v) = \ln|x| - C$: \[ \cot\left(\frac{\pi}{6}\right) = \ln(1) - C. \] Since $\cot\left(\frac{\pi}{6}\right) = \sqrt{3}$ and $\ln(1) = 0$, we get: \[ \sqrt{3} = -C. \] Therefore, $C = -\sqrt{3}$.

Step 5: Final solution
Substituting $C = -\sqrt{3}$ into the equation for $\cot(v)$: \[ \cot(v) = \ln|x| + \sqrt{3}. \] Since $v = \frac{y}{x}$, we replace $v$: \[ \cot\left(\frac{y}{x}\right) = \ln|x| + \sqrt{3}. \] This is the solution to the differential equation.

Final Answer:
\[ \cot\left(\frac{y}{x}\right) = \ln|x| + \sqrt{3}. \]

Was this answer helpful?
0