Step 1 :The function is defined differently for \(x \leq 2\) and \(x > 2\), so we will need to split the integral into two parts: one from \(-1\) to \(2\), and one from \(2\) to \(4\).
Step 2 :For \(x \leq 2\), the function is \(f(x) = x^{2} + 2\). The area under this part of the graph from \(-1\) to \(2\) can be found by integrating this function over that interval, which gives us an area of \(9\).
Step 3 :For \(x > 2\), the function is \(f(x) = 3x\). The area under this part of the graph from \(2\) to \(4\) can be found by integrating this function over that interval, which gives us an area of \(18\).
Step 4 :The total area under the graph of the function over the interval \([-1,4]\) is the sum of these two areas, which is \(9 + 18 = 27\).
Step 5 :Final Answer: The area under the graph of \(f\) over the interval \([-1,4]\) is \(\boxed{27}\).