Integrand size = 16, antiderivative size = 84 \[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\frac {a (c+d x)^2}{2 d}+\frac {i b (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2} \] Output:
1/2*a*(d*x+c)^2/d+1/2*I*b*(d*x+c)^2/d-b*(d*x+c)*ln(1+exp(2*I*(f*x+e)))/f+1 /2*I*b*d*polylog(2,-exp(2*I*(f*x+e)))/f^2
Time = 0.01 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.04 \[ \int (c+d x) (a+b \tan (e+f x)) \, dx=a c x+\frac {1}{2} a d x^2+\frac {1}{2} i b d x^2-\frac {b d x \log \left (1+e^{2 i (e+f x)}\right )}{f}-\frac {b c \log (\cos (e+f x))}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2} \] Input:
Integrate[(c + d*x)*(a + b*Tan[e + f*x]),x]
Output:
a*c*x + (a*d*x^2)/2 + (I/2)*b*d*x^2 - (b*d*x*Log[1 + E^((2*I)*(e + f*x))]) /f - (b*c*Log[Cos[e + f*x]])/f + ((I/2)*b*d*PolyLog[2, -E^((2*I)*(e + f*x) )])/f^2
Time = 0.32 (sec) , antiderivative size = 84, 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.188, 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) (a+b \tan (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) (a+b \tan (e+f x))dx\) |
\(\Big \downarrow \) 4205 |
\(\displaystyle \int (a (c+d x)+b (c+d x) \tan (e+f x))dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {i b (c+d x)^2}{2 d}+\frac {i b d \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2}\) |
Input:
Int[(c + d*x)*(a + b*Tan[e + f*x]),x]
Output:
(a*(c + d*x)^2)/(2*d) + ((I/2)*b*(c + d*x)^2)/d - (b*(c + d*x)*Log[1 + E^( (2*I)*(e + f*x))])/f + ((I/2)*b*d*PolyLog[2, -E^((2*I)*(e + f*x))])/f^2
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]
Time = 0.45 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.70
method | result | size |
risch | \(\frac {i b d \,x^{2}}{2}+\frac {a d \,x^{2}}{2}-i b c x +a c x +\frac {2 b c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}-\frac {b c \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f}+\frac {2 i b d e x}{f}+\frac {i b d \,e^{2}}{f^{2}}-\frac {b d \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right ) x}{f}+\frac {i b d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (f x +e \right )}\right )}{2 f^{2}}-\frac {2 b e d \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}\) | \(143\) |
Input:
int((d*x+c)*(a+b*tan(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/2*I*b*d*x^2+1/2*a*d*x^2-I*b*c*x+a*c*x+2/f*b*c*ln(exp(I*(f*x+e)))-1/f*b*c *ln(1+exp(2*I*(f*x+e)))+2*I/f*b*d*e*x+I/f^2*b*d*e^2-1/f*b*d*ln(1+exp(2*I*( f*x+e)))*x+1/2*I*b*d*polylog(2,-exp(2*I*(f*x+e)))/f^2-2/f^2*b*e*d*ln(exp(I *(f*x+e)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (69) = 138\).
Time = 0.09 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.90 \[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\frac {2 \, a d f^{2} x^{2} + 4 \, a c f^{2} x - i \, b 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 \, b 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 d f x + b 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 (b d f x + b 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 )}{4 \, f^{2}} \] Input:
integrate((d*x+c)*(a+b*tan(f*x+e)),x, algorithm="fricas")
Output:
1/4*(2*a*d*f^2*x^2 + 4*a*c*f^2*x - I*b*d*dilog(2*(I*tan(f*x + e) - 1)/(tan (f*x + e)^2 + 1) + 1) + I*b*d*dilog(2*(-I*tan(f*x + e) - 1)/(tan(f*x + e)^ 2 + 1) + 1) - 2*(b*d*f*x + b*c*f)*log(-2*(I*tan(f*x + e) - 1)/(tan(f*x + e )^2 + 1)) - 2*(b*d*f*x + b*c*f)*log(-2*(-I*tan(f*x + e) - 1)/(tan(f*x + e) ^2 + 1)))/f^2
\[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\int \left (a + b \tan {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \] Input:
integrate((d*x+c)*(a+b*tan(f*x+e)),x)
Output:
Integral((a + b*tan(e + f*x))*(c + d*x), x)
Time = 0.15 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.55 \[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\frac {{\left (a + i \, b\right )} d f^{2} x^{2} + 2 \, {\left (a + i \, b\right )} c f^{2} x + i \, b d {\rm Li}_2\left (-e^{\left (2 i \, f x + 2 i \, e\right )}\right ) + 2 \, {\left (-i \, b d f x - i \, b c f\right )} \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right ) - {\left (b d f x + b c f\right )} \log \left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}{2 \, f^{2}} \] Input:
integrate((d*x+c)*(a+b*tan(f*x+e)),x, algorithm="maxima")
Output:
1/2*((a + I*b)*d*f^2*x^2 + 2*(a + I*b)*c*f^2*x + I*b*d*dilog(-e^(2*I*f*x + 2*I*e)) + 2*(-I*b*d*f*x - I*b*c*f)*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1) - (b*d*f*x + b*c*f)*log(cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1))/f^2
\[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (b \tan \left (f x + e\right ) + a\right )} \,d x } \] Input:
integrate((d*x+c)*(a+b*tan(f*x+e)),x, algorithm="giac")
Output:
integrate((d*x + c)*(b*tan(f*x + e) + a), x)
Time = 8.50 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.92 \[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\frac {a\,x\,\left (2\,c+d\,x\right )}{2}-\frac {b\,d\,\left (\pi \,\ln \left (\cos \left (f\,x\right )\right )-\pi \,\ln \left ({\mathrm {e}}^{f\,x\,2{}\mathrm {i}}+1\right )+\mathrm {polylog}\left (2,-{\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}-\pi \,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )+2\,e\,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )-\ln \left (\cos \left (e+f\,x\right )\right )\,\left (2\,e-\pi \right )+f^2\,x^2\,1{}\mathrm {i}+2\,f\,x\,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )+e\,f\,x\,2{}\mathrm {i}\right )}{2\,f^2}+\frac {b\,c\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f} \] Input:
int((a + b*tan(e + f*x))*(c + d*x),x)
Output:
(a*x*(2*c + d*x))/2 - (b*d*(polylog(2, -exp(-e*2i)*exp(-f*x*2i))*1i - pi*l og(exp(f*x*2i) + 1) - log(cos(e + f*x))*(2*e - pi) - pi*log(exp(-e*2i)*exp (-f*x*2i) + 1) + 2*e*log(exp(-e*2i)*exp(-f*x*2i) + 1) + pi*log(cos(f*x)) + f^2*x^2*1i + 2*f*x*log(exp(-e*2i)*exp(-f*x*2i) + 1) + e*f*x*2i))/(2*f^2) + (b*c*log(tan(e + f*x)^2 + 1))/(2*f)
\[ \int (c+d x) (a+b \tan (e+f x)) \, dx=\frac {2 \left (\int \tan \left (f x +e \right ) x d x \right ) b d f +\mathrm {log}\left (\tan \left (f x +e \right )^{2}+1\right ) b c +2 a c f x +a d f \,x^{2}}{2 f} \] Input:
int((d*x+c)*(a+b*tan(f*x+e)),x)
Output:
(2*int(tan(e + f*x)*x,x)*b*d*f + log(tan(e + f*x)**2 + 1)*b*c + 2*a*c*f*x + a*d*f*x**2)/(2*f)