3.3.7.4 Example 4
\begin{align*} \frac {dy}{dx} & =1+\frac {y}{2x}\\ y\left ( 0\right ) & =0 \end{align*}
The RHS is not defined at \(x=0\), therefore existence and uniqueness theorem does not apply.
Lets solve this as linear ode and not as homogeneous first to show that we obtain same
solution. It is much easier to solve this as linear ode.
\[ \frac {dy}{dx}-\frac {y}{2x}=1 \]
Integrating factor is \(I=e^{\int -\frac {1}{2x}dx}=e^{-\frac {1}{2}\ln x}=x^{-\frac {1}{2}}=\frac {1}{\sqrt {x}}\). Hence the above
becomes
\[ \frac {d}{dx}\left ( yI\right ) =I \]
Integrating
\begin{align*} \frac {y}{\sqrt {x}} & =\int \frac {1}{\sqrt {x}}dx\\ & =2\sqrt {x}+c\\ y & =2x+c\sqrt {x}\end{align*}
At \(y\left ( 0\right ) =0\)
\[ 0=0+\left ( 0\right ) c \]
Which is true for any \(c\). Therefore there are infinite number of solutions. The
solution is
\[ y=2x+c\sqrt {x}\]
Now we solve as homogeneous ode. Let \(y=ux\) or \(u=\frac {y}{x}\), hence \(\frac {dy}{dx}=x\frac {du}{dx}+u\) and the above ode
becomes
\begin{align*} x\frac {du}{dx}+u & =1+\frac {ux}{2x}\\ x\frac {du}{dx}+u & =1+\frac {u}{2}\\ x\frac {du}{dx} & =1+\frac {u}{2}-u\\ x\frac {du}{dx} & =\frac {2-u}{2}\end{align*}
This is separable
\[ \frac {2}{2-u}du=\frac {1}{x}dx\qquad \frac {2-u}{2}\neq 0 \]
Integrating
\begin{align*} \int \frac {2}{2-u}du & =\int \frac {1}{x}dx\\ -2\ln \left ( u-2\right ) & =\ln x+c\\ & =\ln \left ( c_{1}x\right ) \end{align*}
Replacing \(u=\frac {y}{x}\) gives
\begin{align*} -2\ln \left ( \frac {y}{x}-2\right ) & =\ln \left ( c_{1}x\right ) \\ -2\ln \left ( \frac {y}{x}-2\right ) -\ln \left ( c_{1}x\right ) & =0\\ \ln \left ( \frac {x}{\left ( y-2x\right ) ^{2}c_{1}}\right ) & =0 \end{align*}
Taking exponential
\begin{align*} \frac {x}{c_{1}\left ( y-2x\right ) ^{2}} & =1\\ x & =c_{1}\left ( y-2x\right ) ^{2}\end{align*}
Singular solution is when \(u=2\) or \(y=2x\). Hence solutions are
\begin{align*} x & =c_{1}\left ( y-2x\right ) ^{2}\\ y & =2x \end{align*}
Apply IC \(y\left ( 0\right ) =0\) on the above general solution gives
\[ 0=c_{1}\left ( 0\right ) \]
Which is true for any \(c_{1}\). Hence solution is
\begin{align*} \frac {1}{c_{1}}\sqrt {x} & =y-2x\\ y & =2x+\frac {1}{c_{1}}\sqrt {x}\end{align*}
Or
\[ y=2x+c_{2}\sqrt {x}\]
Which is same as earlier solution. Note that when \(c_{2}=0\) we obtain the singular solution \(y=2x\).
Hence this is not really a singular solution as it can be obtained from the general solution for
some value of \(c_{2}\) and should be removed now.