Problem 246
Hard Further Methods

Solve the initial value problem xyy' = x^2y' + y^2 , y(1) = 1

Solve the initial value problem $xyy' = x^2y' + y^2$, $y(1) = 1$.

Explanation of Method

The equation does not separate cleanly in \(y(x)\), but it becomes a Bernoulli equation if we treat \(x\) as the dependent variable and \(y\) as the independent one. After solving that linear (Bernoulli-reduced) equation for \(x(y)\), the initial condition fixes the constant.

Rewrite the equation

Starting from \(xy\\,dy/dx = x^2\\,dy/dx + y^2\), collect the \(dy/dx\) terms: \(x(y-x)\\dfrac{dy}{dx} = y^2\), so \(\\dfrac{dy}{dx} = \\dfrac{y^2}{x(y-x)}\).

Interchange the roles of \(x\) and \(y\)

Inverting, \(\\dfrac{dx}{dy} = \\dfrac{x}{y} - \\dfrac{x^2}{y^2}\), i.e. \(\\dfrac{dx}{dy} - \\dfrac{x}{y} = -\\dfrac{x^2}{y^2}\). This is a Bernoulli equation in \(x(y)\) with exponent \(n=2\).

Bernoulli substitution

Let \(v = x^{-1}\), so \(dx/dy = -x^2\\,dv/dy\). Substituting and dividing by \(-x^2\) gives the linear equation \(\\dfrac{dv}{dy} + \\dfrac{v}{y} = \\dfrac{1}{y^2}\).

Solve the linear equation

The integrating factor is \(\\mu(y) = y\). Then \(\\dfrac{d}{dy}(vy) = \\dfrac{1}{y}\), so \(vy = \\ln|y| + C\), i.e. \(v = \\dfrac{\\ln|y|+C}{y}\).

Back-substitute

Since \(v = 1/x\), \(\\dfrac{1}{x} = \\dfrac{\\ln|y|+C}{y}\), which gives the general solution \(x = \\dfrac{y}{\\ln y + C}\) (for \(y>0\)).

Apply the initial condition

At \(x=1,\\,y=1\): \(1 = \\dfrac{1}{\\ln 1 + C} = \\dfrac{1}{C}\), so \(C=1\). The particular solution is \(x(\\ln y + 1) = y\).

Verify

Implicit differentiation of \(x(\\ln y+1)=y\) with respect to \(x\) gives \(\\dfrac{dy}{dx} = \\dfrac{y(\\ln y+1)}{y-x}\). Using \(\\ln y+1 = y/x\) from the solution itself, this becomes \(\\dfrac{dy}{dx} = \\dfrac{y^2}{x(y-x)}\), matching the original equation exactly (confirmed symbolically with sympy). At \(x=1\): \(1\\cdot(\\ln 1+1) = 1\), so \(y(1)=1\) holds. \(\\checkmark\)


Result

Final answer:

Boxed result: \[ \\boxed{x(\\ln y + 1) = y} \] equivalently \(x = \\dfrac{y}{\\ln y + 1}\).