TITLE: How to maximize or minimize $f(x)=ax^2+bx$?
QUESTION [6 upvotes]: I am trying to self-study calculus from the Internet. I have learnt things mostly from MIT OCW site and also from other sites. However, I am stuck on this simple problem:

Find the maximum/minimum value of $f(x)=ax^2+bx$ (where a and b are constants)

First we can find the critical points by solving $f'(x)=0 \implies 2ax+b = 0 \implies x={-b\over2a}$.
But I don't think that is the solution, because $f(0)=a(0)^2+b(0)=0$.
So obviously, minimum or maximum should be $0$?
What have I done wrong?
(Sorry for asking such A basic question, I have just started learning calculus).

REPLY [3 votes]: If $a=0$, then $f(x)=bx$, which is trivial.
If $a\not =0$, then we have the following form:$$f(x)=a\left(x+\frac{b}{2a}\right)^2-\frac{b}{4a^2}.$$
This is called parabola whose vertex is $(-b/(2a),-b/(4a^2))$.
Then, if $x\in\mathbb R$, we know the followings :

When $a\gt 0$, $f(x)$ does not have the maximum and the minimum is $f(-b/(2a))=-b/(4a^2)$.
When $a\lt 0$, the maximum is $f(-b/2a)=-b/(4a^2)$ and $f(x)$ does not have the minimum.