# Composition of functions

$f,g:\mathbb{R}\rightarrow\mathbb{R}$
$(f\circ g)(x)=3x-1$

a) $g(x)=2x-3; f(x)=?$

b) $g(f(x))=3x-6; g(\frac{1}{2})=?$

-
I think you would have a better chance, if you would put some more effort to formulate a real question, including some motivation. – Dirk Sep 22 '11 at 14:47

Let's do (a). You know that $f(g(x)) = 3x-1$, and you know that $g(x)=2x-3$. That means that you need $f(2x-3) = 3x-1$. The question is, what is $f$?
We want an expression for $f(a)$ so that, when we plug in $2x-3$ for $a$, we get $3x-1$. Let's try isolating $x$: if you take $(2x-3)$ and add $3$, you get $2x$; if you then divide by $2$, you get $x$. So a function that sends $a$ to $\frac{1}{2}(a+3)$ will send $2x-3$ to $x$ (this is just the inverse of $g$, by the way). Once you have $x$, to get $3x-1$ you just have to multiply by $3$ and subtract $1$. So if we let $b=\frac{1}{2}(a+3)$, then we want $3b-1$. That is, we want the function $$f(a) = 3b -1 = 3\left(\frac{1}{2}(a+3)\right)-1.$$ That is, $f(x) = \frac{3x+9}{2}-1$.
Let's check: if $f(x) = \frac{3x+9}{2} - 1$ and $g(x)=2x-3$, then \begin{align*} f\circ g (x) &= f\bigl( g(x)\bigr)\\ &= f\bigl( 2x-3\bigr)\\ &= \frac{3(2x-3) + 9}{2} - 1\\ &= \frac{6x-9+9}{2} - 1\\ &= \frac{6x}{2}-1\\ &=3x - 1, \end{align*} as desired.