\(\int x (a+b \tan (c+d \sqrt {x})) \, dx\) [27]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [B] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 135 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \] Output:

1/2*a*x^2+1/2*I*b*x^2-2*b*x^(3/2)*ln(1+exp(2*I*(c+d*x^(1/2))))/d+3*I*b*x*p 
olylog(2,-exp(2*I*(c+d*x^(1/2))))/d^2-3*b*x^(1/2)*polylog(3,-exp(2*I*(c+d* 
x^(1/2))))/d^3-3/2*I*b*polylog(4,-exp(2*I*(c+d*x^(1/2))))/d^4
 

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \] Input:

Integrate[x*(a + b*Tan[c + d*Sqrt[x]]),x]
 

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2010, 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 x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx\)

\(\Big \downarrow \) 2010

\(\displaystyle \int \left (a x+b x \tan \left (c+d \sqrt {x}\right )\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a x^2}{2}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {1}{2} i b x^2\)

Input:

Int[x*(a + b*Tan[c + d*Sqrt[x]]),x]
 

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2010
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] 
, x] /; FreeQ[{c, m}, x] && SumQ[u] &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) 
+ (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
 
Maple [F]

\[\int x \left (a +b \tan \left (c +d \sqrt {x}\right )\right )d x\]

Input:

int(x*(a+b*tan(c+d*x^(1/2))),x)
 

Output:

int(x*(a+b*tan(c+d*x^(1/2))),x)
 

Fricas [F]

\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )} x \,d x } \] Input:

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="fricas")
 

Output:

integral(b*x*tan(d*sqrt(x) + c) + a*x, x)
 

Sympy [F]

\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int x \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )\, dx \] Input:

integrate(x*(a+b*tan(c+d*x**(1/2))),x)
 

Output:

Integral(x*(a + b*tan(c + d*sqrt(x))), x)
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 359 vs. \(2 (102) = 204\).

Time = 0.17 (sec) , antiderivative size = 359, normalized size of antiderivative = 2.66 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {3 \, {\left (d \sqrt {x} + c\right )}^{4} a + 3 i \, {\left (d \sqrt {x} + c\right )}^{4} b - 12 \, {\left (d \sqrt {x} + c\right )}^{3} a c - 12 i \, {\left (d \sqrt {x} + c\right )}^{3} b c + 18 \, {\left (d \sqrt {x} + c\right )}^{2} a c^{2} + 18 i \, {\left (d \sqrt {x} + c\right )}^{2} b c^{2} - 12 \, {\left (d \sqrt {x} + c\right )} a c^{3} - 12 \, b c^{3} \log \left (\sec \left (d \sqrt {x} + c\right )\right ) + 4 \, {\left (-4 i \, {\left (d \sqrt {x} + c\right )}^{3} b + 9 i \, {\left (d \sqrt {x} + c\right )}^{2} b c - 9 i \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \arctan \left (\sin \left (2 \, d \sqrt {x} + 2 \, c\right ), \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) + 6 \, {\left (4 i \, {\left (d \sqrt {x} + c\right )}^{2} b - 6 i \, {\left (d \sqrt {x} + c\right )} b c + 3 i \, b c^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}\right ) - 2 \, {\left (4 \, {\left (d \sqrt {x} + c\right )}^{3} b - 9 \, {\left (d \sqrt {x} + c\right )}^{2} b c + 9 \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \log \left (\cos \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + \sin \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) - 12 i \, b {\rm Li}_{4}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}) - 6 \, {\left (4 \, {\left (d \sqrt {x} + c\right )} b - 3 \, b c\right )} {\rm Li}_{3}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )})}{6 \, d^{4}} \] Input:

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="maxima")
 

Output:

1/6*(3*(d*sqrt(x) + c)^4*a + 3*I*(d*sqrt(x) + c)^4*b - 12*(d*sqrt(x) + c)^ 
3*a*c - 12*I*(d*sqrt(x) + c)^3*b*c + 18*(d*sqrt(x) + c)^2*a*c^2 + 18*I*(d* 
sqrt(x) + c)^2*b*c^2 - 12*(d*sqrt(x) + c)*a*c^3 - 12*b*c^3*log(sec(d*sqrt( 
x) + c)) + 4*(-4*I*(d*sqrt(x) + c)^3*b + 9*I*(d*sqrt(x) + c)^2*b*c - 9*I*( 
d*sqrt(x) + c)*b*c^2)*arctan2(sin(2*d*sqrt(x) + 2*c), cos(2*d*sqrt(x) + 2* 
c) + 1) + 6*(4*I*(d*sqrt(x) + c)^2*b - 6*I*(d*sqrt(x) + c)*b*c + 3*I*b*c^2 
)*dilog(-e^(2*I*d*sqrt(x) + 2*I*c)) - 2*(4*(d*sqrt(x) + c)^3*b - 9*(d*sqrt 
(x) + c)^2*b*c + 9*(d*sqrt(x) + c)*b*c^2)*log(cos(2*d*sqrt(x) + 2*c)^2 + s 
in(2*d*sqrt(x) + 2*c)^2 + 2*cos(2*d*sqrt(x) + 2*c) + 1) - 12*I*b*polylog(4 
, -e^(2*I*d*sqrt(x) + 2*I*c)) - 6*(4*(d*sqrt(x) + c)*b - 3*b*c)*polylog(3, 
 -e^(2*I*d*sqrt(x) + 2*I*c)))/d^4
 

Giac [F]

\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )} x \,d x } \] Input:

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="giac")
 

Output:

integrate((b*tan(d*sqrt(x) + c) + a)*x, x)
 

Mupad [F(-1)]

Timed out. \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int x\,\left (a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )\right ) \,d x \] Input:

int(x*(a + b*tan(c + d*x^(1/2))),x)
 

Output:

int(x*(a + b*tan(c + d*x^(1/2))), x)
 

Reduce [F]

\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\left (\int \tan \left (\sqrt {x}\, d +c \right ) x d x \right ) b +\frac {a \,x^{2}}{2} \] Input:

int(x*(a+b*tan(c+d*x^(1/2))),x)
 

Output:

(2*int(tan(sqrt(x)*d + c)*x,x)*b + a*x**2)/2