Find all continuous functions $g(x)$ satisfying $\int_{0}^{f(x)}f(t)g(t)dt = g(f(x))-1$ 
Given a differentiable function $f(x)$, find all continuous functions $g(x)$ satisfying $$\int_{0}^{f(x)}f(t)g(t)dt = g(f(x))-1.$$

I differentiated both sides to get $f(f(x))f'(x)g(f(x)) = g'(f(x))f'(x)$. Thus, if $f'(x) \neq 0$ we have $f(f(x))g(f(x)) = g'(f(x))$. What do I do from here?
 A: Without dividing by f'(x), we use the chain rule to rewrite it as follows: 
$f(f(x))f'(x)g(f(x)) = g'(f(x))f'(x)$ $\rightarrow$  $(f(f(x))' g(f(x)) = (g(f(x)))'$ $\rightarrow$  $(f(f(x))' = \frac{(g(f(x)))'}{g(f(x))}$.
Let y = g(f(x)). Then substituting and rewriting gives: 
$\frac{df}{df}\frac{df}{dx} = \frac{y'}{y}$ $\rightarrow $ $\frac{df}{dx} = \frac{y'}{y}$ 
Integrating both sides gives:
f(x) + A = In|y| +B 
where A,B $\in \mathbb R$. Rewriting again:
$e^{f(x)+A}- B$ = |y| $\rightarrow $$Ce^{f(x)}- B$ = |y| where C = $e^{A}$.Finally: 
$\rightarrow $$Ce^{f(x)}- B$ = |g(f(x))|
This is the family of continuous functions that satisfies the integral. 
I hope this is right,I haven't had a good run on here lately.......lol 
A: Let $a = \inf(\text{im } f)$ and $b = \sup(\text{im }f)$, where $\text{im }f$ is the image of $f$ (either $a$ or $b$ could be infinite). Notice the following: If $y\in (a,b)$, then the equality $$\int\limits_{0}^{z}{f(t)g(t)\text{ d}t} = g(z)-1$$ holds for all $z$ in some neighborhood of $y$. By the Fundamental Theorem of Calculus, this implies that $g$ is differentiable at $y$, with $g'(y) = f(y)g(y)$. Thus, if $y_1,y_2\in (a,b)$ are both in the interior of the image, then the interval between the two points is also in $(a,b)$ (since the image is connected), and it is easy to see that $$\ln\left(\frac{g(y_2)}{g(y_1)}\right) = \int\limits_{y_1}^{y_2}{f(t)\text{ d}t}.$$
Now we look at two cases:
Case 1: $0\in[a,b]$. In that case, for $f(x)=0$ we have
$$\int\limits_{0}^{0}{f(t)g(t)\text{ d}t} = g(0)-1\implies g(0)=1. $$
(If $0$ is not actually in the range, then take a sequence converging to $0$, and the same conclusion follows.)
Hence, for $y\in[a,b]$, we have
$$ g(y) = g(0)\exp\left(\int\limits_{0}^{y}{f(t)\text{ d}t}\right) = \exp\left(\int\limits_{0}^{y}{f(t)\text{ d}t}\right). $$
Outside of $[a,b]$, we can let $g$ take on any values, so long as $g$ remains continuous. This is because changing the value of $g$ outside $[a,b]$ does not affect the value of $g(f(x))$ (as $f(x)\in[a,b]$), nor would it affect the value of
$$\int\limits_{0}^{f(x)}{f(t)g(t)\text{ d}t}$$
as the limits of integration are contained in $[a,b]$. Thus, I claim that the set of continuous $g$ satisfying
$$ g(y) = \exp\left(\int\limits_{0}^{y}{f(t)\text{ d}t}\right) $$
for $y\in[a,b]$ solves the equation above. To check that these functions are indeed solutions, we just note that for any $x$ we have $f(t)g(t) = g'(t)$ for $t$ between $0$ and $f(x)$ (since that interval is contained in $[a,b]$), so
$$ \int\limits_{0}^{f(x)}{f(t)g(t)\text{ d}t} = \int\limits_{0}^{f(x)}{g'(t)\text{ d}t} = g(f(x))-g(0) = g(f(x)) - 1.$$
Case 2: $0\not\in[a,b]$. Then either $a,b>0$ or $a,b<0$. Assume $a>0$ (the other case is similar). For $y\in[a,b]$, we have
$$g(y) = g(a)\exp\left(\int\limits_{a}^{y}{f(t)\text{ d}t}\right) $$
and for $x$ such that $f(x)=a$ (or a sequence $f(x_n)$ converging to $a$), we have
$$\int\limits_{0}^{a}{f(t)g(t)\text{ d}t} = g(a) - 1.$$
These two necessary conditions turn out to be sufficient, since the first condition implies that $g'(y) = f(y)g(y)$ for $y\in(a,b)$, and hence
$$\int\limits_{0}^{f(x)}{f(t)g(t)\text{ d}t} = \int\limits_{0}^{a}{f(t)g(t)\text{ d}t} + \int\limits_{a}^{f(x)}{f(t)g(t)\text{ d}t} = \left(g(a)-1\right) + \int\limits_{a}^{f(x)}{g'(t)\text{ d}t} = g(f(x)) -1.$$ 

For Case 2, I don't know of a better way to phrase the second condition. It is a technical condition regarding the values of $g$ between $0$ and $a$, which matters only because the lower limit on the integral is $0$. The most important condition (regardless of case) is that $g$ solves $g'=fg$ in the interior of the image of $f$.
