<s>[INST] Which value of $a$ maximizes $\int_{a-1}^{a+1}\frac{1}{1+x^{8}}dx$? I am not being able to understand the graphical method of solving this, any simple explanation will be appreciated.
A non-graphical calculation will be very helpful too.
Thank you so much in advance!
 [/INST] We can apply the fundamental theorem of calculus. Let $f(x)=\frac{1}{1+x^8}$. Then if $F(t)=\int_0^t f(x)dx$, we have $F'(t)=f(t)$. We also have $\int_a^b f(x)dx=F(b)-F(a)$. Putting this together, we can write $$\int_{a-1}^{a+1}f(x)dx=F(a+1)-F(a-1).$$ Taking the derivative with respect to $a$, we get $$F'(a+1)-F'(a-1)=f(a+1)-f(a-1)=\frac{1}{1+(a+1)^8}-\frac{1}{1+(a-1)^8}.$$ We find the critical points by setting this equal to zero, so we end up with $1+(a+1)^8=1+(a-1)^8$, or $(a+1)^8-(a-1)^8=0$. We can apply the binomial theorem to rewrite this as $$\sum_{k=0}^8\binom{8}{k}(1+(-1)^k)a^k=16a^7+112a^5+112a^3+16a=0.$$ We simplify slightly to obtain $a(a^6+7a^4+7a^2+1)=0$. We can check that two more roots are $\pm i$. Factoring leaves us with $$a(a^2+1)(a^4+6a^2+1)=a(a^2+1)\left(a^2-\dfrac{-6+\sqrt{32}}{2}\right)\left(a^2-\dfrac{-6-\sqrt{32}}{2}\right).$$ We can check that all of the factors except $a$ have only imaginary roots, so the only real root is $a=0$. Now, we should check that this critical point is a maximum. We compute the second derivative of the original expression: $$\frac{d}{da}\left(\frac{1}{1+(a+1)^8}-\frac{1}{1+(a-1)^8}\right)=-\frac{8(a+1)^7}{(1+(a+1)^8)^2}+\frac{8(a-1)^7}{(1+(a-1)^8)^2}.$$ Plugging in $a=0$, we obtain $-4$, so $0$ is indeed a local maximum (and since it is the only local maximum on an unbounded domain, it is indeed the global maximum).
</s>