Official solution
\[2{x^2}dy = \left( {2xy + {y^2}} \right)dx\]
\[ \Rightarrow 2{x^2}{{dy} \over {dx}} = 2xy + {y^2}\]
\[ \Rightarrow {{2{x^2}} \over {2{x^2}{y^2}}}{{dy} \over {dx}} = {{2xy} \over {2{x^2}{y^2}}} + {{{y^2}} \over {2{x^2}{y^2}}}\]
\[ \Rightarrow {1 \over {{y^2}}}{{dy} \over {dx}} - {1 \over x}{1 \over y} = {1 \over {2{x^2}}}\]
Let \[ - {1 \over y} = t\]
\[ \Rightarrow {1 \over {{y^2}}}{{dy} \over {dx}} = {{dt} \over {dx}}\]
\[ \Rightarrow {{dt} \over {dx}} + t{1 \over x} = {1 \over {2{x^2}}}\]
This is linear differentiatial equation.
\[ \therefore I.F = {e^{\int {{1 \over x}dx} }} = {e^{\ln x}}\]
\[ \therefore t.{e^{\ln x}} = \int {{1 \over {2{x^2}}}.{e^{\ln x}}dx} \]
\[ \Rightarrow - {1 \over y}.x = \int {{1 \over {2{x^2}}}.xdx} \]
\[ \Rightarrow - {x \over y} = {1 \over 2}\int {{{dx} \over x}} \]
\[ \Rightarrow - {x \over y} = {1 \over 2}\ln x + c\]
This curve passes through the point (1, 2)
\[ \therefore - {1 \over 2} = 0 + c\]
\[ \Rightarrow c = - {1 \over 2}\]
\[ \therefore - {x \over y} = {1 \over 2}\ln x - {1 \over 2}\]
\[ \Rightarrow - {{2x} \over y} = \ln x - 1\]
\[ \Rightarrow y = {{2x} \over {1 - \ln x}}\]
\[ \Rightarrow f\left( x \right) = {{2x} \over {1 - \ln x}}\]
So, \[f\left( {{1 \over 2}} \right) = {{2 \times {1 \over 2}} \over {1 - \ln \left( {{1 \over 2}} \right)}} = {1 \over {1 + {{\log }_e}2}}\]