Does the product $fg$ have antiderivative? Let $I$ be an interval and $g$ be a continuous function $g\colon I\to\mathbb{R}$.
Suppose that $f\colon I\to\mathbb{R}$ is a nonzero function and $f$
has antiderivative. Show that the product $fg$ has antiderivative.
I tried to use the fact that $fg=\frac{\left(f+g\right)^{2}-f^{2}-g^{2}}{2}$
and since $g$ is continuous then $g^{2}$ is also continuous and
therefore it has antiderivative. Also $f+g$ has antiderivative, but
I don't know if $f^{2}$ and $\left(f+g\right)^{2}$
have antiderivative. I couldn't prove that the square
of these functions has antiderivative and also I don't
know if this statement is false. Could you give me some suggestion?
Thanks.
 A: Short answer:
If $F$ is the antiderivative of $f$, then:
$$\int g \cdot f = \int g\circ \mathbb{1}_{I} \cdot f  = \int g\circ F^{-1}\circ F \cdot f = \left(\int g\circ F^{-1}\right)\circ F$$
Long answer:
Let $F$ is the antiderivative of $f$. Obviously $F$ is continuous.
By Darboux's theorem, $f$ has the intermediate value property.
As $f(x)\ne 0$, it follows that either $f>0$ or $f<0$ (otherwise by intermediate value property $f$ would take the value zero).
It follows that $F$ is strictly monotone, therefore injective.
Let $J$ be the image of $F$. By intermediate value property, $J$ is an interval. Moreover, $F:I\to J$ is continuous and injective, so it has a continuous inverse $F^{-1}:J\to I$
Let $h:J\to \mathbb{R}$ with $h=g\circ F^{-1}$. $h$ is continuous as composition of two continuous functions, thus it has an antiderivative $H:J\to \mathbb{R}$
Then $H\circ F:I\to \mathbb{R}$ is differentiable, as composition of two differentiable functions, and by the chain rule:
$$(H\circ F)'=H'\circ F\cdot F'=H'\circ F\cdot f=g\circ F^{-1}\circ F\cdot f=g\circ\mathbb{1}_I\cdot f=g\cdot f$$
That's all, folks!
