How to calculate the absolute extrema for this equation Basically, I am trying to find the absolute extrema for this problem, but I am stuck after a few steps.
$$y=\frac{4}{x}+\tan\left(\frac{\pi x}{8}\right),\quad x\in[1,2].$$
I have figured out the derivative, which is
$$y'=-\frac{4}{x^2}+\sec^2\left(\frac{\pi x}{8}\right)\cdot\frac{\pi}{8}.$$
However, after reaching this step, I am stuck. I have tried setting the derivative equal to zero, but I do not get anywhere as I don't know what to do next. How can I solve this problem? Any help is appreciated. Thanks.

Since you already received good answers, let me show something amazing.
With the derivative you wrote, you cannot find its zero except using numerical methods.
To simplify the problem, let $x=\frac{8 t}{\pi }$ and the function becomes
$$f(t)=\frac{\pi }{2 t}+\tan (t)$$
$$f'(t)=\sec ^2(t)-\frac{\pi }{2 t^2}$$ Now, use the $1,400$ years old approximation
$$\cos(t) \simeq\frac{\pi ^2-4t^2}{\pi ^2+t^2}\qquad \text{for} \qquad -\frac \pi 2 \leq x\leq\frac \pi 2$$  which makes
$$f'(t) \sim \frac{\left(\pi ^2+t^2\right)^2}{\left(\pi ^2-4 t^2\right)^2}-\frac{\pi }{2 t^2}$$ Let $t=\sqrt y$ and, after simplifications, the derivative write
$$\frac {2 y^3+4 (\pi -4) \pi  y^2+2 \pi ^3 (4+\pi ) y-\pi ^5 } {2 \left(\pi ^2-4 y\right)^2 y }$$ The cubic in numerator shows only one real root since
$$\Delta=-100 \pi^9 (8 \pi ^2+83 \pi-128) <0$$ Now, using the hyperbolic method, this root is
$$y=\frac{2\pi}3\Bigg[4-\pi+\sqrt{44\pi- \pi^2-64} \sinh \left(\frac{1}{3} \sinh ^{-1}\left(\frac{2048-2112 \pi +411 \pi ^2+4 \pi ^3}{4(44\pi- \pi^2-64)^{3/2}}\right)\right)  \Bigg]$$ which is $y\sim 0.701420$; then $t\sim 0.837508$ and finally $x\sim 2.13270$ while the solution given by Newton method is $x=2.13448$.
Using the approximate solution, the minimum of the function would be $2.98561$ while its "exact" value is $2.98561$ !!
