I am reading this example in the book for Pre-Calculus and it is explaining how functions are shifted left or right using g(x)=f(x-1). Here is what it says in the book.
Define a function g by
g(x) = f(x-1)
where f is the function defined by f(x)=x^2 , with the domain of f the interval [-1,1].
a)Find the domain of g. b)Find the range of g.
Solution: a) The formula defining g shows that g(x) is defined precisely when f(x-1) is defined, which means that x-1 must be in the interval [-1,1], which means that x must be in the interval [0,2]. Thus the domain of g is the interval [0,2].
Okay, so I am having a hard time understanding the solution from the book. Particularly the part when they say "which means that x-1 must be in the interval [-1,1], which means that x must be in the interval [0,2]." If x-1 is in the interval [-1,1], shouldn't the domain of g be [-2,0]? Since I plug in -1,0,1 into x-1. Could someone explain why the domain would be [0,2] instead of [-2,0]?