### Instruction: Let $f(x)=3x-2$, and let $g(x)=f(f(f(f(x))))$.  If the domain of $g$ is $0\leq x\leq 2$, compute the range of $g$.### Response: To find the range of $g$, I need to figure out what are the possible outputs of $g$ when I plug in values of $x$ between 0 and 2.
Since $g$ is defined as the composition of $f$ four times, it might help to simplify $g$ by finding a formula for $f(f(x))$, and then applying $f$ to that twice more.
I can use the definition of $f$ and the rule of composition to find $f(f(x))$.
$f(f(x))=f(3x-2)=3(3x-2)-2=9x-8$.
Now I have a simpler formula for $f(f(x))$, so I can apply $f$ to that again to get $f(f(f(x)))$.
$f(f(f(x)))=f(9x-8)=3(9x-8)-2=27x-26$.
One more time, I can apply $f$ to get $f(f(f(f(x))))=g(x)$.
$g(x)=f(27x-26)=3(27x-26)-2=81x-80$.
So $g$ is actually a linear function with slope 81 and intercept -80.
This means that $g$ is always increasing, so its range will be determined by the minimum and maximum values of $x$ in the domain.
The minimum value of $x$ in the domain is 0, so the minimum value of $g(x)$ is $g(0)$.
$g(0)=81(0)-80=-80$.
The maximum value of $x$ in the domain is 2, so the maximum value of $g(x)$ is $g(2)$.
$g(2)=81(2)-80=82$.
Therefore, the range of $g$ is the interval from -80 to 82, or in set notation, $\{-80\leq y \leq 82\}$.