A certain curve is such that its gradient at a general point with coordinates \((x, y)\) is proportional to \(\frac{y^2}{x}\). The curve passes through the points with coordinates \((1, 1)\) and \((e, 2)\). By setting up and solving a differential equation, find the equation of the curve, expressing \(y\) in terms of \(x\). [8]