# Show that quadratic is positive for all real values of x

I have been asked this question:

Show that $x^2 + 2px + 2p^2$ is positive for all real values of $x$.

I've worked it out like so:

Discriminant = $(2p)^2 - (4\times 1\times(2p^2)) = 4p^2 - 8p^2$

I realise that the discriminant must be $\le0$

No matter the value of $p$, $4p^2 - 8p^2$ will always be $\le0$.

Also, by completing the square:

$x^2 + 2px + 2p^2 = (x+p)^2 +p^2$

Again, the $p^2$ value on the right will always be positive.

Therefore, no matter the value of p, the parabola will be positive for all values of $y$.

Am I correct?

I feel that there could be a more mathematical way of expressing this.

• The problem statement is not correct if $p=0$. Commented Mar 29, 2015 at 17:35
• I don't see how that's the case. Commented Mar 29, 2015 at 17:36
• Completing the square is sufficient and perfectly "mathematical". Citing the discriminant is not necessary. Although what if $p=x=0$? Commented Mar 29, 2015 at 17:36
• @Okoning if $p=0$, then there exists a value of $x$, namely $x=0$, such that $x^2+2px+2p^2$ is not positive (it is $0$). Commented Mar 29, 2015 at 17:37
• Since the discriminant is $-4p^2$ and if $p\neq 0$, we have that the discriminant is negative and so the parabola does not cross the x axis and since the coefficient of $x^2$ is positive we know that the parabola legs go up and so the parabola is above the x-axis and always positive. Commented Mar 29, 2015 at 17:41

Simply:

Suppose $p\ne 0$, we have: $x^2+2px+2p^2=x^2+2px+p^2+p^2=(x+p)^2+p^2$ so, as a sum of two squares is always positive.

This is true for $x,p \in \mathbb{R}$ since we know that the square of any rela number is positive and the sum of two positive numbers is positive.

• Could you elaborate a bit more? Commented Mar 29, 2015 at 17:35
• @Okoning $x^2\ge 0$ for any real $x$ is a trivial inequality. Knowing it you can see that $(x+p)^2+p^2\ge 0$. Commented Mar 29, 2015 at 17:36