Find such $g(x)$ for which $(b-a)\sqrt{f(a)f(b)}=g(b)f(b)-g(a)f(a)$ holds I am computing some stuff, and I came accross such problem:
Find such $g(x)$ for which $$(b-a)\sqrt{f(a)f(b)}=g(b)f(b)-g(a)f(a)$$ holds, where:
$g(x)$ and $f(x)$ are any real-valued functions of a real variable, and $a$ and $b$ are any reals such that $a<b$.
If such function were found it would simplyfy greatly the computations. However I don't even know if to do such thing is possible or what part of mathematics solves such problems.
 A: Take $a = 0, b = 1$ for simplicity, and assume that there is a function $g$ (actually just two numbers $g(0), g(1)$ for which this works for the functions $f(x) = 1, f(x) = x, f(x) = 1-x$. Then taking $f(x) = x$  we see that
$$0 = g(1)f(1) - g(0) f(0) = g(1).
$$
Similarly taking $f(x) = 1-x$ we get $g(0) = 0$. But taking $f(x) = 1$ we get 
$$
g(1) - g(0) = 1.
$$
These three statements contradict each other, so this is impossible.
A: It only holds for certain $f(x)$ and certain $g(x)$. 
We need $$[g(b)f(b)-g(a)f(a)]+[g(c)f(c)-g(b)f(b)]=[g(c)f(c)-g(a)f(a)]\\
(b-a)\sqrt{f(a)f(b)}+(c-b)\sqrt{f(b)f(c)}=(c-a)\sqrt{f(a)f(c)}$$  
It follows that $$\frac{b-a}{\sqrt{f(c)}}+\frac{c-b}{\sqrt{f(a)}}=\frac{c-a}{\sqrt{f(b)}}$$
Let $h(x)=1/\sqrt{f(x)}$, and we need
$$(b-a)h(c)+(c-b)h(a)=(c-a)h(b)\\
(b-a)h'(c)=h(b)-h(a)\\
h'(c)=\frac{h(b)-h(a)}{b-a}$$
so the derivative is independent of $c$.  That means 
$$h(x)=px+q\\
f(x)=(px+q)^{-2}\\
\frac{b-a}{(pa+q)(pb+q)}=\frac{g(b)}{(pb+q)^2}-\frac{g(a)}{(pa+q)^2}\\
\frac{1/p}{pa+q}-\frac{1/p}{pb+q}=\frac{g(b)}{(pb+q)^2}-\frac{g(a)}{(pa+q)^2}\\
g(x)=-(x+q/p)+C(px+q)^{2} $$
