Computing directly the pdf of $Y=X^2$ for the pdf $f_X(x) = \frac{2}{9}(x+1)$ In the book Statistical inference by Casella and Berger, given that the pdf of X is $f_X(x) = \frac{2}{9}(x+1)$ for $-1 \le x \le 2$, we want to find the pdf of $Y=X^2$. But it says we are not able to directly use the theorem 2.1.8 which is 

Theorem 2.1.8  Let $X$ have pdf $f_X(x)$ and let $Y=g(X)$. Suppose there
  exists a partition, $A_0, A_1, \dots A_k$ of $\cal{X}$ such that $P(X
 \in A_0)=0$ and $f_X(x)$ is continuous on each $A_i$. Further, suppose
  there exist functions $g_1(x), ..., g_k(x)$ defined on $A_1, ..., A_k$
  respectively, satisfying
i. $g(x) = g_i(x)$ for $x\in A_i$
ii. $g_i(x)$ is monotone on $A_i$
iii. the set $\cal{Y} = \{y: y=g_i(x) \mathrm{\ for\ some\ } x \in A_i \}$ is the
  same for each $i=1, ..., k$ 
iv. $g_i^{-1}(y)$ has a continuous derivative on $\cal{Y}$ for each
  $i=1,...,k$.
Then, for $y \in \cal{Y}$,
  $$f_Y(y) = \sum^k_{i=1} f_X(g_i^{-1}(y)) \left|{d \over dy} g_i^{-1}(y) \right|$$

The $f_X(x)$ in question seems to satisfy all conditions: $f_X(x)$ is a monotonically increasing function, so we can create partitions so that $-1 \le x \le 0$ is $A_1$, $0 < x \le 2$ be $A_2$ and the rest $A_0$. Why can't we directly apply this theorem?
EDIT: it seems like the third condition does not hold. But can we find a partition that meets the third condition? Is there a way to know that whether such partition exists?
EDIT 2: By simply doing what @Dilip suggested me, I get
\begin{align}
F_Y(y) &= P(Y \le y) \\
&= P(X^2 \le y) \\
&= P(-\sqrt{y} \le X \le \sqrt{y}) \\
&= P(-\sqrt{y} < X \le \sqrt{y}) \\
&= F_X(\sqrt{y}) - F_X(-\sqrt{y}) \\
f_Y(y) &= { d \over dy} F_Y(y) \\
&= {1 \over 2\sqrt{y}}f_x(\sqrt{y}) + {1 \over 2\sqrt{y}} f_X(-\sqrt{y})
\end{align}
If I plug in $f_X(x)$, I get ${2 \over 9\sqrt{y}}$ which is correct only when $y \le 1$. How do I know that I need to separate the range into two subsets? 
 A: The third condition is important in that
\begin{align*}
\mathbb{P}(Y\in B) &= \int_B f_Y(y)\text{d}y\\
&= \mathbb{P}(g(X)\in B)\\
&= \sum_{i=1}^k \mathbb{P}(g(X)\in B,\,X\in A_i)\\
&= \sum_{i=1}^k \mathbb{P}(g_i(X)\in B,\,X\in A_i)\\
&= \sum_{i=1}^k \mathbb{P}(X\in g_i^{-1}(B)\cap A_i)\\
&= \sum_{i=1}^k \int_{g_i(g_i^{-1}(B)\cap A_i)} f_X\{g_i^{-1}(y)\}\left|{d \over dy} g_i^{-1}(y) \right|\text{d}y\\
\end{align*}
and hence one needs to have
$$g_i(g_i^{-1}(B)\cap A_i)=B\cap\cal{Y}$$
for $i=1,2,\ldots,k$ in order for the formula from Statistical Inference to hold. Otherwise, additional indicator functions are necessary.
The alternative suggested by Dilip Sarwate in his comment does not require the same condition:
\begin{align}
F_Y(y) &= \mathbb{P}(Y\le y)\\
&= \mathbb{P}(g(X)\le y)&\quad\text{[definition]}\\
&= \mathbb{P}(g(X)\in (0,y))\\
&=\sum_{i=1}^k \mathbb{P}(g(X)\in (0,y),\,X\in A_i)&\quad\text{[partition]}\\
&=\sum_{i=1}^k \mathbb{P}(g_i(X)\in (0,y),\,X\in A_i)&\quad\text{[specialisation]}\\
&=\sum_{i=1}^k \mathbb{P}(X\in g_i^{-1}\{(0,y)\},\,X\in A_i)&\quad\text{[invertibility]}\\
&=\sum_{i=1}^k \left|\int_{0}^{g_i^{-1}(y)} f_X(x)\mathbb{I}_{A_i}(x)\text{d}x\right|&\quad\text{[monotonicity]}\\
&=\sum_{i=1}^k \underbrace{\xi_i\int_{0}^{g_i^{-1}(y)} f_X(x)\mathbb{I}_{A_i}(x)\text{d}x}_{\xi_i\text{ is monotonicity of }g_i}\\
&=\int_0^y f_Y(\omega)\text{d}\omega
\end{align}
leading to
\begin{align}f_Y(y) &= \sum_{i=1}^k \xi_i f_X\{g_i^{-1}(y)\}\,{d \over dy} g_i^{-1}(y) \,\mathbb{I}_{A_i}\{g_i^{-1}(y)\}\\&=\sum_{i=1}^k f_X\{g_i^{-1}(y)\}\left|{d \over dy} g_i^{-1}(y) \right|\,\mathbb{I}_{A_i}\{g_i^{-1}(y)\}\end{align}
In the example, $A_1=(-1,0)$ and $A_2=(0,2)$, $g_1(x)=g_2(x)=x^2$:
$$f_Y(y)=\frac{2}{9}\frac{1}{2\sqrt{y}}(1-\sqrt{y})\mathbb{I}_{(-1,0)}(-\sqrt{y})+\frac{2}{9}\frac{1}{2\sqrt{y}}(1+\sqrt{y})\mathbb{I}_{(0,2)}(\sqrt{y})$$
which simplifies into
$$\frac{2}{9\sqrt{y}}\mathbb{I}_{(0,1)}(y)+\frac{1}{9\sqrt{y}}(1+\sqrt{y})\mathbb{I}_{(1,4)}(y)$$
A: To provide an alternative series of steps to arrive at the density of $Y$, using the "distribution function" method as @Xi'an answer does, we have 
$$P(Y \leq y) = P(X^2 \leq y)$$
For the support of $X \in [-1,1]$ we have
$$P(X^2 \leq y) = P(-\sqrt{y}\leq X \leq \sqrt{y}), \;\;\;  X \in [-1,1]$$
For $X\geq 1$ we have 
$$P(X^2 \leq y) = \{P(X \leq \sqrt{y}),\;\;\;X\geq 1\} = P(1\leq X \leq \sqrt {y})$$  
Combining,
$$P(Y\leq y) = \cases {\int_{-\sqrt{y}}^{\sqrt{y}}f_X(x)dx\;\;\; |x|\leq 1 \\ \\ \int_1^{\sqrt{y}}f_X(x)dx\;\;\; x\geq 1} \\$$
Differentiating with respect to $y$ leads to @Xi'an final result. The upper branch corresponds to $y \in [0,1]$ and the lower branch to $y \in [1,4]$
A: The third condition fails. 
$2^2=4$ is in the image of $\mathcal{A}_2$ but it is not in the image of $\mathcal{A}_1$.
Remark: Question has been changed.
