calculating the absolute value integral I would like to know how to calculate this integral
$$
B= \int_0^1  \mid 1- t^{a}  \mid^{b}  dt  .
$$
I know for $$ a>0 $$
$$
B= \int_0^1   (1- t^{a})^{b}  dt  .
$$
and for $$ a<0 $$
$$
B= \int_0^1   ( t^{a}-1)^{b}  dt  .
$$
and that $$(1-t^{a})^{b}=1-bt^{a}$$
if b is pair then $$B=2- \frac{2b}{a+1} $$
if not $$B=0$$
is this solution correct ?
 A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$


*
*$\ds{\large\tt a > 0}$:
\begin{align}
&\int_{0}^{1}\pars{1 - t^{a}}^{b}\,\dd t
=\int_{0}^{1}\pars{1 - t}^{b}\,{1 \over a}\,t^{1/a - 1}\dd t
={1 \over a}\,{\rm B}\pars{b + 1,{1 \over a}}\,,\qquad b > -1
\end{align}


*

$\ds{\large\tt a < 0}$:
\begin{align}
&\int_{0}^{1}\pars{t^{a} - 1}^{b}\,\dd t\ =\
\overbrace{\int_{0}^{1}t^{ab}\pars{1 - t^{-a}}^{b}\,\dd t}
^{\ds{\mbox{Set}\ x \equiv t^{-a}\ \imp t = x^{-1/a}}}
\\[3mm]&=\int_{0}^{1}x^{-1/b}\pars{1 - x}^{b}
\pars{-\,{1 \over a}\,x^{-1/a - 1}\,\dd x}
=-\,{1 \over a}\int_{0}^{1}\pars{1 - x}^{b}x^{-1/a - 1/b - 1}\,\dd x
\\[3mm]&=-\,{1 \over a}\,{\rm B}\pars{b + 1,-\,{1 \over a} - {1 \over b}}
\,,\qquad b > -1\,,\quad -\,{1 \over a} - {1 \over b} > 0\
\mbox{which means}\ b > -\,{1 \over a}
\end{align}

$\ds{{\rm B}\pars{x,y}}$ is the Beta Function.
