\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{bigints}
\begin{document}
\title{Integral of $\sqrt[3]{\tan(x)}$}
\author{Amit Yaron}
\date{Jan 11, 2025}
\maketitle
\section{Introduction}
In this document I'll show how powerful the substition $u=\tan(x)$ or\\
$x=\arctan(u)$ is. Then I will solve the crazy integral with it.\\
Let us first derive $\arctan(x)$:
\begin{align*}
  &y=\arctan(x)\Rightarrow\\
  \Rightarrow &x=\tan(y)=\frac{\sin(y)}{\cos(y)}\Rightarrow\\
  \Rightarrow &1=y'\big(\frac{\cos(y)\cos(y)-(-\sin(y))\sin(y)}{\cos^2(y)}\big)\Rightarrow\\
  \Rightarrow &1=\frac{y'(\cos^2(y)+\sin^2(y))}{\cos^2(y)}=\frac{1}{\cos^2(y)}\Rightarrow\\
  \Rightarrow &y'=\cos^2(y)
\end{align*}
and
\begin{align*}
  &\tan^2(y)=\frac{\sin^2(y)}{\cos^2(y)}=\frac{1-\cos^2(y)}{\cos^2(y)}\Rightarrow\\
  \Rightarrow &\tan^2(y)=\frac{1}{\cos^2(y)}-1\Rightarrow\\
  \Rightarrow &1+\tan^2(y)=\frac1{\cos^2(y)}\Rightarrow\\
  \Rightarrow &y'=\cos^2(y)=\frac1{1+\tan^2(y)}=\boxed{\frac1{1+x^2}}
\end{align*}
\section{Substitutions}
Due to the number of substitutions, the first step will be to assign a letter to our result:
\[
  I=\int\sqrt[3]{\tan(x)}dx
\]
Let us substitute
\[
  x=\arctan(u)
\]
Then
\[
  \dfrac{dx}{du}=\dfrac1{1+u^2}
\]
Thus, the integral becomes:
\[
  I=\int\sqrt[3]{\tan(x)}dx=\int\dfrac{\sqrt[3]u}{1+u^2}du
\]
Let us now substitute:
\[
  u=v^{\frac32}
\]
Then
\[
  \dfrac{du}{dv}=\dfrac{3\sqrt{v}}{2}
\]
Thus,
\[
  I=\int\dfrac{\sqrt{v}}{1+v^3}\cdot\dfrac{3\sqrt{v}}{2}dv=\dfrac32\int\dfrac{v}{1+v^3}dv
\]
\section{Partial Fractions}
Now, we have a rational function to integrate, and the denominator is a cubic
polynomial. So, let us factor it and write the integrand as a sum of two terms.
\[
  1+v^3=(1+v)(v^2-v+1)
\]
Now, let us find constants $A,B,C$, such that
\[
  \frac{A}{v+1}+\frac{Bv+C}{v^2-v+1}=\frac{v}{v^3+1}
\]
Cross multiply:
\begin{equation*}
  Av^2-Av+A+Bv^2+Bv+Cv+C=v\Rightarrow (A+B)v^2+(B+C-A)v+A+C=v
\end{equation*}
By equating the coefficints, we get:
\[
\begin{cases}
  A+B=0\\B+C-A=1\\A+C=0
\end{cases}
\]
From the First and third equations, we get:
  \begin{equation*} B=C=-A\end{equation*}
Let us plug it into the second equation:
\begin{equation*}3B=1\end{equation*}
Thus,
\[
\begin{cases}
  A=-\frac13\\B=C=\frac13
\end{cases}
\]
Thus,
\[
  \frac{v}{v^3+1}=\frac13(\frac{v+1}{v^2-v+1}-\frac1{v+1})
\]
\section{Back to the Integral}
\begin{align*}
  I&=\dfrac12\int\dfrac{v+1}{v^2-v+1}-\dfrac1{v+1}dv\\
   &=\dfrac12\int\dfrac{v+1}{v^2-v+1}dv-\dfrac12\int\dfrac{dv}{v+1}\\
   &=\dfrac14\int\dfrac{2v+2}{v^2-v+1}-\dfrac{\ln|v+1|}2+C\\
   &=\dfrac14\int\dfrac{2v-1}{v^2-v+1}+\dfrac14\int\dfrac{3}{v^2-v+1}-\dfrac{\ln|v+1|}2+C\\
   &=\dfrac{\ln|v^2-v+1|}4+\dfrac{\sqrt3}2\arctan\big(\dfrac{2v-1}{\sqrt3}\big)-\dfrac{\ln|v+1|}2+C
\end{align*}
Now, let us substitute back:
\begin{align*}
  &\tan(x)=u=v^{\frac32}\\
  \Rightarrow &v=\sqrt[3]{\tan^2(x)}\\
  \Rightarrow &I=\dfrac{\ln|\sqrt[3]{\tan^4(x)-\tan^2(x)+1|}}4
                +\dfrac{\sqrt3}2\arctan\big(\dfrac{2\sqrt[3]{\tan^2(x)}}{\sqrt3}\big)
                -\dfrac{\ln|\sqrt[3]{\tan^2(x)}+1|}2+C
\end{align*}
\section{Summary}
I have shown that the "crazy" integral can be written using elementary functions.\\
You may find further expansions on Wolfram Alpha (https://wolframalpha.com), but
for me it is a waste of energy, so that's a good place to stop.
\end{document}
