Proving two sets of polynomials are equal How could I go about showing that A is equal to B?

$A=\{q\in \mathbb{P}_2 : q(x)\geq 0 \text{ for all }x\in \mathbb{R}\}$,

$B=\{p\in \mathbb{P}_2 : p(x)=a(x−x_0)^2+b, \text{ where } a,b,x_0 \in \mathbb{R}, \text{ and } a\geq 0, b≥0\}$.
Certainly $B \subset A$, as we note that $u^2 \geq 0$ for each $u$, so $(x - x_0)^2 \geq 0$. Multiplying by a positive number keeps it positive, and adding a positive number keeps it positive still.

For $A \subset B$, try writing the quadratic in its "vertex form" $a(x-h)^2 +k$. In fact, show that when $q(x) = ax^2 + bx + c$ has leading coefficient $a \geq 0$, the aforementioned form can be achieved.
For $B$ we must require:


Parabola is concave up.
Apex is at or above $0$.


Given
$$
 p(x) = a(x-x_{0})^{2} +b 
$$

1 concavity

The concavity is given by the second derivative
$$
 p''(x) = 2a
$$
The concavity requirement is expressed as
$$
\boxed{
 a \ge 0
}
$$

2 minimum value

The $x$ coordinate of the apex is at $x=x_{0}$.
$$
 p(x_{0}) = b
$$
Therefore the requirement is
$$
 \boxed{ 
 b \ge 0
}
$$

Conclusion

All the polynomials created with $a\ge 0$, $b\ge0$: $B\subset A$.



The general quadratic form is
$$
 q(x) = \alpha x^{2} + \beta x + \gamma
$$

Recycle the two criteria from above.

1 concavity

$$
 q''(x) = 2 \alpha 
$$
Again, the requirement that $q(x)\ge 0$ is
$$
 \boxed{
\alpha \ge 0
}
$$

2 minimum value

The apex is located using
$$
 q'(x) = 2\alpha x - \beta = 0 \qquad \Rightarrow \qquad x_{min} = -\frac{\beta}{2\alpha}
$$
The minimum function value is
$$
 q (x_{min} ) = -\frac{\beta^2}{4 \alpha} + \gamma
$$
For $q (x_{min} ) \ge 0$, we must have
$$
\boxed{
 \gamma \ge \frac{\beta^2}{4 \alpha}
}
$$