How to compute the composition of a function and a piece-wise function? I understand function composition with normal functions. I don't really get it when one of those functions is piecewise. 
When do I need to change the condition of the piecewise bit, or do I even do that at all?
Here are the two functions that I want to find the composition of.

Let $f$ and $g$ be ${\bf N}\to {\bf N}$ functions defined by
  $$
f(n) = 2^n, ~~~~\mbox{and}~~~~ g(n) = \begin{cases}
5n & \mbox{if}~~n > 10,\\
6n & \mbox{if}~~0\leq n \leq 10
\end{cases}
$$

Specifically $f(g(x))$ and $g(f(x))$ are challenging.
Thank you.

In this case the composition $f(g(n))$ is easier since the piecewise function is $g$, and you only have to split between the cases $n\leq 10$ and $n>10$. More generally, if you have
$$
g(n)=\begin{cases}
g_1(n), &\text{if }n\leq 10,\\
g_2(n), &\text{otherwise},\end{cases}
$$
then you can deduce
$$
f(g(n))=\begin{cases}
f(g_1(n)), &\text{if }n\leq 10,\\
f(g_2(n)),&\text{otherwise}.\end{cases}
$$
The case $g(f(n))$ is more involved, since you first have to find the values of $n$ for which $f(n)\leq 10$ and $f(n)>10$, and then compose the functions. I hope you can carry on from here, and if you have any further doubt just ask.
