38.29 Problem number 198

\[ \int \sqrt {d \cos (a+b x)} \sin ^2(a+b x) \, dx \]

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

command

integrate((d*cos(b*x+a))^(1/2)*sin(b*x+a)^2,x, algorithm="fricas")

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

\[ -\frac {2 \, {\left (\sqrt {d \cos \left (b x + a\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) - i \, \sqrt {2} \sqrt {d} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right )\right ) + i \, \sqrt {2} \sqrt {d} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )\right )\right )}}{5 \, b} \]

Fricas 1.3.7 via sagemath 9.3 output

\[ {\rm integral}\left (-\sqrt {d \cos \left (b x + a\right )} {\left (\cos \left (b x + a\right )^{2} - 1\right )}, x\right ) \]