# Dorin Marghidanu's Functional Equation

### Solution 1

Let's make a substitution $1-x \to y:$

$1=f(1)=f(x+(1-x))=a^{1-x}f(x)+b^xf(1-x).$

Let's make similar substitution $1-y\to x$ but then replace all occurrences of $y$ by $x:$

$1=a^xf(1-x)+b^{1-x}f(x).$

Solving the two equations for $f(x)$ we obtain $\displaystyle f(x)=\frac{a^x-b^x}{a-b},$ which clearly verifies the conditions of the problem.

### Solution 2

Let's take $y=1:$ $f(x+1)=a^x+bf(x).$ With $x=1$ and interchange $x\leftrightarrow y$, $f(x+1)=af(x)+b^x.$ Solving for $f(x)$ gives $\displaystyle f(x)=\frac{a^x-b^x}{a-b}.$

### Solution 3

If $f(x+y)=a^yf(x)+b^xf(y)$ then $f(y+x)=a^xf(y)+b^yf(x).$ By symmetry, $a^yf(x)+b^xf(y)=a^xf(y)+b^yf(x),$ i.e.,

$\displaystyle \frac{f(x)}{a^x-b^x}=\frac{f(y)}{a^y-b^y},$

implying $\displaystyle \frac{f(x)}{a^x-b^x}=c,$ a constant. From $f(1)=1,$ $\displaystyle c=\frac{1}{a-b}.$

### Acknowledgment

Dorin Marghidanu has kindly posted this beautiful problem at the CutTheKnotMath facebook page. Leo Giugiuc almost immediately responded with a solution of his (Solution 1). Solution 2 is by Kays Tomy; Solution 3 is by Hélvio Vairinhos.

Copyright © 1996-2018 Alexander Bogomolny

67091698