Optimal. Leaf size=90 \[ \frac {4 \sin ^5(c+d x)}{5 a^3 d}-\frac {5 \sin ^3(c+d x)}{3 a^3 d}+\frac {\sin (c+d x)}{a^3 d}+\frac {4 i \cos ^5(c+d x)}{5 a^3 d}-\frac {i \cos ^3(c+d x)}{3 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3092, 3090, 2633, 2565, 30, 2564, 14} \[ \frac {4 \sin ^5(c+d x)}{5 a^3 d}-\frac {5 \sin ^3(c+d x)}{3 a^3 d}+\frac {\sin (c+d x)}{a^3 d}+\frac {4 i \cos ^5(c+d x)}{5 a^3 d}-\frac {i \cos ^3(c+d x)}{3 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 2564
Rule 2565
Rule 2633
Rule 3090
Rule 3092
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx &=\frac {i \int \cos ^2(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac {i \int \left (-i a^3 \cos ^5(c+d x)-3 a^3 \cos ^4(c+d x) \sin (c+d x)+3 i a^3 \cos ^3(c+d x) \sin ^2(c+d x)+a^3 \cos ^2(c+d x) \sin ^3(c+d x)\right ) \, dx}{a^6}\\ &=\frac {i \int \cos ^2(c+d x) \sin ^3(c+d x) \, dx}{a^3}-\frac {(3 i) \int \cos ^4(c+d x) \sin (c+d x) \, dx}{a^3}+\frac {\int \cos ^5(c+d x) \, dx}{a^3}-\frac {3 \int \cos ^3(c+d x) \sin ^2(c+d x) \, dx}{a^3}\\ &=-\frac {i \operatorname {Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}+\frac {(3 i) \operatorname {Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {\operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=\frac {3 i \cos ^5(c+d x)}{5 a^3 d}+\frac {\sin (c+d x)}{a^3 d}-\frac {2 \sin ^3(c+d x)}{3 a^3 d}+\frac {\sin ^5(c+d x)}{5 a^3 d}-\frac {i \operatorname {Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=-\frac {i \cos ^3(c+d x)}{3 a^3 d}+\frac {4 i \cos ^5(c+d x)}{5 a^3 d}+\frac {\sin (c+d x)}{a^3 d}-\frac {5 \sin ^3(c+d x)}{3 a^3 d}+\frac {4 \sin ^5(c+d x)}{5 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 111, normalized size = 1.23 \[ \frac {\sin (c+d x)}{4 a^3 d}+\frac {\sin (3 (c+d x))}{6 a^3 d}+\frac {\sin (5 (c+d x))}{20 a^3 d}+\frac {i \cos (c+d x)}{4 a^3 d}+\frac {i \cos (3 (c+d x))}{6 a^3 d}+\frac {i \cos (5 (c+d x))}{20 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.91, size = 41, normalized size = 0.46 \[ \frac {{\left (15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 10 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{60 \, a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.50, size = 73, normalized size = 0.81 \[ \frac {2 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 30 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 20 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7\right )}}{15 \, a^{3} d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 90, normalized size = 1.00 \[ \frac {-\frac {16}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}-\frac {4 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {4 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i}+\frac {8}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 69, normalized size = 0.77 \[ \frac {3 i \, \cos \left (5 \, d x + 5 \, c\right ) + 10 i \, \cos \left (3 \, d x + 3 \, c\right ) + 15 i \, \cos \left (d x + c\right ) + 3 \, \sin \left (5 \, d x + 5 \, c\right ) + 10 \, \sin \left (3 \, d x + 3 \, c\right ) + 15 \, \sin \left (d x + c\right )}{60 \, a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.87, size = 133, normalized size = 1.48 \[ \frac {2\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,15{}\mathrm {i}+30\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,40{}\mathrm {i}-20\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+7{}\mathrm {i}\right )}{15\,a^3\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,1{}\mathrm {i}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,10{}\mathrm {i}-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,5{}\mathrm {i}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.35, size = 136, normalized size = 1.51 \[ \begin {cases} - \frac {\left (- 120 i a^{6} d^{2} e^{8 i c} e^{- i d x} - 80 i a^{6} d^{2} e^{6 i c} e^{- 3 i d x} - 24 i a^{6} d^{2} e^{4 i c} e^{- 5 i d x}\right ) e^{- 9 i c}}{480 a^{9} d^{3}} & \text {for}\: 480 a^{9} d^{3} e^{9 i c} \neq 0 \\\frac {x \left (e^{4 i c} + 2 e^{2 i c} + 1\right ) e^{- 5 i c}}{4 a^{3}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________