How to apply Simpson's rule to f(x)^2*x?

31 Views Asked by At

I have points available for $x$ and $f(x)$. To calculate area between $(f(x)^2)\cdot(x)$ and $x$, can I consider $g(x) = (f(x)^2)\cdot(x)$ and apply Simpson's rule on $g(x)$ and $x$?