How to evaluate $\int_{1-\sqrt{1-t^2}}^{1+\sqrt{1-t^2}}(y^2-2y+t^2)dy$, where t is constant I need to evaluate the following one. Can't understand the method in my textbook. 
$$\int_{1-\sqrt{1-t^2}}^{1+\sqrt{1-t^2}}(y^2-2y+t^2)dy$$
My textbook is to let $\alpha=1-\sqrt{1-t^2}$, $\beta=1+\sqrt{1-t^2}$, so it becomes
$$\int_\alpha^\beta\color{blue}{(y-\alpha)(y-\beta)}dy\color{red}{=\frac16(\alpha-\beta)^3}$$
And from here it can be solved normally.
How can I come up the idea to make it into "the blue part"?
And is there a formula that can make "the red part"?
 A: The author set up the limits so that 
\begin{align*}
\alpha + \beta & = 1 - \sqrt{1 - t^2} + 1 + \sqrt{1 - t^2}\\
               & = 2\\
\alpha\beta & = (1 - \sqrt{1 - t^2})(1 + \sqrt{1 - t^2})\\
            & = 1 - (1 - t^2)\\
            & = t^2
\end{align*}
Therefore, 
\begin{align*}
(y - \alpha)(y - \beta) & = y^2 - (\alpha + \beta)y + \alpha\beta\\
                        & = y^2 - 2y + t^2
\end{align*}
and evaluating the definite integral yields
\begin{align*}
\int_\alpha^\beta (y - \alpha)(y - \beta)~dy & = \int_\alpha^\beta [y^2 - (\alpha + \beta)y + \alpha\beta]~dy\\
& = \left[\frac{1}{3}y^3 - \frac{1}{2}(\alpha + \beta)y^2 + \alpha\beta y\right]\bigg|_\alpha^\beta\\
& = \frac{1}{6}\left[2y^3 - 3(\alpha + \beta)y^2 + 6\alpha\beta y\right]\bigg|_\alpha^\beta\\
& = \frac{1}{6}\left[2\beta^3 - 3(\alpha + \beta)\beta^2 + 6\alpha\beta^2 - (2\alpha^3 - 3(\alpha + \beta)\alpha^2 + 6\alpha^2\beta)\right]\\
& = \frac{1}{6}\left[2\beta^3 - 3\alpha\beta^2 - 3\beta^3 + 6\alpha\beta^2 - 2\alpha^3 + 3\alpha^3 + 3\alpha^2\beta - 6\alpha^2\beta\right]\\
& = \frac{1}{6}(-\beta^3 + 3\alpha\beta^2 - 3\alpha^2\beta + \alpha^3)\\
& = \frac{1}{6}(\alpha - \beta)^3
\end{align*}
A: $(y-\alpha )(y-\beta)=y^2-y \alpha -y \beta + \alpha\beta. $
Now plug in the definitions of $\alpha  $ and  $\beta $.
