3.516 \(\int \frac{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=138 \[ \frac{2 b x \left (a^2 \tan (d+e x)+a b\right )}{\left (a^2+b^2\right ) \sqrt{a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}+\frac{\left (a^2-b^2\right ) (a \tan (d+e x)+b) \log (a \sin (d+e x)+b \cos (d+e x))}{e \left (a^2+b^2\right ) \sqrt{a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.188173, antiderivative size = 138, normalized size of antiderivative = 1., 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, 3531, 3530} \[ \frac{2 b x \left (a^2 \tan (d+e x)+a b\right )}{\left (a^2+b^2\right ) \sqrt{a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}+\frac{\left (a^2-b^2\right ) (a \tan (d+e x)+b) \log (a \sin (d+e x)+b \cos (d+e x))}{e \left (a^2+b^2\right ) \sqrt{a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}} \]

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[b*Cos[d + e*x] + a*Sin[d + e*x]]*(b + a*Tan[d + e*x]))/((a^2 + b^2)*e*Sqrt[b^2 + 2*a*b*Tan[d
+ e*x] + a^2*Tan[d + e*x]^2]) + (2*b*x*(a*b + a^2*Tan[d + e*x]))/((a^2 + b^2)*Sqrt[b^2 + 2*a*b*Tan[d + e*x] +
a^2*Tan[d + e*x]^2])

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]

Rule 3531

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

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps

\begin{align*} \int \frac{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{\left (2 a b+2 a^2 \tan (d+e x)\right ) \int \frac{a+b \tan (d+e x)}{2 a b+2 a^2 \tan (d+e x)} \, dx}{\sqrt{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}\\ &=\frac{2 b x \left (a b+a^2 \tan (d+e x)\right )}{\left (a^2+b^2\right ) \sqrt{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}+\frac{\left (\left (a^2-b^2\right ) \left (2 a b+2 a^2 \tan (d+e x)\right )\right ) \int \frac{2 a^2-2 a b \tan (d+e x)}{2 a b+2 a^2 \tan (d+e x)} \, dx}{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)}}\\ &=\frac{\left (a^2-b^2\right ) \log (b \cos (d+e x)+a \sin (d+e x)) (b+a \tan (d+e x))}{\left (a^2+b^2\right ) e \sqrt{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}+\frac{2 b x \left (a b+a^2 \tan (d+e x)\right )}{\left (a^2+b^2\right ) \sqrt{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)}}\\ \end{align*}

Mathematica [A]  time = 0.703782, size = 88, normalized size = 0.64 \[ \frac{(a \tan (d+e x)+b) \left (4 a b \tan ^{-1}(\tan (d+e x))-\left (a^2-b^2\right ) \left (\log \left (\sec ^2(d+e x)\right )-2 \log (a \tan (d+e x)+b)\right )\right )}{2 e \left (a^2+b^2\right ) \sqrt{(a \tan (d+e x)+b)^2}} \]

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]

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

________________________________________________________________________________________

Maple [A]  time = 0.067, size = 114, normalized size = 0.8 \begin{align*}{\frac{ \left ( b+a\tan \left ( ex+d \right ) \right ) \left ( 2\,\ln \left ( b+a\tan \left ( ex+d \right ) \right ){a}^{2}-2\,\ln \left ( b+a\tan \left ( ex+d \right ) \right ){b}^{2}-\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){a}^{2}+\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){b}^{2}+4\,ab\arctan \left ( \tan \left ( ex+d \right ) \right ) \right ) }{2\,e \left ({a}^{2}+{b}^{2} \right ) }{\frac{1}{\sqrt{ \left ( b+a\tan \left ( ex+d \right ) \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2/e*(b+a*tan(e*x+d))*(2*ln(b+a*tan(e*x+d))*a^2-2*ln(b+a*tan(e*x+d))*b^2-ln(1+tan(e*x+d)^2)*a^2+ln(1+tan(e*x+
d)^2)*b^2+4*a*b*arctan(tan(e*x+d)))/((b+a*tan(e*x+d))^2)^(1/2)/(a^2+b^2)

________________________________________________________________________________________

Maxima [A]  time = 1.51937, size = 185, normalized size = 1.34 \begin{align*} \frac{a{\left (\frac{2 \,{\left (e x + d\right )} b}{a^{2} + b^{2}} + \frac{2 \, a \log \left (a \tan \left (e x + d\right ) + b\right )}{a^{2} + b^{2}} - \frac{a \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{a^{2} + b^{2}}\right )} +{\left (\frac{2 \,{\left (e x + d\right )} a}{a^{2} + b^{2}} - \frac{2 \, b \log \left (a \tan \left (e x + d\right ) + b\right )}{a^{2} + b^{2}} + \frac{b \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{a^{2} + b^{2}}\right )} b}{2 \, e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.65239, size = 163, normalized size = 1.18 \begin{align*} \frac{4 \, a b e x +{\left (a^{2} - b^{2}\right )} \log \left (\frac{a^{2} \tan \left (e x + d\right )^{2} + 2 \, a b \tan \left (e x + d\right ) + b^{2}}{\tan \left (e x + d\right )^{2} + 1}\right )}{2 \,{\left (a^{2} + b^{2}\right )} e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \tan{\left (d + e x \right )}}{\sqrt{\left (a \tan{\left (d + e x \right )} + b\right )^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 2.01922, size = 748, normalized size = 5.42 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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