Let $(X,\mathcal{M},\mu)$ a finite measure space, $g:\mathbb{R}\to\mathbb{R}$ a continuous function such that:
$$\exists K\geq 0 : |g(t)|\leq K|t| \text{ for all } t\in\mathbb{R} \text{ such that } |t|\geq K$$
If $f\in L^p$ ($f:X\to\mathbb{R}$), show that $(g\circ f)\in L^p$.
The easy part is to see the case $|f(x)|\geq K$, in fact, define $A:=\{x\in X: |f(x)|\geq K\}$, then:
$$\int_{A}|g\circ f|^pd\mu\leq\int K^p|f|^pd\mu=K^p\int|f|^pd\mu<\infty$$
Now for $A^c=\{x\in X: |f(x)|< K\}$ I don't know how to prove that $(g\circ f)\in L^p$. Any hint?
Since $g$ is continuous, it is bounded on $|t|\leq K$, i.e., there exists $M>0$ such that $|g(t)|\leq M$ for all $|t|\leq K$. Hence on $A^c$, where $|f(x)|<K$, we have $$|(g\circ f)(x)|\leq M,$$ so $$\int_{A^c}|g\circ f|^pd\mu\leq\int_{A^c}M^pd\mu\leq M^p\mu(X)<\infty,$$ where $\mu(X)<\infty$ follows from the assumption that $(X,\mathcal{M},\mu)$ is a finite measure space.