Step 1 :Substitute the x and y values of the point into the equation \(y = ax^2\) to get \(-18 = a(3)^2\).
Step 2 :Solve the equation to find the value of a, which is -2.
Step 3 :\(\boxed{y = -2x^2}\) is the quadratic function that passes through the point (3,-18).