Solve the differential equation: \(x\frac{dy}{dx}+y=x\ln x\)

hirophysics

Question:

(1) Solve

\(x\frac{dy}{dx}+y=0\)

(2) Solve

\(x\frac{dy}{dx}+y=x\ln x\) by using the result from (1).

Answer:

(1) The original differential equation can be expressed as

\[  x\frac{dy}{dx}+\frac{dx}{dx}y =0, \qquad \rightarrow  x’y + xy’ =0  \]

Namely,

\[  \frac{d(xy)}{dx}=0 \qquad \rightarrow xy=C \quad \rightarrow \rightarrow y=\frac{C}{x}  \]

(2) Use variation of constants. When \(x \ln x = 0\), \(y=\frac{C(x)}{x}\). Then, plug it in the original equation.

\[  x\frac{d}{dx}\frac{C(x)}{x}+\frac{C(x)}{x}=x \ln x  \]

\[   \frac{xC'(x)-C(x)}{x^2}x+\frac{C(x)}{x}=x\ln x  \]

\[  C'(x) = x \ln x  \]

Integrate both sides.

\[  C(x) = \int x\ln x dx  \]

\[  C(x) = \frac{x^2}{2}\ln x – \int \left(\frac{1}{x} \frac{x^2}{2}\right)dx  \]

\[  C(x) =  \frac{x^2}{2}\ln x – \frac{x^2}{4}+ C  \]

Since \(C=xy\), we have

\[  xy = \frac{x^2}{2}\ln x – \frac{x^2}{4} + C \]

\[  y = \frac{x}{2}\ln x – \frac{x}{4} + \frac{C}{x}  \]