$f(x),g(x)$,2 quadratic polynomials:$|f(x)|≥|g(x)|∀x ∈ R$. Find the number of distinct roots of equation $h(x)h''(x)+(h'(x))^2=0$ if $h(x)=f(x)g(x)$ Question:
If $f(x)$ and $g(x)$ are two distinct quadratic polynomials and $|f(x)|≥|g(x)|$ $∀$ $x ∈ R$.
Also  $f(x)=0$ has real roots.
Find the number of distinct roots of equation
$$h(x)h''(x)+(h'(x))^2=0$$ where $h(x)=f(x)g(x)$
What I tried:
I attempted to find $h(x)h''(x)+(h'(x))^2=0$ in terms of $f(x)$ and $g(x)$ using $h(x)=f(x)g(x)$, upon which I got the following equation,
$$g(x)^2[f(x)f''(x)+(f'(x))^2]+f(x)^2[g(x)g''(x)+g'(x)^2]+4f(x)f'(x)g(x)g'(x)=0$$
I don't know how to proceed, or where to use the fact that $|f(x)|≥|g(x)|$ $∀$ $x ∈ R$ and that $f(x)=0$ has real roots.
I also tried actually using general equations for the quadratic polynomials $f(x)$ and $g(x)$
$$f(x)=a_1x^2+b_1x+c_1$$
$$g(x)=a_2x^2+b_2x+c_2$$
I then tried deducing some information from $|f(x)|≥|g(x)|$, coming to the conclusion that $|a_1|<|a_2|$, and that $$|\frac{b_1^2}{4a_1}-c_1|>|\frac{b_2^2}{4a_2}-c_2|$$
I found the expressions for $f'(x)$,$f''(x)$,$g'(x)$ and $g''(x)$ and plugged them into the equation I had obtained. This lead to a rather complicated degree 6 equation, as one would expect.
I've no idea what to do next. Any help or hints are appreciated...
Thanks in advance!
Regards
 A: Let $f(x) = a(x-p)(x-q)$, where $a \neq 0, p, q \in \mathbb R$.  Then $|g(p)|\leqslant |f(p)|=0 \implies g(p)=0$, so $g(x)= b(x-p)(x-q)$ for some   real $b\neq 0$.  Thus we have $h(x) = c(x-p)^2(x-q)^2$ for some real $c\neq0$.
The condition $hh''+(h')^2=0$ is the same as $\dfrac{d}{dx} hh' = 0$.
However, note $h(x)$ has two double roots, hence shares those roots with $h'(x)$.  The third root of the cubic $h'(x)$ must also then be real, between those two roots $p, q$.  Thus in all, $hh'$ is a seventh degree polynomial with roots of multiplicity $3$ at $p, q$, and one root at some $r$ between $p, q$.
This implies the derivative of $hh'$ must have all six roots real, two with multiplicity two at $p, q$, and one each between $p, r$ and $r, q$.
Putting it all together, if $p, q$ are distinct, $hh''+(h')^2=0$ has four distinct roots, two of multiplicity two at $p, q$ and two distinct ones between $p$ and $q$.  If $p=q$, then $hh''+(h')^2$ has only one root, which however has multiplicity $6$.
A: Since $|f(x)|≥|g(x)|$ implies they have common roots, they both are the same polynomial with a different scaling factor. So, let $g(x)=\lambda f(x)$.
$\Rightarrow h(x)=\lambda f^2(x)$
$\Rightarrow h'(x)=2\lambda f(x)f'(x)$
$\Rightarrow h''(x)=2\lambda(f'^2(x)+f(x)f''(x))$
Substituting and simplifying, we get $f^2(x)(f(x)f''(x)+3f'^2(x))=0$
Now let $f(x)=ax^2+bx+c$. As we are given it has real roots, $b^2-4ac>0 \Rightarrow 40b^2-160ac>0$
Finally substitute $f(x)$ in the previous equation we got after simplification to yield $$f^2(x)(14a^2x^2+14abx+3b^2+2ac)=0$$
Sign of the discriminant for this quadratic will tell us the nature of its roots
$D=a^2(196b^2-56(3b^2+2ac))=a^2(b^2-4ac)$
But previously, $b^2-4ac>0$ and since $a^2>0$, hence, $D>0$
Thus the number of real roots of the given equation is $4$ ($2$ from $f^2(x)$ we factored out earlier and $2$ due to the discriminant of the second quadratic factor being $>0$)
EDIT: Since the question asks for distinct roots of the expression and only mentions that the roots of $f(x)$ are real there is a valid possibility that the roots of $f(x)$ are real and equal. In other words, $b^2-4ac=0$. Solving for the roots in this case we see that all $4$ solutions to the final equation are equivalent
Thus, the number of real roots of the given expression is either $4$ or $1$
A: It can also be helpful to express the quadratic functions in "vertex form".  If we write $ \ g(x) \ = \ a·(x - H)^2 + K \ \ $ with $ \ a \neq 0 \ \ , $ then it will have real zeroes for $ \ a·K \ \le \ 0 \ \ . $  (We will allow this "reference function" to have a representative parabola "opening upward or downward".)  The required inequality condition, as noted in the other posted answers, then sets $ \ f(x) \ = \ s·g(x) \ \ , $ where $ \ s \ $ is a "scaling factor" with $ \ s^2 \ \ge \ 1 \ \ ; $ this leaves open the possibilities of the two representative parabolas having like or opposite "opening directions".  In what follows, we will save a bit of writing by using $ \ \xi \ = \ x - H \ \ . $
As Macavity observes,  $ \ h(x)·h''(x) \ + \ [h'(x)]^2 \ = \  \frac{d}{dx} [ \ h(x)·h'(x) \ ] \ = \ 0 \ \ . $ Applying this, we have
$$ h(\xi) \ \ = \ \ s·[ \ g(\xi) \ ]^2 \ \ = \ \ s·[ \ a^2·\xi^4 \ + \ 2·a·K·\xi^2 \ + \ K^2 \ ] \ \ , $$
$$ h'(\xi) \ \  = \ \ 4·a·s·[ \ a ·\xi^3 \ + \ K·\xi  \ ]   $$
$$ \Rightarrow \ \ h(\xi)·h'(\xi) \ \  = \ \ 4·a·s^2·[ \ a^3 ·\xi^7 \ + \ 2·a^2·K ·\xi^5 \  + \  a ·K^2 ·\xi^3 \ + \ a^2·K ·\xi^5 \ + \ 2·a·K^2·\xi^3 \ + \ K^3·\xi  \ ] \ \  $$
$$ = \ \ 4·a·s^2 · [ \ a^3 ·\xi^7 \ + \ 3·a^2·K ·\xi^5 \  + \  3·a ·K^2 ·\xi^3 \ +   \ K^3·\xi   \ ]   $$
$$ \Rightarrow \ \ \frac{d}{d\xi} [ \ h(\xi)·h'(\xi) \ ] \   \ = \ \ 4·a·s^2 · [ \ 7·a^3 ·\xi^6 \ + \ 15·a^2·K ·\xi^4 \  + \  9·a ·K^2 ·\xi^2 \ +   \ K^3  \ ]   $$
Since $ \ a \neq 0 \ $ and $ \ s^2 \ge 1 \ \ , $ we will only be concerned with circumstances in which the polynomial in brackets is equal to zero.  This function of $ \ \xi \  $ has even symmetry, which tells us that it is symmetrical about the vertex $ \ x \ = \ H \ \ . $
The simple case is for $ \ \mathbf{K \ = \ 0} \ \   $ (vertex on the $ \ x-$axis), in which case $ \ f(x) \ $ and $ \ g(x) \ $ have a single zero of multiplicity $ \ 2 \ $ at $ \ x \ = \ H \ \ $ and $ \ h(\xi)·h''(\xi) \ + \ [h'(\xi)]^2 \ = \ 28a^4s^2·\xi^6 \ $ is thus also equal to zero only there (with multiplicity $ \ 6 \ $ as remarked upon by Macavity).
Otherwise, we have $ \ a·K < 0 \ \ , $ for which
$$ 4·s^2 · [ \ 7·a^4 ·\xi^6 \ + \ 15·a^2·(aK) ·\xi^4 \  + \  9·(aK)^2 ·\xi^2 \ +   \ (aK)·K^2  \ ] \ \ = \ \ 0 \ \ .  $$
We see that the signs of the terms alternate:  the "Law of Signs" then tells us that there are either three or one positve real zeroes for $ \ \xi^2 \ \ . $  It is worth noting at this point that $$ \ h(\xi) \ = \ 0 \ \ \Rightarrow \ \ \xi^2 \ = \ -\frac{K}{a} \ > \ 0  \ \ $$
with $ \ h'(\xi) \ $ also equal to zero there, and $$ h''(\xi) \ = \ 4as·(  3a ·\xi^2 \ + \ K ) = \ 0 \ \ \Rightarrow \ \ \xi^2 \ = \ -\frac{K}{3a} \ > \ 0 \ \ . $$
This may serve to clarify why some of the zeroes for $ \ h(x)·h''(x) \ + \ [h'(x)]^2 \ $ are not immediately obvious:  we have $ \ 0·h''(x) \ + \ 0^2 \ $ at $ \ (x - H)^2 \ = \ -\frac{K}{a} \ \ , $ but it is not clear where we might have $ \ [h'(x)]^2 \ = \ -h(x)·h''(x) \ \ . $  Now that we know where a zero for $ \ \frac{d}{d\xi} [ \ h(\xi)·h'(\xi) \ ] \ $ lies, however, it becomes easy to factor
$$ 7a^3 ·\xi^6 \ + \ 15a^2K ·\xi^4 \  + \  9aK^2 ·\xi^2 \ + \ K^3 \ \ = \ \ (a·\xi^2 \ + \ K)^2 \ · \ (7a·\xi^2 \ + \ K) \ \ . $$
We see then that for $ \ \mathbf{a·K < 0} \ \ , \   \ h(x)·h''(x) \ + \ [h'(x)]^2 \ $  has zeroes of multiplicity $ \ 2 \ $ at $ \ x \ = \ H \ \pm \ \sqrt{-\frac{K}{a}} \ \ $ and of multiplicity $ \ 1 \ $ at $ \ x \ = \ H \ \pm \ \sqrt{-\frac{K}{7a}} \ \ $ (four distinct zeroes of total multiplicity $ \ 6 \  \ ) . $
