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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.521567, antiderivative size = 300, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 9, integrand size = 20, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.45, Rules used = {3722, 3719, 2190, 2531, 6609, 2282, 6589, 3720, 32} $\frac{a^2 (c+d x)^4}{4 d}-\frac{3 a b d^2 (c+d x) \text{Li}_3\left (-e^{2 i (e+f x)}\right )}{f^3}+\frac{3 i a b d (c+d x)^2 \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{f^2}-\frac{2 a b (c+d x)^3 \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac{i a b (c+d x)^4}{2 d}-\frac{3 i a b d^3 \text{Li}_4\left (-e^{2 i (e+f x)}\right )}{2 f^4}-\frac{3 i b^2 d^2 (c+d x) \text{Li}_2\left (-e^{2 i (e+f x)}\right )}{f^3}+\frac{3 b^2 d (c+d x)^2 \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac{b^2 (c+d x)^3 \tan (e+f x)}{f}-\frac{i b^2 (c+d x)^3}{f}-\frac{b^2 (c+d x)^4}{4 d}+\frac{3 b^2 d^3 \text{Li}_3\left (-e^{2 i (e+f x)}\right )}{2 f^4}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((-I)*b^2*(c + d*x)^3)/f + (a^2*(c + d*x)^4)/(4*d) + ((I/2)*a*b*(c + d*x)^4)/d - (b^2*(c + d*x)^4)/(4*d) + (3*
b^2*d*(c + d*x)^2*Log[1 + E^((2*I)*(e + f*x))])/f^2 - (2*a*b*(c + d*x)^3*Log[1 + E^((2*I)*(e + f*x))])/f - ((3
*I)*b^2*d^2*(c + d*x)*PolyLog[2, -E^((2*I)*(e + f*x))])/f^3 + ((3*I)*a*b*d*(c + d*x)^2*PolyLog[2, -E^((2*I)*(e
+ f*x))])/f^2 + (3*b^2*d^3*PolyLog[3, -E^((2*I)*(e + f*x))])/(2*f^4) - (3*a*b*d^2*(c + d*x)*PolyLog[3, -E^((2
*I)*(e + f*x))])/f^3 - (((3*I)/2)*a*b*d^3*PolyLog[4, -E^((2*I)*(e + f*x))])/f^4 + (b^2*(c + d*x)^3*Tan[e + f*x
])/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 2531

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

Rule 6609

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

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

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 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

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

Mathematica [B]  time = 7.85591, size = 1326, normalized size = 4.42 $\text{result too large to display}$

Warning: Unable to verify antiderivative.

[In]

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

[Out]

((I/4)*b^2*d^3*(2*f^2*x^2*(2*f*x - (3*I)*(1 + E^((2*I)*e))*Log[1 + E^((-2*I)*(e + f*x))]) + 6*(1 + E^((2*I)*e)
)*f*x*PolyLog[2, -E^((-2*I)*(e + f*x))] - (3*I)*(1 + E^((2*I)*e))*PolyLog[3, -E^((-2*I)*(e + f*x))])*Sec[e])/(
E^(I*e)*f^4) - ((I/2)*a*b*c*d^2*(2*f^2*x^2*(2*f*x - (3*I)*(1 + E^((2*I)*e))*Log[1 + E^((-2*I)*(e + f*x))]) + 6
*(1 + E^((2*I)*e))*f*x*PolyLog[2, -E^((-2*I)*(e + f*x))] - (3*I)*(1 + E^((2*I)*e))*PolyLog[3, -E^((-2*I)*(e +
f*x))])*Sec[e])/(E^(I*e)*f^3) - (I/4)*a*b*d^3*E^(I*e)*((2*x^4)/E^((2*I)*e) - ((4*I)*(1 + E^((-2*I)*e))*x^3*Log
[1 + E^((-2*I)*(e + f*x))])/f + (3*(1 + E^((2*I)*e))*(2*f^2*x^2*PolyLog[2, -E^((-2*I)*(e + f*x))] - (2*I)*f*x*
PolyLog[3, -E^((-2*I)*(e + f*x))] - PolyLog[4, -E^((-2*I)*(e + f*x))]))/(E^((2*I)*e)*f^4))*Sec[e] + (3*b^2*c^2
*d*Sec[e]*(Cos[e]*Log[Cos[e]*Cos[f*x] - Sin[e]*Sin[f*x]] + f*x*Sin[e]))/(f^2*(Cos[e]^2 + Sin[e]^2)) - (2*a*b*c
^3*Sec[e]*(Cos[e]*Log[Cos[e]*Cos[f*x] - Sin[e]*Sin[f*x]] + f*x*Sin[e]))/(f*(Cos[e]^2 + Sin[e]^2)) + (3*b^2*c*d
^2*Csc[e]*((f^2*x^2)/E^(I*ArcTan[Cot[e]]) - (Cot[e]*(I*f*x*(-Pi - 2*ArcTan[Cot[e]]) - Pi*Log[1 + E^((-2*I)*f*x
)] - 2*(f*x - ArcTan[Cot[e]])*Log[1 - E^((2*I)*(f*x - ArcTan[Cot[e]]))] + Pi*Log[Cos[f*x]] - 2*ArcTan[Cot[e]]*
Log[Sin[f*x - ArcTan[Cot[e]]]] + I*PolyLog[2, E^((2*I)*(f*x - ArcTan[Cot[e]]))]))/Sqrt[1 + Cot[e]^2])*Sec[e])/
(f^3*Sqrt[Csc[e]^2*(Cos[e]^2 + Sin[e]^2)]) - (3*a*b*c^2*d*Csc[e]*((f^2*x^2)/E^(I*ArcTan[Cot[e]]) - (Cot[e]*(I*
f*x*(-Pi - 2*ArcTan[Cot[e]]) - Pi*Log[1 + E^((-2*I)*f*x)] - 2*(f*x - ArcTan[Cot[e]])*Log[1 - E^((2*I)*(f*x - A
rcTan[Cot[e]]))] + Pi*Log[Cos[f*x]] - 2*ArcTan[Cot[e]]*Log[Sin[f*x - ArcTan[Cot[e]]]] + I*PolyLog[2, E^((2*I)*
(f*x - ArcTan[Cot[e]]))]))/Sqrt[1 + Cot[e]^2])*Sec[e])/(f^2*Sqrt[Csc[e]^2*(Cos[e]^2 + Sin[e]^2)]) + (Sec[e]*Se
c[e + f*x]*(4*a^2*c^3*f*x*Cos[f*x] - 4*b^2*c^3*f*x*Cos[f*x] + 6*a^2*c^2*d*f*x^2*Cos[f*x] - 6*b^2*c^2*d*f*x^2*C
os[f*x] + 4*a^2*c*d^2*f*x^3*Cos[f*x] - 4*b^2*c*d^2*f*x^3*Cos[f*x] + a^2*d^3*f*x^4*Cos[f*x] - b^2*d^3*f*x^4*Cos
[f*x] + 4*a^2*c^3*f*x*Cos[2*e + f*x] - 4*b^2*c^3*f*x*Cos[2*e + f*x] + 6*a^2*c^2*d*f*x^2*Cos[2*e + f*x] - 6*b^2
*c^2*d*f*x^2*Cos[2*e + f*x] + 4*a^2*c*d^2*f*x^3*Cos[2*e + f*x] - 4*b^2*c*d^2*f*x^3*Cos[2*e + f*x] + a^2*d^3*f*
x^4*Cos[2*e + f*x] - b^2*d^3*f*x^4*Cos[2*e + f*x] + 8*b^2*c^3*Sin[f*x] + 24*b^2*c^2*d*x*Sin[f*x] - 8*a*b*c^3*f
*x*Sin[f*x] + 24*b^2*c*d^2*x^2*Sin[f*x] - 12*a*b*c^2*d*f*x^2*Sin[f*x] + 8*b^2*d^3*x^3*Sin[f*x] - 8*a*b*c*d^2*f
*x^3*Sin[f*x] - 2*a*b*d^3*f*x^4*Sin[f*x] + 8*a*b*c^3*f*x*Sin[2*e + f*x] + 12*a*b*c^2*d*f*x^2*Sin[2*e + f*x] +
8*a*b*c*d^2*f*x^3*Sin[2*e + f*x] + 2*a*b*d^3*f*x^4*Sin[2*e + f*x]))/(8*f)

________________________________________________________________________________________

Maple [B]  time = 0.168, size = 919, normalized size = 3.1 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

1/2*I*a*b*d^3*x^4-6*b^2/f^4*d^3*e^2*ln(exp(I*(f*x+e)))+3*b^2/f^2*c^2*d*ln(exp(2*I*(f*x+e))+1)-6*b^2/f^2*c^2*d*
ln(exp(I*(f*x+e)))-2*b/f*a*c^3*ln(exp(2*I*(f*x+e))+1)+4*b/f*a*c^3*ln(exp(I*(f*x+e)))+3*b^2/f^2*d^3*ln(exp(2*I*
(f*x+e))+1)*x^2+4*I*b^2/f^4*d^3*e^3-2*I*b^2/f*d^3*x^3+12*b/f^3*a*c*d^2*e^2*ln(exp(I*(f*x+e)))+2*I*b^2*(d^3*x^3
+3*c*d^2*x^2+3*c^2*d*x+c^3)/f/(exp(2*I*(f*x+e))+1)-b^2*c*d^2*x^3+3/2*a^2*c^2*d*x^2-3/2*b^2*c^2*d*x^2+6*I*b/f^2
*a*c*d^2*polylog(2,-exp(2*I*(f*x+e)))*x+12*I*b/f*a*c^2*d*e*x-12*I*b/f^2*a*c*d^2*e^2*x-12*b/f^2*a*c^2*d*e*ln(ex
p(I*(f*x+e)))-2*b/f*a*d^3*ln(exp(2*I*(f*x+e))+1)*x^3-6*b/f*a*c*d^2*ln(exp(2*I*(f*x+e))+1)*x^2-6*b/f*ln(exp(2*I
*(f*x+e))+1)*a*c^2*d*x+3*I*b/f^2*a*c^2*d*polylog(2,-exp(2*I*(f*x+e)))+6*I*b/f^2*a*c^2*d*e^2+4*I*b/f^3*a*d^3*e^
3*x-12*I*b^2/f^2*c*d^2*e*x-8*I*b/f^3*a*c*d^2*e^3+3*I*b/f^2*a*d^3*polylog(2,-exp(2*I*(f*x+e)))*x^2+1/4*a^2*d^3*
x^4-1/4*b^2*d^3*x^4+a^2*c^3*x-b^2*c^3*x+a^2*c*d^2*x^3-2*I*a*b*c^3*x+3/2*b^2*d^3*polylog(3,-exp(2*I*(f*x+e)))/f
^4+3*I*a*b*c^2*d*x^2+12*b^2/f^3*c*d^2*e*ln(exp(I*(f*x+e)))-3*I*b^2/f^3*c*d^2*polylog(2,-exp(2*I*(f*x+e)))+3*I*
b/f^4*a*d^3*e^4-6*I*b^2/f*c*d^2*x^2-6*I*b^2/f^3*c*d^2*e^2+6*I*b^2/f^3*d^3*e^2*x-3*I*b^2/f^3*d^3*polylog(2,-exp
(2*I*(f*x+e)))*x+2*I*a*b*c*d^2*x^3+6*b^2/f^2*c*d^2*ln(exp(2*I*(f*x+e))+1)*x-3*b/f^3*a*d^3*polylog(3,-exp(2*I*(
f*x+e)))*x-3*b/f^3*a*c*d^2*polylog(3,-exp(2*I*(f*x+e)))-4*b/f^4*a*d^3*e^3*ln(exp(I*(f*x+e)))-3/2*I*a*b*d^3*pol
ylog(4,-exp(2*I*(f*x+e)))/f^4

________________________________________________________________________________________

Maxima [B]  time = 4.9235, size = 3401, normalized size = 11.34 \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)^3*(a+b*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

1/4*(4*(f*x + e)*a^2*c^3 + (f*x + e)^4*a^2*d^3/f^3 - 4*(f*x + e)^3*a^2*d^3*e/f^3 + 6*(f*x + e)^2*a^2*d^3*e^2/f
^3 - 4*(f*x + e)*a^2*d^3*e^3/f^3 + 4*(f*x + e)^3*a^2*c*d^2/f^2 - 12*(f*x + e)^2*a^2*c*d^2*e/f^2 + 12*(f*x + e)
*a^2*c*d^2*e^2/f^2 + 6*(f*x + e)^2*a^2*c^2*d/f - 12*(f*x + e)*a^2*c^2*d*e/f + 8*a*b*c^3*log(sec(f*x + e)) - 8*
a*b*d^3*e^3*log(sec(f*x + e))/f^3 + 24*a*b*c*d^2*e^2*log(sec(f*x + e))/f^2 - 24*a*b*c^2*d*e*log(sec(f*x + e))/
f + 4*((6*a*b + 3*I*b^2)*(f*x + e)^4*d^3 - 24*b^2*d^3*e^3 + 72*b^2*c*d^2*e^2*f - 72*b^2*c^2*d*e*f^2 + 24*b^2*c
^3*f^3 - ((24*a*b + 12*I*b^2)*d^3*e - (24*a*b + 12*I*b^2)*c*d^2*f)*(f*x + e)^3 + ((36*a*b + 18*I*b^2)*d^3*e^2
- (72*a*b + 36*I*b^2)*c*d^2*e*f + (36*a*b + 18*I*b^2)*c^2*d*f^2)*(f*x + e)^2 - (12*I*b^2*d^3*e^3 - 36*I*b^2*c*
d^2*e^2*f + 36*I*b^2*c^2*d*e*f^2 - 12*I*b^2*c^3*f^3)*(f*x + e) - (32*(f*x + e)^3*a*b*d^3 - 36*b^2*d^3*e^2 + 72
*b^2*c*d^2*e*f - 36*b^2*c^2*d*f^2 - 36*(2*a*b*d^3*e - 2*a*b*c*d^2*f + b^2*d^3)*(f*x + e)^2 + 72*(a*b*d^3*e^2 +
a*b*c^2*d*f^2 + b^2*d^3*e - (2*a*b*c*d^2*e + b^2*c*d^2)*f)*(f*x + e) + 4*(8*(f*x + e)^3*a*b*d^3 - 9*b^2*d^3*e
^2 + 18*b^2*c*d^2*e*f - 9*b^2*c^2*d*f^2 - 9*(2*a*b*d^3*e - 2*a*b*c*d^2*f + b^2*d^3)*(f*x + e)^2 + 18*(a*b*d^3*
e^2 + a*b*c^2*d*f^2 + b^2*d^3*e - (2*a*b*c*d^2*e + b^2*c*d^2)*f)*(f*x + e))*cos(2*f*x + 2*e) + (32*I*(f*x + e)
^3*a*b*d^3 - 36*I*b^2*d^3*e^2 + 72*I*b^2*c*d^2*e*f - 36*I*b^2*c^2*d*f^2 + (-72*I*a*b*d^3*e + 72*I*a*b*c*d^2*f
- 36*I*b^2*d^3)*(f*x + e)^2 + (72*I*a*b*d^3*e^2 + 72*I*a*b*c^2*d*f^2 + 72*I*b^2*d^3*e + (-144*I*a*b*c*d^2*e -
72*I*b^2*c*d^2)*f)*(f*x + e))*sin(2*f*x + 2*e))*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1) + ((6*a*b + 3*
I*b^2)*(f*x + e)^4*d^3 - (24*b^2*d^3 + (24*a*b + 12*I*b^2)*d^3*e - (24*a*b + 12*I*b^2)*c*d^2*f)*(f*x + e)^3 +
(72*b^2*d^3*e + (36*a*b + 18*I*b^2)*d^3*e^2 + (36*a*b + 18*I*b^2)*c^2*d*f^2 - (72*b^2*c*d^2 + (72*a*b + 36*I*b
^2)*c*d^2*e)*f)*(f*x + e)^2 - (12*I*b^2*d^3*e^3 - 12*I*b^2*c^3*f^3 + 72*b^2*d^3*e^2 - 36*(-I*b^2*c^2*d*e - 2*b
^2*c^2*d)*f^2 + (-36*I*b^2*c*d^2*e^2 - 144*b^2*c*d^2*e)*f)*(f*x + e))*cos(2*f*x + 2*e) + (48*(f*x + e)^2*a*b*d
^3 + 36*a*b*d^3*e^2 + 36*a*b*c^2*d*f^2 + 36*b^2*d^3*e - 36*(2*a*b*d^3*e - 2*a*b*c*d^2*f + b^2*d^3)*(f*x + e) -
36*(2*a*b*c*d^2*e + b^2*c*d^2)*f + 12*(4*(f*x + e)^2*a*b*d^3 + 3*a*b*d^3*e^2 + 3*a*b*c^2*d*f^2 + 3*b^2*d^3*e
- 3*(2*a*b*d^3*e - 2*a*b*c*d^2*f + b^2*d^3)*(f*x + e) - 3*(2*a*b*c*d^2*e + b^2*c*d^2)*f)*cos(2*f*x + 2*e) - (-
48*I*(f*x + e)^2*a*b*d^3 - 36*I*a*b*d^3*e^2 - 36*I*a*b*c^2*d*f^2 - 36*I*b^2*d^3*e + (72*I*a*b*d^3*e - 72*I*a*b
*c*d^2*f + 36*I*b^2*d^3)*(f*x + e) + (72*I*a*b*c*d^2*e + 36*I*b^2*c*d^2)*f)*sin(2*f*x + 2*e))*dilog(-e^(2*I*f*
x + 2*I*e)) - (-16*I*(f*x + e)^3*a*b*d^3 + 18*I*b^2*d^3*e^2 - 36*I*b^2*c*d^2*e*f + 18*I*b^2*c^2*d*f^2 + (36*I*
a*b*d^3*e - 36*I*a*b*c*d^2*f + 18*I*b^2*d^3)*(f*x + e)^2 + (-36*I*a*b*d^3*e^2 - 36*I*a*b*c^2*d*f^2 - 36*I*b^2*
d^3*e + (72*I*a*b*c*d^2*e + 36*I*b^2*c*d^2)*f)*(f*x + e) + (-16*I*(f*x + e)^3*a*b*d^3 + 18*I*b^2*d^3*e^2 - 36*
I*b^2*c*d^2*e*f + 18*I*b^2*c^2*d*f^2 + (36*I*a*b*d^3*e - 36*I*a*b*c*d^2*f + 18*I*b^2*d^3)*(f*x + e)^2 + (-36*I
*a*b*d^3*e^2 - 36*I*a*b*c^2*d*f^2 - 36*I*b^2*d^3*e + (72*I*a*b*c*d^2*e + 36*I*b^2*c*d^2)*f)*(f*x + e))*cos(2*f
*x + 2*e) + 2*(8*(f*x + e)^3*a*b*d^3 - 9*b^2*d^3*e^2 + 18*b^2*c*d^2*e*f - 9*b^2*c^2*d*f^2 - 9*(2*a*b*d^3*e - 2
*a*b*c*d^2*f + b^2*d^3)*(f*x + e)^2 + 18*(a*b*d^3*e^2 + a*b*c^2*d*f^2 + b^2*d^3*e - (2*a*b*c*d^2*e + b^2*c*d^2
)*f)*(f*x + e))*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) - (24*
a*b*d^3*cos(2*f*x + 2*e) + 24*I*a*b*d^3*sin(2*f*x + 2*e) + 24*a*b*d^3)*polylog(4, -e^(2*I*f*x + 2*I*e)) - (-48
*I*(f*x + e)*a*b*d^3 + 36*I*a*b*d^3*e - 36*I*a*b*c*d^2*f + 18*I*b^2*d^3 + (-48*I*(f*x + e)*a*b*d^3 + 36*I*a*b*
d^3*e - 36*I*a*b*c*d^2*f + 18*I*b^2*d^3)*cos(2*f*x + 2*e) + 6*(8*(f*x + e)*a*b*d^3 - 6*a*b*d^3*e + 6*a*b*c*d^2
*f - 3*b^2*d^3)*sin(2*f*x + 2*e))*polylog(3, -e^(2*I*f*x + 2*I*e)) + (3*(2*I*a*b - b^2)*(f*x + e)^4*d^3 - (24*
I*b^2*d^3 - 12*(-2*I*a*b + b^2)*d^3*e - 12*(2*I*a*b - b^2)*c*d^2*f)*(f*x + e)^3 - (-72*I*b^2*d^3*e - 18*(2*I*a
*b - b^2)*d^3*e^2 - 18*(2*I*a*b - b^2)*c^2*d*f^2 + (72*I*b^2*c*d^2 - 36*(-2*I*a*b + b^2)*c*d^2*e)*f)*(f*x + e)
^2 + (12*b^2*d^3*e^3 - 12*b^2*c^3*f^3 - 72*I*b^2*d^3*e^2 + (36*b^2*c^2*d*e - 72*I*b^2*c^2*d)*f^2 - 36*(b^2*c*d
^2*e^2 - 4*I*b^2*c*d^2*e)*f)*(f*x + e))*sin(2*f*x + 2*e))/(-12*I*f^3*cos(2*f*x + 2*e) + 12*f^3*sin(2*f*x + 2*e
) - 12*I*f^3))/f

________________________________________________________________________________________

Fricas [C]  time = 1.81495, size = 1767, normalized size = 5.89 \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)^3*(a+b*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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