Equation f(x)=0
There must be two of them 1,-1.
It is also symmetric about x=-2, so there are two outer ones, and these two are -5 and -3.
Substitution results are b= 15 and a= 16.
At this point, the analytical formula is obtained.
Take the derivative and make it equal to 0.
Find the extreme point and substitute it to get the maximum value.
Hope to adopt
If you have any questions, just ask.