Integrand size = 20, antiderivative size = 300 \[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=-\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) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}+\frac {3 i a b d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 b^2 d^3 \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 a b d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{f^3}-\frac {3 i a b d^3 \operatorname {PolyLog}\left (4,-e^{2 i (e+f x)}\right )}{2 f^4}+\frac {b^2 (c+d x)^3 \tan (e+f x)}{f} \] Output:
-I*b^2*(d*x+c)^3/f+1/4*a^2*(d*x+c)^4/d+1/2*I*a*b*(d*x+c)^4/d-1/4*b^2*(d*x+ c)^4/d+3*b^2*d*(d*x+c)^2*ln(1+exp(2*I*(f*x+e)))/f^2-2*a*b*(d*x+c)^3*ln(1+e xp(2*I*(f*x+e)))/f-3*I*b^2*d^2*(d*x+c)*polylog(2,-exp(2*I*(f*x+e)))/f^3+3* I*a*b*d*(d*x+c)^2*polylog(2,-exp(2*I*(f*x+e)))/f^2+3/2*b^2*d^3*polylog(3,- exp(2*I*(f*x+e)))/f^4-3*a*b*d^2*(d*x+c)*polylog(3,-exp(2*I*(f*x+e)))/f^3-3 /2*I*a*b*d^3*polylog(4,-exp(2*I*(f*x+e)))/f^4+b^2*(d*x+c)^3*tan(f*x+e)/f
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1337\) vs. \(2(300)=600\).
Time = 7.17 (sec) , antiderivative size = 1337, normalized size of antiderivative = 4.46 \[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx =\text {Too large to display} \] Input:
Integrate[(c + d*x)^3*(a + b*Tan[e + f*x])^2,x]
Output:
((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*f^4*x^4)/E^((2*I)*e ) - (4*I)*(1 + E^((-2*I)*e))*f^3*x^3*Log[1 + E^((-2*I)*(e + f*x))] + 6*(1 + E^((-2*I)*e))*f^2*x^2*PolyLog[2, -E^((-2*I)*(e + f*x))] - (6*I)*(1 + E^( (-2*I)*e))*f*x*PolyLog[3, -E^((-2*I)*(e + f*x))] - 3*(1 + E^((-2*I)*e))*Po lyLog[4, -E^((-2*I)*(e + f*x))])*Sec[e])/f^4 + (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 + Si n[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 - Arc Tan[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*C sc[e]*((f^2*x^2)/E^(I*ArcTan[Cot[e]]) - (Cot[e]*(I*f*x*(-Pi - 2*ArcTan[...
Time = 0.77 (sec) , antiderivative size = 300, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4205, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^3 (a+b \tan (e+f x))^2dx\) |
\(\Big \downarrow \) 4205 |
\(\displaystyle \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\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 (c+d x)^4}{4 d}-\frac {3 a b d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{f^3}+\frac {3 i a b d (c+d x)^2 \operatorname {PolyLog}\left (2,-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 \operatorname {PolyLog}\left (4,-e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 i b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,-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 \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{2 f^4}\) |
Input:
Int[(c + d*x)^3*(a + b*Tan[e + f*x])^2,x]
Output:
((-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
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]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 951 vs. \(2 (271 ) = 542\).
Time = 0.90 (sec) , antiderivative size = 952, normalized size of antiderivative = 3.17
Input:
int((d*x+c)^3*(a+b*tan(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
12*I/f*b*d*c^2*a*e*x+d^2*a^2*c*x^3+3/2*d*a^2*c^2*x^2+a^2*c^3*x-d^2*b^2*c*x ^3-3/2*d*b^2*c^2*x^2-12*I/f^2*b*a*c*d^2*e^2*x+6*I/f^2*b*a*c*d^2*polylog(2, -exp(2*I*(f*x+e)))*x+2*I*b^2*(d^3*x^3+3*c*d^2*x^2+3*c^2*d*x+c^3)/f/(1+exp( 2*I*(f*x+e)))+1/4*d^3*a^2*x^4+1/4/d*a^2*c^4-1/4*d^3*b^2*x^4-b^2*c^3*x-1/4/ d*b^2*c^4+1/2*I*d^3*a*b*x^4-2*I*a*b*c^3*x-1/2*I/d*a*b*c^4+4/f*b*a*c^3*ln(e xp(I*(f*x+e)))-2/f*b*a*c^3*ln(1+exp(2*I*(f*x+e)))-6/f^2*b^2*c^2*d*ln(exp(I *(f*x+e)))+3/f^2*b^2*c^2*d*ln(1+exp(2*I*(f*x+e)))-6/f^4*b^2*e^2*d^3*ln(exp (I*(f*x+e)))+3/f^2*b^2*d^3*ln(1+exp(2*I*(f*x+e)))*x^2-2*I/f*b^2*d^3*x^3+4* I/f^4*b^2*e^3*d^3+3/2*b^2*d^3*polylog(3,-exp(2*I*(f*x+e)))/f^4-12/f^2*b*e* a*c^2*d*ln(exp(I*(f*x+e)))-6/f*b*d*c^2*a*ln(1+exp(2*I*(f*x+e)))*x-6/f*b*a* c*d^2*ln(1+exp(2*I*(f*x+e)))*x^2+12/f^3*b*e^2*a*c*d^2*ln(exp(I*(f*x+e)))+6 *I/f^2*b*d*c^2*a*e^2+3*I/f^2*b*d*c^2*a*polylog(2,-exp(2*I*(f*x+e)))+3*I/f^ 2*b*d^3*a*polylog(2,-exp(2*I*(f*x+e)))*x^2-8*I/f^3*b*a*c*d^2*e^3-12*I/f^2* b^2*d^2*c*e*x+4*I/f^3*b*e^3*d^3*a*x+3*I/f^4*b*e^4*d^3*a-6*I/f*b^2*d^2*c*x^ 2-6*I/f^3*b^2*d^2*c*e^2-3*I/f^3*b^2*d^2*c*polylog(2,-exp(2*I*(f*x+e)))+6*I /f^3*b^2*e^2*d^3*x-3*I/f^3*b^2*d^3*polylog(2,-exp(2*I*(f*x+e)))*x+2*I*d^2* a*b*c*x^3+3*I*d*a*b*c^2*x^2-2/f*b*d^3*a*ln(1+exp(2*I*(f*x+e)))*x^3-4/f^4*b *e^3*a*d^3*ln(exp(I*(f*x+e)))-3/f^3*b*a*c*d^2*polylog(3,-exp(2*I*(f*x+e))) -3/f^3*b*d^3*a*polylog(3,-exp(2*I*(f*x+e)))*x+6/f^2*b^2*d^2*c*ln(1+exp(2*I *(f*x+e)))*x+12/f^3*b^2*e*c*d^2*ln(exp(I*(f*x+e)))-3/2*I*a*b*d^3*polylo...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 759 vs. \(2 (264) = 528\).
Time = 0.10 (sec) , antiderivative size = 759, normalized size of antiderivative = 2.53 \[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)^3*(a+b*tan(f*x+e))^2,x, algorithm="fricas")
Output:
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*polylo g(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 + I*a*b*c^2*d*f^2 - I*b^2*c*d^2*f + 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 - I*a*b*c^2*d*f^2 + I*b^2*c*d^2*f - 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
\[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=\int \left (a + b \tan {\left (e + f x \right )}\right )^{2} \left (c + d x\right )^{3}\, dx \] Input:
integrate((d*x+c)**3*(a+b*tan(f*x+e))**2,x)
Output:
Integral((a + b*tan(e + f*x))**2*(c + d*x)**3, x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2525 vs. \(2 (264) = 528\).
Time = 0.78 (sec) , antiderivative size = 2525, normalized size of antiderivative = 8.42 \[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^3*(a+b*tan(f*x+e))^2,x, algorithm="maxima")
Output:
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*(3*(2*a*b + 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 - 12*((2*a*b + I*b^2)*d^3*e - (2*a* b + I*b^2)*c*d^2*f)*(f*x + e)^3 + 18*((2*a*b + I*b^2)*d^3*e^2 - 2*(2*a*b + I*b^2)*c*d^2*e*f + (2*a*b + I*b^2)*c^2*d*f^2)*(f*x + e)^2 + 12*(-I*b^2*d^ 3*e^3 + 3*I*b^2*c*d^2*e^2*f - 3*I*b^2*c^2*d*e*f^2 + I*b^2*c^3*f^3)*(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) + (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) - (-8*I*(f*x + e)^3*a*b*d^3 + 9*I*b^2*d^3*e^2 - 1 8*I*b^2*c*d^2*e*f + 9*I*b^2*c^2*d*f^2 + 9*(2*I*a*b*d^3*e - 2*I*a*b*c*d^2*f + I*b^2*d^3)*(f*x + e)^2 + 18*(-I*a*b*d^3*e^2 - I*a*b*c^2*d*f^2 - I*b^...
\[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=\int { {\left (d x + c\right )}^{3} {\left (b \tan \left (f x + e\right ) + a\right )}^{2} \,d x } \] Input:
integrate((d*x+c)^3*(a+b*tan(f*x+e))^2,x, algorithm="giac")
Output:
integrate((d*x + c)^3*(b*tan(f*x + e) + a)^2, x)
Timed out. \[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=\int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2\,{\left (c+d\,x\right )}^3 \,d x \] Input:
int((a + b*tan(e + f*x))^2*(c + d*x)^3,x)
Output:
int((a + b*tan(e + f*x))^2*(c + d*x)^3, x)
\[ \int (c+d x)^3 (a+b \tan (e+f x))^2 \, dx=\frac {8 \left (\int \tan \left (f x +e \right ) x^{3}d x \right ) a b \,d^{3} f^{2}+24 \left (\int \tan \left (f x +e \right ) x^{2}d x \right ) a b c \,d^{2} f^{2}-12 \left (\int \tan \left (f x +e \right ) x^{2}d x \right ) b^{2} d^{3} f +24 \left (\int \tan \left (f x +e \right ) x d x \right ) a b \,c^{2} d \,f^{2}-24 \left (\int \tan \left (f x +e \right ) x d x \right ) b^{2} c \,d^{2} f +4 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) a b \,c^{3} f -6 \,\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) b^{2} c^{2} d +4 \tan \left (f x +e \right ) b^{2} c^{3} f +12 \tan \left (f x +e \right ) b^{2} c^{2} d f x +12 \tan \left (f x +e \right ) b^{2} c \,d^{2} f \,x^{2}+4 \tan \left (f x +e \right ) b^{2} d^{3} f \,x^{3}+4 a^{2} c^{3} f^{2} x +6 a^{2} c^{2} d \,f^{2} x^{2}+4 a^{2} c \,d^{2} f^{2} x^{3}+a^{2} d^{3} f^{2} x^{4}-4 b^{2} c^{3} f^{2} x -6 b^{2} c^{2} d \,f^{2} x^{2}-4 b^{2} c \,d^{2} f^{2} x^{3}-b^{2} d^{3} f^{2} x^{4}}{4 f^{2}} \] Input:
int((d*x+c)^3*(a+b*tan(f*x+e))^2,x)
Output:
(8*int(tan(e + f*x)*x**3,x)*a*b*d**3*f**2 + 24*int(tan(e + f*x)*x**2,x)*a* b*c*d**2*f**2 - 12*int(tan(e + f*x)*x**2,x)*b**2*d**3*f + 24*int(tan(e + f *x)*x,x)*a*b*c**2*d*f**2 - 24*int(tan(e + f*x)*x,x)*b**2*c*d**2*f + 4*log( tan(e + f*x)**2 + 1)*a*b*c**3*f - 6*log(tan(e + f*x)**2 + 1)*b**2*c**2*d + 4*tan(e + f*x)*b**2*c**3*f + 12*tan(e + f*x)*b**2*c**2*d*f*x + 12*tan(e + f*x)*b**2*c*d**2*f*x**2 + 4*tan(e + f*x)*b**2*d**3*f*x**3 + 4*a**2*c**3*f **2*x + 6*a**2*c**2*d*f**2*x**2 + 4*a**2*c*d**2*f**2*x**3 + a**2*d**3*f**2 *x**4 - 4*b**2*c**3*f**2*x - 6*b**2*c**2*d*f**2*x**2 - 4*b**2*c*d**2*f**2* x**3 - b**2*d**3*f**2*x**4)/(4*f**2)