Solve the differential equation
$$\frac { \mathrm { d } y } { \mathrm {~d} x } = \frac { \sqrt { 1 + 2 y } } { x ^ { 2 } }$$
given that \(y = 4\) when \(x = 1\).
Show that the solution can be written as \(y = \frac { 1 } { 2 } \left( 15 - \frac { 8 } { x } + \frac { 1 } { x ^ { 2 } } \right)\).