59.90 Problem number 589

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

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

command

integrate((a+b*tan(f*x+e))^2/(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 {\sqrt {2} {\left (i \, a^{2} - 2 i \, b^{2}\right )} \sqrt {d} {\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 ) + \sqrt {2} {\left (-i \, a^{2} + 2 i \, b^{2}\right )} \sqrt {d} {\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 (2 \, a b \cos \left (f x + e\right ) - b^{2} \sin \left (f x + e\right )\right )} \sqrt {\frac {d}{\cos \left (f x + e\right )}}}{d f} \]

Fricas 1.3.7 via sagemath 9.3 output

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