Problem:
Let $f$ be a function which has domain $D_f=[-1,2]$ and range $=[0,1]$. What are the domain and range of the function $g$ defined by $g(x) = 1-f(x+1)$?
My thinking:
If the domain of $f$ is $[-1,2]$, then the domain of $x\mapsto f(x+1)$ is $[0,3]$ (adding 1 to both the extreme limits of domain of $f$).
And because the range of $f$ is $[0,1]$, the range of $1- f(x+1)$ is $[-1,0]$ (subtracting 1 from both the extreme limits of range of $f$).
But this is not the range and domain.
I have been taught that when a change occurs inside the function, only the domain changes. And when the change is outside the function, the range changes. Is this incorrect?
Question:
What would be the range and domain of $g$, and how is my thinking incorrect?