59.98 Problem number 597

\[ \int \frac {(a+b \tan (e+f x))^3}{\sqrt {d \sec (e+f x)}} \, dx \]

Optimal antiderivative \[ \frac {a \left (a^{2}-6 b^{2}\right ) \sqrt {2}\, \sqrt {\frac {1+\sqrt {1+\tan ^{2}\left (f x +e \right )}}{\sqrt {1+\tan ^{2}\left (f x +e \right )}}}\, \EllipticE \left (\sin \left (\frac {\arctan \left (\tan \left (f x +e \right )\right )}{2}\right ), \sqrt {2}\right ) \left (\sec ^{2}\left (f x +e \right )\right )^{\frac {1}{4}}}{\cos \left (\frac {\arctan \left (\tan \left (f x +e \right )\right )}{2}\right ) f \sqrt {d \sec \left (f x +e \right )}}-\frac {2 a \left (a^{2}-6 b^{2}\right ) \tan \left (f x +e \right )}{f \sqrt {d \sec \left (f x +e \right )}}-\frac {2 \left (b -a \tan \left (f x +e \right )\right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}{f \sqrt {d \sec \left (f x +e \right )}}-\frac {2 b \left (\sec ^{2}\left (f x +e \right )\right ) \left (6 a^{2}-4 b^{2}+3 a b \tan \left (f x +e \right )\right )}{3 f \sqrt {d \sec \left (f x +e \right )}} \]

command

integrate((a+b*tan(f*x+e))^3/(d*sec(f*x+e))^(1/2),x, algorithm="fricas")

Fricas 1.3.8 (sbcl 2.2.11.debian) via sagemath 9.6 output

\[ -\frac {3 \, \sqrt {2} {\left (-i \, a^{3} + 6 i \, a b^{2}\right )} \sqrt {d} \cos \left (f x + e\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )\right ) + 3 \, \sqrt {2} {\left (i \, a^{3} - 6 i \, a b^{2}\right )} \sqrt {d} \cos \left (f x + e\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )\right ) - 2 \, {\left (9 \, a b^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + b^{3} - 3 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {\frac {d}{\cos \left (f x + e\right )}}}{3 \, d f \cos \left (f x + e\right )} \]

Fricas 1.3.7 via sagemath 9.3 output

\[ {\rm integral}\left (\frac {{\left (b^{3} \tan \left (f x + e\right )^{3} + 3 \, a b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} b \tan \left (f x + e\right ) + a^{3}\right )} \sqrt {d \sec \left (f x + e\right )}}{d \sec \left (f x + e\right )}, x\right ) \]