Just double checking to make sure I got the correct answer because it is not the answer the book gives.

I need to find the maximum and minimum value

$\displaystyle \frac{4x}{x^2+1}, -2<x<4$

so I got the derivative and solved for f'(x) = 0

the derivative being $\displaystyle \frac{4x^2-8x+4}{(x^2+1)^2} \Rightarrow x = 1$

solving f(x) for x = -2,1,4, I got the answers $\displaystyle -\frac{8}{5}, 2, \frac{16}{17}$

and so the max is 2 and min is -8/5 but the book has the max at 2 and min at -2

Is my work correct?

thank you!