Integrand size = 19, antiderivative size = 319 \[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\frac {(e+f x)^3 \log \left (1+e^{2 i (c+d x)}\right )}{3 f}-\frac {(e+f x)^3 \log \left (1+\frac {(a-i b) e^{2 i (c+d x)}}{a+i b}\right )}{3 f}+\frac {(e+f x)^3 \log (a+b \tan (c+d x))}{3 f}-\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right )}{2 d}+\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-\frac {(a-i b) e^{2 i (c+d x)}}{a+i b}\right )}{2 d}+\frac {f (e+f x) \operatorname {PolyLog}\left (3,-e^{2 i (c+d x)}\right )}{2 d^2}-\frac {f (e+f x) \operatorname {PolyLog}\left (3,-\frac {(a-i b) e^{2 i (c+d x)}}{a+i b}\right )}{2 d^2}+\frac {i f^2 \operatorname {PolyLog}\left (4,-e^{2 i (c+d x)}\right )}{4 d^3}-\frac {i f^2 \operatorname {PolyLog}\left (4,-\frac {(a-i b) e^{2 i (c+d x)}}{a+i b}\right )}{4 d^3} \] Output:
1/3*(f*x+e)^3*ln(1+exp(2*I*(d*x+c)))/f-1/3*(f*x+e)^3*ln(1+(a-I*b)*exp(2*I* (d*x+c))/(a+I*b))/f+1/3*(f*x+e)^3*ln(a+b*tan(d*x+c))/f-1/2*I*(f*x+e)^2*pol ylog(2,-exp(2*I*(d*x+c)))/d+1/2*I*(f*x+e)^2*polylog(2,-(a-I*b)*exp(2*I*(d* x+c))/(a+I*b))/d+1/2*f*(f*x+e)*polylog(3,-exp(2*I*(d*x+c)))/d^2-1/2*f*(f*x +e)*polylog(3,-(a-I*b)*exp(2*I*(d*x+c))/(a+I*b))/d^2+1/4*I*f^2*polylog(4,- exp(2*I*(d*x+c)))/d^3-1/4*I*f^2*polylog(4,-(a-I*b)*exp(2*I*(d*x+c))/(a+I*b ))/d^3
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1192\) vs. \(2(319)=638\).
Time = 10.48 (sec) , antiderivative size = 1192, normalized size of antiderivative = 3.74 \[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx =\text {Too large to display} \] Input:
Integrate[(e + f*x)^2*Log[a + b*Tan[c + d*x]],x]
Output:
(x*(3*e^2 + 3*e*f*x + f^2*x^2)*Log[a + b*Tan[c + d*x]])/3 + ((a^2 + b^2)*d *((12*e^2*x^2)/(I*a + b) + (8*e*f*x^3)/(I*a + b) + (2*f^2*x^4)/(I*a + b) - (12*e^2*((-I)*b*(-1 + E^((2*I)*c)) + a*(1 + E^((2*I)*c)))*x*Log[1 + (a + I*b)/((a - I*b)*E^((2*I)*(c + d*x)))])/((a^2 + b^2)*d) - (12*e*((-I)*b*(-1 + E^((2*I)*c)) + a*(1 + E^((2*I)*c)))*f*x^2*Log[1 + (a + I*b)/((a - I*b)* E^((2*I)*(c + d*x)))])/((a^2 + b^2)*d) - (4*((-I)*b*(-1 + E^((2*I)*c)) + a *(1 + E^((2*I)*c)))*f^2*x^3*Log[1 + (a + I*b)/((a - I*b)*E^((2*I)*(c + d*x )))])/((a^2 + b^2)*d) + (6*e^2*((-I)*b*(-1 + E^((2*I)*c)) + a*(1 + E^((2*I )*c)))*PolyLog[2, (-a - I*b)/((a - I*b)*E^((2*I)*(c + d*x)))])/((a + I*b)* (I*a + b)*d^2) + (6*e*(b - b*E^((2*I)*c) - I*a*(1 + E^((2*I)*c)))*f*(2*d*x *PolyLog[2, (-a - I*b)/((a - I*b)*E^((2*I)*(c + d*x)))] - I*PolyLog[3, (-a - I*b)/((a - I*b)*E^((2*I)*(c + d*x)))]))/((a^2 + b^2)*d^3) + (3*(b - b*E ^((2*I)*c) - I*a*(1 + E^((2*I)*c)))*f^2*(2*d^2*x^2*PolyLog[2, (-a - I*b)/( (a - I*b)*E^((2*I)*(c + d*x)))] - (2*I)*d*x*PolyLog[3, (-a - I*b)/((a - I* b)*E^((2*I)*(c + d*x)))] - PolyLog[4, (-a - I*b)/((a - I*b)*E^((2*I)*(c + d*x)))]))/((a^2 + b^2)*d^4)))/(12*((-I)*b*(-1 + E^((2*I)*c)) + a*(1 + E^(( 2*I)*c)))) + ((I/12)*e*f*(2*d^2*x^2*(2*d*x - (3*I)*(1 + E^((2*I)*c))*Log[1 + E^((-2*I)*(c + d*x))]) + 6*d*(1 + E^((2*I)*c))*x*PolyLog[2, -E^((-2*I)* (c + d*x))] - (3*I)*(1 + E^((2*I)*c))*PolyLog[3, -E^((-2*I)*(c + d*x))])*S ec[c])/(d^2*E^(I*c)) + ((I/24)*E^(I*c)*f^2*((2*d^4*x^4)/E^((2*I)*c) - (...
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 (e+f x)^2 \log (a+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3031 |
\(\displaystyle \frac {(e+f x)^3 \log (a+b \tan (c+d x))}{3 f}-\frac {\int \frac {b d (e+f x)^3 \sec ^2(c+d x)}{a+b \tan (c+d x)}dx}{3 f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(e+f x)^3 \log (a+b \tan (c+d x))}{3 f}-\frac {b d \int \frac {(e+f x)^3 \sec ^2(c+d x)}{a+b \tan (c+d x)}dx}{3 f}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {(e+f x)^3 \log (a+b \tan (c+d x))}{3 f}-\frac {b d \int \left (\frac {\sec ^2(c+d x) e^3}{a+b \tan (c+d x)}+\frac {3 f x \sec ^2(c+d x) e^2}{a+b \tan (c+d x)}+\frac {3 f^2 x^2 \sec ^2(c+d x) e}{a+b \tan (c+d x)}+\frac {f^3 x^3 \sec ^2(c+d x)}{a+b \tan (c+d x)}\right )dx}{3 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(e+f x)^3 \log (a+b \tan (c+d x))}{3 f}-\frac {b d \left (3 e^2 f \int \frac {x \sec ^2(c+d x)}{a+b \tan (c+d x)}dx+3 e f^2 \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan (c+d x)}dx+f^3 \int \frac {x^3 \sec ^2(c+d x)}{a+b \tan (c+d x)}dx+\frac {e^3 \log (a+b \tan (c+d x))}{b d}\right )}{3 f}\) |
Input:
Int[(e + f*x)^2*Log[a + b*Tan[c + d*x]],x]
Output:
$Aborted
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1) *(Log[u]/(b*(m + 1))), x] - Simp[1/(b*(m + 1)) Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && InverseFunc tionFreeQ[u, x] && NeQ[m, -1]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 9.73 (sec) , antiderivative size = 5834, normalized size of antiderivative = 18.29
Input:
int((f*x+e)^2*ln(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
result too large to display
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1489 vs. \(2 (259) = 518\).
Time = 0.16 (sec) , antiderivative size = 1489, normalized size of antiderivative = 4.67 \[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*log(a+b*tan(d*x+c)),x, algorithm="fricas")
Output:
1/24*(3*I*f^2*polylog(4, ((a^2 + 2*I*a*b - b^2)*tan(d*x + c)^2 - a^2 - 2*I *a*b + b^2 - 2*(-I*a^2 + 2*a*b + I*b^2)*tan(d*x + c))/((a^2 + b^2)*tan(d*x + c)^2 + a^2 + b^2)) - 3*I*f^2*polylog(4, ((a^2 - 2*I*a*b - b^2)*tan(d*x + c)^2 - a^2 + 2*I*a*b + b^2 - 2*(I*a^2 + 2*a*b - I*b^2)*tan(d*x + c))/((a ^2 + b^2)*tan(d*x + c)^2 + a^2 + b^2)) - 3*I*f^2*polylog(4, (tan(d*x + c)^ 2 + 2*I*tan(d*x + c) - 1)/(tan(d*x + c)^2 + 1)) + 3*I*f^2*polylog(4, (tan( d*x + c)^2 - 2*I*tan(d*x + c) - 1)/(tan(d*x + c)^2 + 1)) - 6*(I*d^2*f^2*x^ 2 + 2*I*d^2*e*f*x + I*d^2*e^2)*dilog(2*((I*a*b - b^2)*tan(d*x + c)^2 - a^2 - I*a*b + (I*a^2 - 2*a*b - I*b^2)*tan(d*x + c))/((a^2 + b^2)*tan(d*x + c) ^2 + a^2 + b^2) + 1) - 6*(-I*d^2*f^2*x^2 - 2*I*d^2*e*f*x - I*d^2*e^2)*dilo g(2*((-I*a*b - b^2)*tan(d*x + c)^2 - a^2 + I*a*b + (-I*a^2 - 2*a*b + I*b^2 )*tan(d*x + c))/((a^2 + b^2)*tan(d*x + c)^2 + a^2 + b^2) + 1) - 6*(-I*d^2* f^2*x^2 - 2*I*d^2*e*f*x - I*d^2*e^2)*dilog(2*(I*tan(d*x + c) - 1)/(tan(d*x + c)^2 + 1) + 1) - 6*(I*d^2*f^2*x^2 + 2*I*d^2*e*f*x + I*d^2*e^2)*dilog(2* (-I*tan(d*x + c) - 1)/(tan(d*x + c)^2 + 1) + 1) + 8*(d^3*f^2*x^3 + 3*d^3*e *f*x^2 + 3*d^3*e^2*x)*log(b*tan(d*x + c) + a) - 4*(d^3*f^2*x^3 + 3*d^3*e*f *x^2 + 3*d^3*e^2*x + 3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*log(-2*((I*a*b - b^2)*tan(d*x + c)^2 - a^2 - I*a*b + (I*a^2 - 2*a*b - I*b^2)*tan(d*x + c)) /((a^2 + b^2)*tan(d*x + c)^2 + a^2 + b^2)) - 4*(d^3*f^2*x^3 + 3*d^3*e*f*x^ 2 + 3*d^3*e^2*x + 3*c*d^2*e^2 - 3*c^2*d*e*f + c^3*f^2)*log(-2*((-I*a*b ...
\[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\int \left (e + f x\right )^{2} \log {\left (a + b \tan {\left (c + d x \right )} \right )}\, dx \] Input:
integrate((f*x+e)**2*ln(a+b*tan(d*x+c)),x)
Output:
Integral((e + f*x)**2*log(a + b*tan(c + d*x)), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 870 vs. \(2 (259) = 518\).
Time = 0.22 (sec) , antiderivative size = 870, normalized size of antiderivative = 2.73 \[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*log(a+b*tan(d*x+c)),x, algorithm="maxima")
Output:
1/18*(6*(3*(d*x + c)*e^2 + 3*((d*x + c)^2 - 2*(d*x + c)*c)*e*f/d + ((d*x + c)^3 - 3*(d*x + c)^2*c + 3*(d*x + c)*c^2)*f^2/d^2)*log(b*tan(d*x + c) + a ) - (6*I*f^2*polylog(4, (I*a + b)*e^(2*I*d*x + 2*I*c)/(-I*a + b)) - 6*I*f^ 2*polylog(4, -e^(2*I*d*x + 2*I*c)) - 2*(4*I*(d*x + c)^3*f^2 + 9*(I*d*e*f - I*c*f^2)*(d*x + c)^2 + 9*(I*d^2*e^2 - 2*I*c*d*e*f + I*c^2*f^2)*(d*x + c)) *arctan2((2*a*b*cos(2*d*x + 2*c) - (a^2 - b^2)*sin(2*d*x + 2*c))/(a^2 + b^ 2), (2*a*b*sin(2*d*x + 2*c) + a^2 + b^2 + (a^2 - b^2)*cos(2*d*x + 2*c))/(a ^2 + b^2)) - 2*(4*I*(d*x + c)^3*f^2 + 9*(I*d*e*f - I*c*f^2)*(d*x + c)^2 + 9*(I*d^2*e^2 - 2*I*c*d*e*f + I*c^2*f^2)*(d*x + c))*arctan2(sin(2*d*x + 2*c ), cos(2*d*x + 2*c) + 1) - 3*(3*I*d^2*e^2 - 6*I*c*d*e*f + 4*I*(d*x + c)^2* f^2 + 3*I*c^2*f^2 + 6*(I*d*e*f - I*c*f^2)*(d*x + c))*dilog((I*a + b)*e^(2* I*d*x + 2*I*c)/(-I*a + b)) - 3*(-3*I*d^2*e^2 + 6*I*c*d*e*f - 4*I*(d*x + c) ^2*f^2 - 3*I*c^2*f^2 + 6*(-I*d*e*f + I*c*f^2)*(d*x + c))*dilog(-e^(2*I*d*x + 2*I*c)) - (4*(d*x + c)^3*f^2 + 9*(d*e*f - c*f^2)*(d*x + c)^2 + 9*(d^2*e ^2 - 2*c*d*e*f + c^2*f^2)*(d*x + c))*log(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1) + (4*(d*x + c)^3*f^2 + 9*(d*e*f - c*f^2)* (d*x + c)^2 + 9*(d^2*e^2 - 2*c*d*e*f + c^2*f^2)*(d*x + c))*log(((a^2 + b^2 )*cos(2*d*x + 2*c)^2 + 4*a*b*sin(2*d*x + 2*c) + (a^2 + b^2)*sin(2*d*x + 2* c)^2 + a^2 + b^2 + 2*(a^2 - b^2)*cos(2*d*x + 2*c))/(a^2 + b^2)) + 3*(3*d*e *f + 4*(d*x + c)*f^2 - 3*c*f^2)*polylog(3, (I*a + b)*e^(2*I*d*x + 2*I*c...
\[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\int { {\left (f x + e\right )}^{2} \log \left (b \tan \left (d x + c\right ) + a\right ) \,d x } \] Input:
integrate((f*x+e)^2*log(a+b*tan(d*x+c)),x, algorithm="giac")
Output:
integrate((f*x + e)^2*log(b*tan(d*x + c) + a), x)
Timed out. \[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\int \ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (e+f\,x\right )}^2 \,d x \] Input:
int(log(a + b*tan(c + d*x))*(e + f*x)^2,x)
Output:
int(log(a + b*tan(c + d*x))*(e + f*x)^2, x)
\[ \int (e+f x)^2 \log (a+b \tan (c+d x)) \, dx=\left (\int \mathrm {log}\left (\tan \left (d x +c \right ) b +a \right )d x \right ) e^{2}+\left (\int \mathrm {log}\left (\tan \left (d x +c \right ) b +a \right ) x^{2}d x \right ) f^{2}+2 \left (\int \mathrm {log}\left (\tan \left (d x +c \right ) b +a \right ) x d x \right ) e f \] Input:
int((f*x+e)^2*log(a+b*tan(d*x+c)),x)
Output:
int(log(tan(c + d*x)*b + a),x)*e**2 + int(log(tan(c + d*x)*b + a)*x**2,x)* f**2 + 2*int(log(tan(c + d*x)*b + a)*x,x)*e*f