### 3.51 $$\int (c+d x) (a+b \tan (e+f x))^3 \, dx$$

Optimal. Leaf size=277 $\frac{3 i a^2 b d \text{PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{i b^3 d \text{PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 i a^2 b (c+d x)^2}{2 d}+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}-3 a b^2 c x+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}-\frac{3}{2} a b^2 d x^2+\frac{b^3 (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{b^3 d x}{2 f}$

[Out]

-3*a*b^2*c*x + (b^3*d*x)/(2*f) - (3*a*b^2*d*x^2)/2 + (a^3*(c + d*x)^2)/(2*d) + (((3*I)/2)*a^2*b*(c + d*x)^2)/d
- ((I/2)*b^3*(c + d*x)^2)/d - (3*a^2*b*(c + d*x)*Log[1 + E^((2*I)*(e + f*x))])/f + (b^3*(c + d*x)*Log[1 + E^(
(2*I)*(e + f*x))])/f + (3*a*b^2*d*Log[Cos[e + f*x]])/f^2 + (((3*I)/2)*a^2*b*d*PolyLog[2, -E^((2*I)*(e + f*x))]
)/f^2 - ((I/2)*b^3*d*PolyLog[2, -E^((2*I)*(e + f*x))])/f^2 - (b^3*d*Tan[e + f*x])/(2*f^2) + (3*a*b^2*(c + d*x)
*Tan[e + f*x])/f + (b^3*(c + d*x)*Tan[e + f*x]^2)/(2*f)

________________________________________________________________________________________

Rubi [A]  time = 0.337686, antiderivative size = 277, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 9, integrand size = 18, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.5, Rules used = {3722, 3719, 2190, 2279, 2391, 3720, 3475, 3473, 8} $-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 i a^2 b (c+d x)^2}{2 d}+\frac{3 i a^2 b d \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}-3 a b^2 c x+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}-\frac{3}{2} a b^2 d x^2+\frac{b^3 (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{i b^3 d \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{b^3 d x}{2 f}$

Antiderivative was successfully veriﬁed.

[In]

Int[(c + d*x)*(a + b*Tan[e + f*x])^3,x]

[Out]

-3*a*b^2*c*x + (b^3*d*x)/(2*f) - (3*a*b^2*d*x^2)/2 + (a^3*(c + d*x)^2)/(2*d) + (((3*I)/2)*a^2*b*(c + d*x)^2)/d
- ((I/2)*b^3*(c + d*x)^2)/d - (3*a^2*b*(c + d*x)*Log[1 + E^((2*I)*(e + f*x))])/f + (b^3*(c + d*x)*Log[1 + E^(
(2*I)*(e + f*x))])/f + (3*a*b^2*d*Log[Cos[e + f*x]])/f^2 + (((3*I)/2)*a^2*b*d*PolyLog[2, -E^((2*I)*(e + f*x))]
)/f^2 - ((I/2)*b^3*d*PolyLog[2, -E^((2*I)*(e + f*x))])/f^2 - (b^3*d*Tan[e + f*x])/(2*f^2) + (3*a*b^2*(c + d*x)
*Tan[e + f*x])/f + (b^3*(c + d*x)*Tan[e + f*x]^2)/(2*f)

Rule 3722

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 3719

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*(m + 1)), x
] - Dist[2*I, Int[((c + d*x)^m*E^(2*I*(e + f*x)))/(1 + E^(2*I*(e + f*x))), x], x] /; FreeQ[{c, d, e, f}, x] &&
IGtQ[m, 0]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
- Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]

Rule 3720

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(c + d*x)^m*(b*Tan[e
+ f*x])^(n - 1))/(f*(n - 1)), x] + (-Dist[(b*d*m)/(f*(n - 1)), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int (c+d x) (a+b \tan (e+f x))^3 \, dx &=\int \left (a^3 (c+d x)+3 a^2 b (c+d x) \tan (e+f x)+3 a b^2 (c+d x) \tan ^2(e+f x)+b^3 (c+d x) \tan ^3(e+f x)\right ) \, dx\\ &=\frac{a^3 (c+d x)^2}{2 d}+\left (3 a^2 b\right ) \int (c+d x) \tan (e+f x) \, dx+\left (3 a b^2\right ) \int (c+d x) \tan ^2(e+f x) \, dx+b^3 \int (c+d x) \tan ^3(e+f x) \, dx\\ &=\frac{a^3 (c+d x)^2}{2 d}+\frac{3 i a^2 b (c+d x)^2}{2 d}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}-\left (6 i a^2 b\right ) \int \frac{e^{2 i (e+f x)} (c+d x)}{1+e^{2 i (e+f x)}} \, dx-\left (3 a b^2\right ) \int (c+d x) \, dx-b^3 \int (c+d x) \tan (e+f x) \, dx-\frac{\left (3 a b^2 d\right ) \int \tan (e+f x) \, dx}{f}-\frac{\left (b^3 d\right ) \int \tan ^2(e+f x) \, dx}{2 f}\\ &=-3 a b^2 c x-\frac{3}{2} a b^2 d x^2+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 i a^2 b (c+d x)^2}{2 d}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}+\left (2 i b^3\right ) \int \frac{e^{2 i (e+f x)} (c+d x)}{1+e^{2 i (e+f x)}} \, dx+\frac{\left (3 a^2 b d\right ) \int \log \left (1+e^{2 i (e+f x)}\right ) \, dx}{f}+\frac{\left (b^3 d\right ) \int 1 \, dx}{2 f}\\ &=-3 a b^2 c x+\frac{b^3 d x}{2 f}-\frac{3}{2} a b^2 d x^2+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 i a^2 b (c+d x)^2}{2 d}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{b^3 (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}-\frac{\left (3 i a^2 b d\right ) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^2}-\frac{\left (b^3 d\right ) \int \log \left (1+e^{2 i (e+f x)}\right ) \, dx}{f}\\ &=-3 a b^2 c x+\frac{b^3 d x}{2 f}-\frac{3}{2} a b^2 d x^2+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 i a^2 b (c+d x)^2}{2 d}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{b^3 (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}+\frac{3 i a^2 b d \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}+\frac{\left (i b^3 d\right ) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^2}\\ &=-3 a b^2 c x+\frac{b^3 d x}{2 f}-\frac{3}{2} a b^2 d x^2+\frac{a^3 (c+d x)^2}{2 d}+\frac{3 i a^2 b (c+d x)^2}{2 d}-\frac{i b^3 (c+d x)^2}{2 d}-\frac{3 a^2 b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{b^3 (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{3 a b^2 d \log (\cos (e+f x))}{f^2}+\frac{3 i a^2 b d \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{i b^3 d \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}-\frac{b^3 d \tan (e+f x)}{2 f^2}+\frac{3 a b^2 (c+d x) \tan (e+f x)}{f}+\frac{b^3 (c+d x) \tan ^2(e+f x)}{2 f}\\ \end{align*}

Mathematica [A]  time = 3.53309, size = 277, normalized size = 1. $\frac{\cos (e+f x) (a+b \tan (e+f x))^3 \left (-i b d \left (b^2-3 a^2\right ) \cos ^2(e+f x) \text{PolyLog}\left (2,-e^{2 i (e+f x)}\right )+\cos ^2(e+f x) \left (-(e+f x) \left (-3 i a^2 b d (e+f x)+a^3 (d (e-f x)-2 c f)+3 a b^2 (2 c f-d e+d f x)+i b^3 d (e+f x)\right )+2 b \log (\cos (e+f x)) \left (3 a^2 (d e-c f)+3 a b d+b^2 (c f-d e)\right )+2 b d \left (b^2-3 a^2\right ) (e+f x) \log \left (1+e^{2 i (e+f x)}\right )\right )+\frac{1}{2} b^2 (\sin (2 (e+f x)) (6 a f (c+d x)-b d)+2 b f (c+d x))\right )}{2 f^2 (a \cos (e+f x)+b \sin (e+f x))^3}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(c + d*x)*(a + b*Tan[e + f*x])^3,x]

[Out]

(Cos[e + f*x]*(Cos[e + f*x]^2*(-((e + f*x)*((-3*I)*a^2*b*d*(e + f*x) + I*b^3*d*(e + f*x) + 3*a*b^2*(-(d*e) + 2
*c*f + d*f*x) + a^3*(-2*c*f + d*(e - f*x)))) + 2*b*(-3*a^2 + b^2)*d*(e + f*x)*Log[1 + E^((2*I)*(e + f*x))] + 2
*b*(3*a*b*d + 3*a^2*(d*e - c*f) + b^2*(-(d*e) + c*f))*Log[Cos[e + f*x]]) - I*b*(-3*a^2 + b^2)*d*Cos[e + f*x]^2
*PolyLog[2, -E^((2*I)*(e + f*x))] + (b^2*(2*b*f*(c + d*x) + (-(b*d) + 6*a*f*(c + d*x))*Sin[2*(e + f*x)]))/2)*(
a + b*Tan[e + f*x])^3)/(2*f^2*(a*Cos[e + f*x] + b*Sin[e + f*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.136, size = 493, normalized size = 1.8 \begin{align*}{\frac{6\,ib{a}^{2}dex}{f}}-{\frac{{\frac{i}{2}}{b}^{3}d{\it polylog} \left ( 2,-{{\rm e}^{2\,i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}-3\,i{a}^{2}bcx+{\frac{{b}^{3}\ln \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ) dx}{f}}-3\,{\frac{{a}^{2}bc\ln \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ) }{f}}+6\,{\frac{{a}^{2}bc\ln \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{f}}+3\,{\frac{a{b}^{2}d\ln \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ) }{{f}^{2}}}-6\,{\frac{a{b}^{2}d\ln \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}+2\,{\frac{{b}^{3}de\ln \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}-{\frac{i{b}^{3}d{e}^{2}}{{f}^{2}}}+{\frac{{a}^{3}d{x}^{2}}{2}}+{a}^{3}cx+{\frac{{\frac{3\,i}{2}}{a}^{2}bd{\it polylog} \left ( 2,-{{\rm e}^{2\,i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}-{\frac{i}{2}}{b}^{3}d{x}^{2}+{\frac{{b}^{3}c\ln \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ) }{f}}-2\,{\frac{{b}^{3}c\ln \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{f}}+i{b}^{3}cx-3\,{\frac{b\ln \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ){a}^{2}dx}{f}}-6\,{\frac{b{a}^{2}de\ln \left ({{\rm e}^{i \left ( fx+e \right ) }} \right ) }{{f}^{2}}}+{\frac{3\,i{a}^{2}bd{e}^{2}}{{f}^{2}}}-{\frac{2\,i{b}^{3}dex}{f}}+{\frac{{b}^{2} \left ( 6\,iadfx{{\rm e}^{2\,i \left ( fx+e \right ) }}+6\,iacf{{\rm e}^{2\,i \left ( fx+e \right ) }}+2\,bdfx{{\rm e}^{2\,i \left ( fx+e \right ) }}+6\,iadfx-ibd{{\rm e}^{2\,i \left ( fx+e \right ) }}+2\,bcf{{\rm e}^{2\,i \left ( fx+e \right ) }}+6\,iacf-ibd \right ) }{{f}^{2} \left ({{\rm e}^{2\,i \left ( fx+e \right ) }}+1 \right ) ^{2}}}-3\,a{b}^{2}cx-{\frac{3\,a{b}^{2}d{x}^{2}}{2}}+{\frac{3\,i}{2}}{a}^{2}bd{x}^{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+b*tan(f*x+e))^3,x)

[Out]

6*I*b/f*a^2*d*e*x-1/2*I*b^3*d*polylog(2,-exp(2*I*(f*x+e)))/f^2-3*I*a^2*b*c*x+b^3/f*ln(exp(2*I*(f*x+e))+1)*d*x-
3*b/f*a^2*c*ln(exp(2*I*(f*x+e))+1)+6*b/f*a^2*c*ln(exp(I*(f*x+e)))+3*b^2/f^2*a*d*ln(exp(2*I*(f*x+e))+1)-6*b^2/f
^2*a*d*ln(exp(I*(f*x+e)))+2*b^3/f^2*d*e*ln(exp(I*(f*x+e)))-I*b^3/f^2*d*e^2+1/2*a^3*d*x^2+a^3*c*x+3/2*I*a^2*b*d
*polylog(2,-exp(2*I*(f*x+e)))/f^2-1/2*I*b^3*d*x^2+b^3/f*c*ln(exp(2*I*(f*x+e))+1)-2*b^3/f*c*ln(exp(I*(f*x+e)))+
I*b^3*c*x-3*b/f*ln(exp(2*I*(f*x+e))+1)*a^2*d*x-6*b/f^2*a^2*d*e*ln(exp(I*(f*x+e)))+3*I*b/f^2*a^2*d*e^2-2*I*b^3/
f*d*e*x+b^2*(6*I*a*d*f*x*exp(2*I*(f*x+e))+6*I*a*c*f*exp(2*I*(f*x+e))+2*b*d*f*x*exp(2*I*(f*x+e))+6*I*a*d*f*x-I*
b*d*exp(2*I*(f*x+e))+2*b*c*f*exp(2*I*(f*x+e))+6*I*a*c*f-I*b*d)/f^2/(exp(2*I*(f*x+e))+1)^2-3*a*b^2*c*x-3/2*a*b^
2*d*x^2+3/2*I*a^2*b*d*x^2

________________________________________________________________________________________

Maxima [B]  time = 3.14418, size = 1782, normalized size = 6.43 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/2*(2*(f*x + e)*a^3*c + (f*x + e)^2*a^3*d/f - 2*(f*x + e)*a^3*d*e/f + 6*a^2*b*c*log(sec(f*x + e)) - 6*a^2*b*d
*e*log(sec(f*x + e))/f - 2*(12*a*b^2*d*e - 12*a*b^2*c*f - (3*a^2*b + 3*I*a*b^2 - b^3)*(f*x + e)^2*d + 2*b^3*d
+ 2*((3*I*a*b^2 - b^3)*d*e + (-3*I*a*b^2 + b^3)*c*f)*(f*x + e) + (2*b^3*d*e - 2*b^3*c*f - 6*a*b^2*d + 2*(3*a^2
*b - b^3)*(f*x + e)*d + 2*(b^3*d*e - b^3*c*f - 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d)*cos(4*f*x + 4*e) + 4*(
b^3*d*e - b^3*c*f - 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d)*cos(2*f*x + 2*e) - (-2*I*b^3*d*e + 2*I*b^3*c*f +
6*I*a*b^2*d + (-6*I*a^2*b + 2*I*b^3)*(f*x + e)*d)*sin(4*f*x + 4*e) - (-4*I*b^3*d*e + 4*I*b^3*c*f + 12*I*a*b^2*
d + (-12*I*a^2*b + 4*I*b^3)*(f*x + e)*d)*sin(2*f*x + 2*e))*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1) - (
(3*a^2*b + 3*I*a*b^2 - b^3)*(f*x + e)^2*d - 2*(6*a*b^2*d + (3*I*a*b^2 - b^3)*d*e + (-3*I*a*b^2 + b^3)*c*f)*(f*
x + e))*cos(4*f*x + 4*e) - (2*(3*a^2*b + 3*I*a*b^2 - b^3)*(f*x + e)^2*d - 2*b^3*d - (12*a*b^2 - 4*I*b^3)*d*e +
(12*a*b^2 - 4*I*b^3)*c*f - (4*(3*I*a*b^2 - b^3)*d*e + 4*(-3*I*a*b^2 + b^3)*c*f + (12*a*b^2 + 4*I*b^3)*d)*(f*x
+ e))*cos(2*f*x + 2*e) - ((3*a^2*b - b^3)*d*cos(4*f*x + 4*e) + 2*(3*a^2*b - b^3)*d*cos(2*f*x + 2*e) + (3*I*a^
2*b - I*b^3)*d*sin(4*f*x + 4*e) + (6*I*a^2*b - 2*I*b^3)*d*sin(2*f*x + 2*e) + (3*a^2*b - b^3)*d)*dilog(-e^(2*I*
f*x + 2*I*e)) - (I*b^3*d*e - I*b^3*c*f - 3*I*a*b^2*d + (3*I*a^2*b - I*b^3)*(f*x + e)*d + (I*b^3*d*e - I*b^3*c*
f - 3*I*a*b^2*d + (3*I*a^2*b - I*b^3)*(f*x + e)*d)*cos(4*f*x + 4*e) + (2*I*b^3*d*e - 2*I*b^3*c*f - 6*I*a*b^2*d
+ (6*I*a^2*b - 2*I*b^3)*(f*x + e)*d)*cos(2*f*x + 2*e) - (b^3*d*e - b^3*c*f - 3*a*b^2*d + (3*a^2*b - b^3)*(f*x
+ e)*d)*sin(4*f*x + 4*e) - 2*(b^3*d*e - b^3*c*f - 3*a*b^2*d + (3*a^2*b - b^3)*(f*x + e)*d)*sin(2*f*x + 2*e))*
log(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1) - ((3*I*a^2*b - 3*a*b^2 - I*b^3)*(f*x +
e)^2*d + (-12*I*a*b^2*d + (6*a*b^2 + 2*I*b^3)*d*e - (6*a*b^2 + 2*I*b^3)*c*f)*(f*x + e))*sin(4*f*x + 4*e) - ((6
*I*a^2*b - 6*a*b^2 - 2*I*b^3)*(f*x + e)^2*d - 2*I*b^3*d - 4*(3*I*a*b^2 + b^3)*d*e - 4*(-3*I*a*b^2 - b^3)*c*f +
((12*a*b^2 + 4*I*b^3)*d*e - (12*a*b^2 + 4*I*b^3)*c*f - 4*(3*I*a*b^2 - b^3)*d)*(f*x + e))*sin(2*f*x + 2*e))/(-
2*I*f*cos(4*f*x + 4*e) - 4*I*f*cos(2*f*x + 2*e) + 2*f*sin(4*f*x + 4*e) + 4*f*sin(2*f*x + 2*e) - 2*I*f))/f

________________________________________________________________________________________

Fricas [A]  time = 1.74405, size = 752, normalized size = 2.71 \begin{align*} \frac{2 \,{\left (a^{3} - 3 \, a b^{2}\right )} d f^{2} x^{2} - i \,{\left (3 \, a^{2} b - b^{3}\right )} d{\rm Li}_2\left (\frac{2 \,{\left (i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1} + 1\right ) + i \,{\left (3 \, a^{2} b - b^{3}\right )} d{\rm Li}_2\left (\frac{2 \,{\left (-i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1} + 1\right ) + 2 \,{\left (b^{3} d f x + b^{3} c f\right )} \tan \left (f x + e\right )^{2} + 2 \,{\left (b^{3} d f + 2 \,{\left (a^{3} - 3 \, a b^{2}\right )} c f^{2}\right )} x + 2 \,{\left (3 \, a b^{2} d -{\left (3 \, a^{2} b - b^{3}\right )} d f x -{\left (3 \, a^{2} b - b^{3}\right )} c f\right )} \log \left (-\frac{2 \,{\left (i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \,{\left (3 \, a b^{2} d -{\left (3 \, a^{2} b - b^{3}\right )} d f x -{\left (3 \, a^{2} b - b^{3}\right )} c f\right )} \log \left (-\frac{2 \,{\left (-i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \,{\left (6 \, a b^{2} d f x + 6 \, a b^{2} c f - b^{3} d\right )} \tan \left (f x + e\right )}{4 \, f^{2}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/4*(2*(a^3 - 3*a*b^2)*d*f^2*x^2 - I*(3*a^2*b - b^3)*d*dilog(2*(I*tan(f*x + e) - 1)/(tan(f*x + e)^2 + 1) + 1)
+ I*(3*a^2*b - b^3)*d*dilog(2*(-I*tan(f*x + e) - 1)/(tan(f*x + e)^2 + 1) + 1) + 2*(b^3*d*f*x + b^3*c*f)*tan(f*
x + e)^2 + 2*(b^3*d*f + 2*(a^3 - 3*a*b^2)*c*f^2)*x + 2*(3*a*b^2*d - (3*a^2*b - b^3)*d*f*x - (3*a^2*b - b^3)*c*
f)*log(-2*(I*tan(f*x + e) - 1)/(tan(f*x + e)^2 + 1)) + 2*(3*a*b^2*d - (3*a^2*b - b^3)*d*f*x - (3*a^2*b - b^3)*
c*f)*log(-2*(-I*tan(f*x + e) - 1)/(tan(f*x + e)^2 + 1)) + 2*(6*a*b^2*d*f*x + 6*a*b^2*c*f - b^3*d)*tan(f*x + e)
)/f^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (e + f x \right )}\right )^{3} \left (c + d x\right )\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*tan(f*x+e))**3,x)

[Out]

Integral((a + b*tan(e + f*x))**3*(c + d*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}{\left (b \tan \left (f x + e\right ) + a\right )}^{3}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*tan(f*x+e))^3,x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*tan(f*x + e) + a)^3, x)