$F$ smooth $\implies F=p=q$. This is a follow-up from my earlier question: Let $p,q$ be real polynomials. Let $F: \Bbb R \to \Bbb R$ be differentiable, then $p=q$.
Let $p,q$ be real polynomials. Let $F: \Bbb R \to \Bbb R$ be  defined by:
$$ F =
  \begin{cases} 
      \hfill q    \hfill & \text{X $\geq$ a} \\
      \hfill p \hfill & \text{X < a} \\
  \end{cases}
$$
Question


*

*$F$ smooth $\implies$ $F=p=q$. How can this be proved?

*A related question, what are some sufficient conditions to be able to write $F$ as $F=g(x)$, where g is some cocktail of elementary functions (in a function non-byparts way).

Start with the fact that the Taylor series of a polynomial, based around any point, is equal to the polynomial itself. The fact that $F$ is infinitely differentiable at $a$ implies that $p^{(k)}(a)=q^{(k)}(a)$ for all $k\geq 0$. This means that the Taylor series based around $a$ for $p$ and $q$ agree, which means by what I said above that $p=q$, and thus $F=p=q$.
I'm not quite sure what you're asking with your second question, but perhaps you are aware of the smooth function which is defined by $e^{-1/x}$ for $x>0$ and is zero for $x\leq 0$? This is a function which is inherently piecewise-defined and yet is smooth. So the result above is something special about polynomials.
