determining the maximum of a rational function

There is a way to do this without calculus.

You want to find the minimum value of $a$ for which $f(x) \leq a$ for all $a$. In other words, the minimum value of $a$ for which $$\frac{x}{x^2+1} \leq a$$ for all $x\in [0,4]$. Since $x^2+1$ is positive, the above inequality is equivalent to $$x\leq ax^2+a$$ $$ax^2-x+a \geq 0.$$

Call $g(x,a) = ax^2-x+a$. If $g(x,a)$ is always positive for $x$ in $[0,4]$, this means that $g(x,a)$ never crosses the $x$ axis: it has either no real roots in $g(x,a)$, or a double root. In both these cases, you then need to check if $g(x,a)$ is always nonnegative (instead of always nonpositive). (You probably covered how to solve polynomial inequalities in precalculus).

The roots of $g(x,a)$ are

$$x = \frac{1 \pm \sqrt{1-4a^2}}{2a}.$$

If $a\geq\frac{1}{2}$, then the roots are double or not real, and $g(0,a) = a \geq 0$, so all $a$ in this region are solutions to the inequality.

If $a\leq \frac{-1}{2}$, then the roots also are double or not real, but this time $g(0,a) < 0$ and the inequality is always violated.

If $-\frac{1}{2} < a < \frac{1}{2}$, then there is a non-doubled real root in $[0,4]$ and so the inequality does not hold for all $x$ in $[0,4]$.

So, finally, we've shown that $f(x) \leq a$ for all $x$ in $[0,4]$ precisely when $a \geq \frac{1}{2}$, so the maximum of $f$ in that region must be $\frac{1}{2}$. To find the value of $x$ that gives the maximum, we plug $a=\frac{1}{2}$ into the expression for the roots above and get

$$x = \frac{1 \pm \sqrt{0}}{2\frac{1}{2}} = 1.$$


Here's one way: $$ \frac{x}{x^2+1} = \frac{1}{\left(\frac{x^2+1}{x}\right)} $$ so the problem is that of minimizing $$ \frac{x^2+1}{x} = x + \frac 1 x = \left(x - 2 + \frac 1 x \right) + 2 = \left(\sqrt{x} - \frac{1}{\sqrt{x}} \right)^2 + 2. $$

That square is minimized by making to equal to zero.

It can also be done by using calculus. And I think there may be a proof via Euclidean geometry with essentially no algebra, but I'm not sure of that yet.