# Functions for which $\int f(g(x))\, \mathrm dx = f\left(\int g(x) \, dx\right)$

I was playing around with some integrals, and this question popped into my head:

What functions exist such that the following is true? $$\int f(g(x))\;\mathrm dx = f\left(\int g(x)\;\mathrm dx\right)$$

There there's the obvious example of $f(x) = x, \;g(x)=e^x$, but I was wondering if others exist.
EDIT 1: As pointed out in the comments, this is true for any $g$ if $f(x) = x$. But, this is sort of trivial--I'd really like to know about for other assignments of $f$... :)

My question is twofold:

1. Are there known functions that satisfy this equality?
2. What sort of topic in math would this fall under? (e.g. Abstract Algebra, Differential/Integral equations, etc.)

EDIT 2:
I'd also accept an answer to a similar, but slightly different question, as phrased in the comments by user1551; if it's easier/more feasible to answer:

Find a pair of functions $f$ and $g$ such that $\int_a^b f(g(x))dx=f\left(\int_a^bg(x)dx\right)$ for any interval $[a,b]$

-
Well, $f(x)=x$ is enough, $g$ can be arbitrary.. Also, $f(x)=a\,x$ works. – Berci Jun 27 '13 at 0:17
Worthless answer, but $f(x) = 0$. – Hawk Jun 27 '13 at 0:19
@Berci Eh. True. :) I overlooked that... (editing it in now) I guess I'm really looking for a more interesting def of $f$ :) – apnorton Jun 27 '13 at 0:20
@sidht But, if $f(x) = 0$, isn't $\int f(g(x))\;dx = +C$, while $f(\int g(x)\;dx) = 0$? – apnorton Jun 27 '13 at 0:21
Indefinite integral causes ambiguities. For definite integrals with fixed integration domains, there may be too many ugly solutions. It's perhaps more interesting to change the question to: find a pair of functions $f$ and $g$ such that $\int_a^b f(g(x))dx=f\left(\int_a^bg(x)dx\right)$ for any interval $[a,b]$. – user1551 Jun 27 '13 at 0:26

I can reformulate the problem in the following way. Suppose we have $$\int_0^x f(g(y)) dy = f\left( \int_0^x g(y)dy \right).$$ Take a derivative of each side to get $$f(g(x))=g(x) f'\left(\int_0^x g(y)dy \right).$$ Assume $g(x)$ is invertible. Then letting $z=g(x)$ we get $$\frac{f(z)}{z} = f'\left( \int_0^{g^{-1}(z)} g(y) dy \right).$$

Let $h(z)=\int_0^{g^{-1}(z)} g(y) dy$ be some arbitrary function. Note that this is the same as $h(g(x))=\int_0^x g(y)dy$. Then we look for solutions to $$\frac{f(z)}{z} =f'(h(z)),\qquad f(0)=0$$ $$h'(z)=z/g'(g^{-1}(z)), \qquad h(g(0))=0.$$ The boundary conditions come from plugging in $x=0$ into the appropriate expressions. We see that regardless of what $h(z)$ is, $f(z)=z$ is always a solution, as mentioned in the comments.

I spent some time trying to find another solution, but I could not. However, if you modify the original problem to $$\int_0^x f(g(y)) dy = f\left( \int_{-\infty}^x g(y)dy \right),$$ then our new equations reduce to $$\frac{f(z)}{z} =f'(h(z)),\qquad f(0)=0$$ $$h'(z)=z/g'(g^{-1}(z)), \qquad h(g(-\infty))=0.$$

It turns out that $f(x)=x^p$ and $h(x)=x/p^{p-1}$ satisfy the first equation. Then if we choose $g(x)=e^{x p^{p-1}}$, we find the second equation is also satisfied.

If we really asked, for what $f$ and $g$ does there exist such that $\int_{-\infty}^x f(g(y)) dy - f\left( \int_{-\infty}^x g(y)dy \right)$ is constant, then the above gives a new solution.

-
In the last part of this answer, where you say $f(x) = x^p$, are you meaning $p$ is prime, or $p$ is just some exponent? (I'm assuming it's the latter, but just wanted to make sure...) – apnorton Jun 27 '13 at 2:21
The variable $p$ is intended to be some arbitrary exponent. If you substitute in, you should see it all works out. (BTW, we both visit HSD, though I am mostly absent these days.) – nayrb Jun 27 '13 at 2:24
Ok, that makes sense. (Re: HSD--I knew it! I had just sent you a PM over there to make sure... :) It's amazing how small the internet can be sometimes.) – apnorton Jun 27 '13 at 2:26