How to find the maximum and minimum of the function $f(x) = \frac{3x}{x^2 -2x + 4}$ How would one find the maximum and minimum of such a function: $$f: \mathbb{R} \rightarrow \mathbb{R}, x \mapsto f(x) = \frac{3x}{x^2 -2x + 4}$$
I have just been introduced to functions in my calculus class (actually I missed that lectures), and I have more or less have the intuition of maximum and minimum of a function: the maximum should be the greatest $f(x)$ value in a certain range and the minimum the smallest $f(x)$ value. 
My first question is: does it makes sense to talk about maximum and minimum of a function in general (instead of just in a certain subset of the domain of the function)?
I need to use maxima to find the maximum and minimum, and then I need to show formally that they are really the maximum and minimum. 
My second question is: does anybody know how to find the maximum and minimum of a function using wxMaxima?
My third question is: I know the definition of maximum (and minimum), i.e. a number that is greater or equal (smaller or equal) to all other numbers. My problem is that I am not seeing how would I show it formally.
I used Wolfram Alpha to calculate the maximum and the minimum, and it says that the minimum is $-\frac{1}{2}$ at $-2$ and the maximum is $\frac{3}{2}$ at $2$.
 A: If one lets $y=\frac{3x}{x^2-2x+4},$ one has $y=0\iff x=0$.
Suppose that $y\not=0$.
Since $y(x^2-2x+4)=3x\iff yx^2+(-2y-3)x+4y=0$, considering the discriminant gives you
$$(-2y-3)^2-4\cdot y\cdot (4y)\ge 0\iff (2y-3)(2y+1)\le 0.$$
Hence, one has $-\frac 12\le f(x)\le \frac 32$. Here, the equalities are attained : $f(-2)=-\frac 12,f(2)=\frac 32$.
A: solve the equation $f'(x)=-\frac{3 (x-2) (x+2)}{\left(x^2-2 x+4\right)^2}=0$ for $x$.
if you know it is $\frac{3}{2}$ you can calculate
$$\frac{3}{2}-\frac{3x}{x^2-2x+4}=\frac{3(x-2)^2}{2(4-2x+x^2)}\geq 0$$
A: Since the discriminant of $x^2-2x+4$ is negative we have that $x^2-2x+4$ never vanishes, so it is enough to compute the minimum of $g(x)=\frac{1}{f(x)}$ over $\mathbb{R}^+$ and the maximum of $\frac{1}{f(x)}$ over $\mathbb{R}^-$, since $x=0$ is the only zero of $f(x)$ and $\lim_{x\to\pm\infty}f(x)=0$. Now:
$$ g(x) = \frac{x}{3}+\frac{4}{3x}-\frac{2}{3}, $$
so the stationary points of $g(x)$, by the AM-GM inequality, occur when $\frac{x}{3}=\frac{4}{3x}$, i.e. at $x=\pm 2$.
That directly gives:
$$ -\frac{1}{2}= f(-2) \leq f(x) \leq f(2) = \frac{3}{2} $$
as wanted.
A: If $x\ne0,$ $$\frac{3x}{x^2-2x+4}=\dfrac3{x-2+4/x}$$
If $x>0,x-2+4/x=\left(\sqrt x-2/\sqrt x\right)^2+4-4\ge2$
Consequently, $$\frac{3x}{x^2-2x+4}\le\dfrac32$$
If $x<0,$ let $x=-y^2,x-2+4/x=-y^2-2-4/y^2=-2-\left(y-2/y\right)^2-4\ge-6$
Consequently, $$\frac{3x}{x^2-2x+4}\ge\dfrac3{-6}=-\dfrac12$$
