Is the property "being a derivative" preserved under multiplication and composition?

Let me address just one of your problems.

Problem. Suppose that $f$ and $g$ are both derivatives. Under what conditions can we assert that the product $fg$ is also a derivative?

The short answer is that this is not true in general. In fact even if we assume that $f$ is continuous and $g$ is a derivative the product need not be a derivative. However if we strengthen that to assuming that $f$ is not merely continuous but also of bounded variation, then indeed the product with any derivative would be a derivative.

This is an interesting problem and leads to interesting ideas.

For references to the statements here and an in depth look at the problem here are some references:

Bruckner, A. M.; Mařík, J.; Weil, C. E. Some aspects of products of derivatives. Amer. Math. Monthly 99 (1992), no. 2, 134–145.

Fleissner, Richard J. Distant bounded variation and products of derivatives . Fund. Math. 94 (1977), no. 1, 1–11.

Fleissner, Richard J. On the product of derivatives. Fund. Math. 88 (1975), no. 2, 173–178.

Fleissner, Richard J. Multiplication and the fundamental theorem of calculus—a survey. Real Anal. Exchange 2 (1976/77), no. 1, 7–34.

Foran, James On the product of derivatives, Fund. Math. 80 (1973), no. 3, 293–294.

I will edit in some links when I find them. Foran and Fleissner were close childhood friends who ended up pursuing their PhD at the same time in Milwaukee. Fleissner died in an automobile accident in 1983.

NOTE ADDED. Elementary students are not going to want to pursue this topic to quite this depth. But here is an exercise aimed at this level that they might find entertaining.

Exercise. Consider the function $$f(x)=\begin{cases} \cos \frac1x, & x\not=0 \\ 0 &x=0 \end{cases} $$ Show that the function $f$ is a derivative but that its square $f^2$ is not.


Let $X$ be the set of functions from $\mathbb R$ to $\mathbb R$ that have antiderivatives on all of $\mathbb R.$

Claim: There exists $f\in X$ such that $f^n\notin X$ for $n=2,3,\cdots.$ (Here $f^n$ is the $n$th power of $f,$ not the $n$th iterate.) This addresses both the product question and the composition question. If the claim is true, then $f\in X$ but the product $f\cdot f \notin X.$ Also, with $g_n(x) = x^n, n = 2,3, \dots,$ we see $g_n\circ f\notin X$ even though the $g_n$'s are very nice and $f\in X.$

The following lemma will be helpful:

Lemma: Suppose $f:\mathbb R\to \mathbb R,$ with $f=0$ on $(-\infty,0]$ and $f$ continuous on $(0,\infty).$ Then $f\in X$ iff $\int_0^x f$ converges for all $x>0$ and

$$\lim_{x\to 0^+}\frac{1}{x} \int_0^x f = 0.$$

Here the convergence of $\int_0^x f$ is in the improper integral sense, meaning $\int_0^x f = \lim_{a\to 0^+}\int_a^xf$ assuming the limit is finite.

Proof: $\implies:$ Let $f\in X,$ with $F'=f$ on $\mathbb R.$ Let $x>0.$ For any $a\in (0,x),$ $F\in C^1[a,x].$ Thus

$$\tag 1 F(x)-F(a) = \int_a^x f.$$

As $a\to 0^+,$ the left side of $(1)$ $\to F(x) - F(0)$ by the continuity of $F.$ It follows that the right side has a finite limit, hence $\int_0^x f$ converges. Note that we have shown

$$F(x)-F(0) = \int_0^x f.$$

Now $F'(0) = f(0)= 0.$ It follows that

$$0 = \lim_{x\to 0+}\frac{F(x)-F(0)}{x-0}= \lim_{x\to 0+} \frac{\int_0^x f}{x}$$

as desired.

$\impliedby:$ Simply define $F(x) = \int_0^x f.$ By the continuity of $f$ on $\mathbb R\setminus \{0\},$ we have $F'(x) = f(x)$ for $x\ne 0.$ At $0,$ we easily see the derivative from the left of $F$ at $0$ is $0.$ From the right we have

$$\lim_{x\to 0+}\frac{F(x)-F(0)}{x-0}= \lim_{x\to 0+} \frac{\int_0^x f}{x} = 0.$$

This shows $f\in X$ and the proof of the lemma is complete.

Proof of the claim: We build a slightly crazy $f\in X.$ For $n=2,3,\dots$ let $a_n = 1/n, b_n = 1/n + 1/2^n.$ Then the intervals $[a_n,b_n]$ are pairwise disjoint.

On each $[a_n,b_n]$ let $f$ be an isoceles triangular spike from the end points of height $2^n/n^3.$ Define $f =0$ everywhere else. Then $f$ satisfies the hypotheses of the lemma. Now

$$\int_0^1 f = \sum_{n=2}^{\infty} \frac{1}{2}\cdot \frac{1}{2^{n+1}}\cdot \frac{2^n}{n^3} = \sum_{n=2}^{\infty} \frac{1}{4n^3} <\infty.$$

To show $(1/x)\int_0^x f \to 0,$ suppose $x\in [a_n,a_{n-1}].$ Then

$$\tag 2 \frac{1}{x}\int_0^x f \le \frac{1}{a_n}\int_0^{a_{n-1}}f = n \sum_{k=n}^{\infty}\frac{1}{4n^3}.$$

The last sum is $O(1/n^2).$ So $(2)$ is no more than $nO(1/n^2) = O(1/n) \to 0.$ Thus the left side of $(2)\to 0$ as $x\to 0^+.$ The lemma now shows $f\in X.$

The easy part of the claim is showing higher powers of $f$ are not in $X.$ By the lemma, all we need to show is that $\int_0^1 f^2 = \infty.$ It will then follow that $\int_0^1 f^n = \infty, n=3,4,\dots $

Here's what I get (but the reader should check):

$$\int_{a_n}^{b_n} f^2 = \frac{2^n}{3n^6} .$$

Thus $\int_0^1 f^2 =\infty,$ by a mile. The proof of the claim is complete.