3.515 \(\int (a+b \tan (d+e x)) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx\)

Optimal. Leaf size=122 \[ \frac {a^2 b \tan (d+e x) \sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}{e \left (a^2 \tan (d+e x)+a b\right )}-\frac {\left (a^2+b^2\right ) \log (\cos (d+e x)) \sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}{e (a \tan (d+e x)+b)} \]

[Out]

-(a^2+b^2)*ln(cos(e*x+d))*(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(1/2)/e/(b+a*tan(e*x+d))+a^2*b*(b^2+2*a*b*ta
n(e*x+d)+a^2*tan(e*x+d)^2)^(1/2)*tan(e*x+d)/e/(a*b+a^2*tan(e*x+d))

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3710, 3525, 3475} \[ \frac {a^2 b \tan (d+e x) \sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}{e \left (a^2 \tan (d+e x)+a b\right )}-\frac {\left (a^2+b^2\right ) \log (\cos (d+e x)) \sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}{e (a \tan (d+e x)+b)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(((a^2 + b^2)*Log[Cos[d + e*x]]*Sqrt[b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2])/(e*(b + a*Tan[d + e*x]))
) + (a^2*b*Tan[d + e*x]*Sqrt[b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2])/(e*(a*b + a^2*Tan[d + e*x]))

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3710

Int[((A_) + (B_.)*tan[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*tan[(d_.) + (e_.)*(x_)] + (c_.)*tan[(d_.) + (e_.)*(x_
)]^2)^(n_), x_Symbol] :> Dist[(a + b*Tan[d + e*x] + c*Tan[d + e*x]^2)^n/(b + 2*c*Tan[d + e*x])^(2*n), Int[(A +
 B*Tan[d + e*x])*(b + 2*c*Tan[d + e*x])^(2*n), x], x] /; FreeQ[{a, b, c, d, e, A, B}, x] && EqQ[b^2 - 4*a*c, 0
] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int (a+b \tan (d+e x)) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx &=\frac {\sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \int \left (2 a b+2 a^2 \tan (d+e x)\right ) (a+b \tan (d+e x)) \, dx}{2 a b+2 a^2 \tan (d+e x)}\\ &=\frac {a^2 b \tan (d+e x) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}{e \left (a b+a^2 \tan (d+e x)\right )}+\frac {\left (2 a \left (a^2+b^2\right ) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}\right ) \int \tan (d+e x) \, dx}{2 a b+2 a^2 \tan (d+e x)}\\ &=-\frac {\left (a^2+b^2\right ) \log (\cos (d+e x)) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}{e (b+a \tan (d+e x))}+\frac {a^2 b \tan (d+e x) \sqrt {b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}{e \left (a b+a^2 \tan (d+e x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 58, normalized size = 0.48 \[ \frac {\sqrt {(a \tan (d+e x)+b)^2} \left (a b \tan (d+e x)-\left (a^2+b^2\right ) \log (\cos (d+e x))\right )}{e (a \tan (d+e x)+b)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[(b + a*Tan[d + e*x])^2]*(-((a^2 + b^2)*Log[Cos[d + e*x]]) + a*b*Tan[d + e*x]))/(e*(b + a*Tan[d + e*x]))

________________________________________________________________________________________

fricas [A]  time = 2.63, size = 38, normalized size = 0.31 \[ \frac {2 \, a b \tan \left (e x + d\right ) - {\left (a^{2} + b^{2}\right )} \log \left (\frac {1}{\tan \left (e x + d\right )^{2} + 1}\right )}{2 \, e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(2*a*b*tan(e*x + d) - (a^2 + b^2)*log(1/(tan(e*x + d)^2 + 1)))/e

________________________________________________________________________________________

giac [B]  time = 0.46, size = 395, normalized size = 3.24 \[ -\frac {a^{2} \log \left (\frac {4 \, {\left (\tan \left (x e\right )^{4} \tan \relax (d)^{2} - 2 \, \tan \left (x e\right )^{3} \tan \relax (d) + \tan \left (x e\right )^{2} \tan \relax (d)^{2} + \tan \left (x e\right )^{2} - 2 \, \tan \left (x e\right ) \tan \relax (d) + 1\right )}}{\tan \relax (d)^{2} + 1}\right ) \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e\right ) \tan \relax (d) + b^{2} \log \left (\frac {4 \, {\left (\tan \left (x e\right )^{4} \tan \relax (d)^{2} - 2 \, \tan \left (x e\right )^{3} \tan \relax (d) + \tan \left (x e\right )^{2} \tan \relax (d)^{2} + \tan \left (x e\right )^{2} - 2 \, \tan \left (x e\right ) \tan \relax (d) + 1\right )}}{\tan \relax (d)^{2} + 1}\right ) \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e\right ) \tan \relax (d) - a^{2} \log \left (\frac {4 \, {\left (\tan \left (x e\right )^{4} \tan \relax (d)^{2} - 2 \, \tan \left (x e\right )^{3} \tan \relax (d) + \tan \left (x e\right )^{2} \tan \relax (d)^{2} + \tan \left (x e\right )^{2} - 2 \, \tan \left (x e\right ) \tan \relax (d) + 1\right )}}{\tan \relax (d)^{2} + 1}\right ) \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) - b^{2} \log \left (\frac {4 \, {\left (\tan \left (x e\right )^{4} \tan \relax (d)^{2} - 2 \, \tan \left (x e\right )^{3} \tan \relax (d) + \tan \left (x e\right )^{2} \tan \relax (d)^{2} + \tan \left (x e\right )^{2} - 2 \, \tan \left (x e\right ) \tan \relax (d) + 1\right )}}{\tan \relax (d)^{2} + 1}\right ) \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) + 2 \, a b \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \left (x e\right ) + 2 \, a b \mathrm {sgn}\left (a \tan \left (x e + d\right ) + b\right ) \tan \relax (d)}{2 \, {\left (e \tan \left (x e\right ) \tan \relax (d) - e\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(a^2*log(4*(tan(x*e)^4*tan(d)^2 - 2*tan(x*e)^3*tan(d) + tan(x*e)^2*tan(d)^2 + tan(x*e)^2 - 2*tan(x*e)*tan
(d) + 1)/(tan(d)^2 + 1))*sgn(a*tan(x*e + d) + b)*tan(x*e)*tan(d) + b^2*log(4*(tan(x*e)^4*tan(d)^2 - 2*tan(x*e)
^3*tan(d) + tan(x*e)^2*tan(d)^2 + tan(x*e)^2 - 2*tan(x*e)*tan(d) + 1)/(tan(d)^2 + 1))*sgn(a*tan(x*e + d) + b)*
tan(x*e)*tan(d) - a^2*log(4*(tan(x*e)^4*tan(d)^2 - 2*tan(x*e)^3*tan(d) + tan(x*e)^2*tan(d)^2 + tan(x*e)^2 - 2*
tan(x*e)*tan(d) + 1)/(tan(d)^2 + 1))*sgn(a*tan(x*e + d) + b) - b^2*log(4*(tan(x*e)^4*tan(d)^2 - 2*tan(x*e)^3*t
an(d) + tan(x*e)^2*tan(d)^2 + tan(x*e)^2 - 2*tan(x*e)*tan(d) + 1)/(tan(d)^2 + 1))*sgn(a*tan(x*e + d) + b) + 2*
a*b*sgn(a*tan(x*e + d) + b)*tan(x*e) + 2*a*b*sgn(a*tan(x*e + d) + b)*tan(d))/(e*tan(x*e)*tan(d) - e)

________________________________________________________________________________________

maple [C]  time = 0.32, size = 75, normalized size = 0.61 \[ \frac {\mathrm {csgn}\left (b +a \tan \left (e x +d \right )\right ) \left (\ln \left (a^{2} \left (\tan ^{2}\left (e x +d \right )\right )+a^{2}\right ) a^{2}+\ln \left (a^{2} \left (\tan ^{2}\left (e x +d \right )\right )+a^{2}\right ) b^{2}+2 a b \tan \left (e x +d \right )+2 b^{2}\right )}{2 e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2/e*csgn(b+a*tan(e*x+d))*(ln(a^2*tan(e*x+d)^2+a^2)*a^2+ln(a^2*tan(e*x+d)^2+a^2)*b^2+2*a*b*tan(e*x+d)+2*b^2)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 65, normalized size = 0.53 \[ \frac {{\left (2 \, {\left (e x + d\right )} b + a \log \left (\tan \left (e x + d\right )^{2} + 1\right )\right )} a - {\left (2 \, {\left (e x + d\right )} a - b \log \left (\tan \left (e x + d\right )^{2} + 1\right ) - 2 \, a \tan \left (e x + d\right )\right )} b}{2 \, e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((2*(e*x + d)*b + a*log(tan(e*x + d)^2 + 1))*a - (2*(e*x + d)*a - b*log(tan(e*x + d)^2 + 1) - 2*a*tan(e*x
+ d))*b)/e

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (a+b\,\mathrm {tan}\left (d+e\,x\right )\right )\,\sqrt {a^2\,{\mathrm {tan}\left (d+e\,x\right )}^2+2\,a\,b\,\mathrm {tan}\left (d+e\,x\right )+b^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (d + e x \right )}\right ) \sqrt {\left (a \tan {\left (d + e x \right )} + b\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________