If $f(x)=ax+b$ and $f^{-1}(x)=bx+a$ with $a$ and $b$ real, what is the value of $a+b$?
To solve this problem, I need to recall what it means for two functions to be inverses of each other. If $f$ and $f^{-1}$ are inverses, then $f(f^{-1}(x))=x$ and $f^{-1}(f(x))=x$ for any $x$ in their domains.
[*, I will use one of these equations to find a relationship between $a$ and $b$. Let me try the first one: $f(f^{-1}(x))=x$. Plugging in $f^{-1}(x)=bx+a$, I get $f(bx+a)=x$. Now, applying $f$, I get $a(bx+a)+b=x$. Expanding and simplifying, I get $abx+a^2+b=x$. This equation must hold for any $x$, so the coefficients of $x$ must be equal on both sides. That means $ab=1$. I can also equate the constant terms: $a^2+b=0$. Now I have two equations with two unknowns, so I can solve for $a$ and $b$. From $ab=1$, I can write $b=\frac{1}{a}$. Substituting this into $a^2+b=0$, I get $a^2+\frac{1}{a}=0$. Multiplying by $a$, I get $a^3+1=0$. Subtracting 1, I get $a^3=-1$. Taking the cube root, I get $a=-1$. Then, from $b=\frac{1}{a}$, I get $b=-1$ as well. So, $a=-1$ and $b=-1$. Therefore, $a+b=-2$. 