Evaluate $\displaystyle\int_{0}^{5} \max ({{x}^{2},{6x-8}})\,dx$
My attempts : $\max ({{x}^{2},{6x-8}})$= $6x -8 \,$ if $\,0≤{x}^{2}≤4$.
Now I take $\displaystyle\int_{0}^{2}{(6x-8)}\,dx +\int_{2}^{5}{{x}^{2}}\,dx = -4 + 39$.
I got the answer that is 35
Is my answer is correct or not? .
Please verify.
Thanks in advance
It's $$\int\limits_0^2x^2dx+\int\limits_4^5x^2dx+\int\limits_2^4(6x-8)dx=43$$ Because $x^2\geq6x-8$ for $x\in[0,2]\cup[4,5]$ and $6x-8\geq x^2$ for $x\in[2,4]$.