<s>[INST] Inverse of piecewise function I've the following function:
$$f(x)= 
\begin{cases}
12x+3, & \text{if $x\ge0$} \\
x+3, & \text{if $x\lt0$}
\end{cases}
$$
What will be its inverse?
For me is $f(x)^{-1}= \frac{x-3}{12}$ per $x\ge 0$ and $3-x$ for $x\lt 0$. Right? 
 [/INST] To find the inverse of a function, we set $y=f(x)$ and try to solve for $x$ in terms of $y$. You can do this by direct manipulation of each case:
$$
\begin{align}
&y= 
\begin{cases}
12x+3, & \text{if $x\ge0$} \\
x+3, & \text{if $x\lt0$}
\end{cases}\\
&\implies
\begin{cases}
y=12x+3, & \text{if $x\ge0$} \\
y = x+3, & \text{if $x\lt0$}
\end{cases}\\
&\implies
\begin{cases}
y=12x+3, & \text{if $12x+3\ge 3$} \\
y = x+3, & \text{if $x+3\lt 3$}
\end{cases}\\
&\implies
\begin{cases}
y=12x+3, & \text{if $y\ge 3$} \\
y = x+3, & \text{if $y\lt 3$}
\end{cases}\\
&\implies
\begin{cases}
x=\frac{y-3}{12}, & \text{if $y\ge 3$} \\
x=y-3, & \text{if $y\lt 3$}
\end{cases}\\
&\implies
x=\begin{cases}
\frac{y-3}{12}, & \text{if $y\ge 3$} \\
y-3, & \text{if $y\lt 3$}
\end{cases}\\
\end{align}
$$
</s>