# Integration of the defined function

Calculus Level 4

Let $$f(x)=x^3-3x-1.$$ For a real number $$t\geq-1,$$ define the function $g(t)=\max_{-1\leq x\leq t}|f(x)|.$ If $$\displaystyle \int_{-1}^{1}g(t)\, dt =\frac{p}{q},$$ where $$p$$ and $$q$$ are coprime positive integers, what is the value of $$p+q?$$

×