Integrand size = 41, antiderivative size = 138 \[ \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 (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)}} \] Output:
(a^2-b^2)*ln(b*cos(e*x+d)+a*sin(e*x+d))*(b+a*tan(e*x+d))/(a^2+b^2)/e/(b^2+ 2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(1/2)+2*b*x*(a*b+a^2*tan(e*x+d))/(a^2+b ^2)/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^(1/2)
Result contains complex when optimal does not.
Time = 0.69 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.80 \[ \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 (-(a+i b)^2 \log (i-\tan (d+e x))-(a-i b)^2 \log (i+\tan (d+e x))+2 \left (a^2-b^2\right ) \log (b+a \tan (d+e x))\right ) (b+a \tan (d+e x))}{2 \left (a^2+b^2\right ) e \sqrt {(b+a \tan (d+e x))^2}} \] Input:
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]
Output:
((-((a + I*b)^2*Log[I - Tan[d + e*x]]) - (a - I*b)^2*Log[I + Tan[d + e*x]] + 2*(a^2 - b^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])
Time = 0.59 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.74, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3042, 4193, 27, 3042, 4014, 3042, 4013}
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 \frac {a+b \tan (d+e x)}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (d+e x)}{\sqrt {a^2 \tan (d+e x)^2+2 a b \tan (d+e x)+b^2}}dx\) |
\(\Big \downarrow \) 4193 |
\(\displaystyle \frac {2 \left (a^2 \tan (d+e x)+a b\right ) \int \frac {a+b \tan (d+e x)}{2 \left (\tan (d+e x) a^2+b a\right )}dx}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\left (a^2 \tan (d+e x)+a b\right ) \int \frac {a+b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \tan (d+e x)+a b\right ) \int \frac {a+b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {\left (a^2 \tan (d+e x)+a b\right ) \left (\frac {\left (a^2-b^2\right ) \int \frac {a^2-a b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a \left (a^2+b^2\right )}+\frac {2 b x}{a^2+b^2}\right )}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \tan (d+e x)+a b\right ) \left (\frac {\left (a^2-b^2\right ) \int \frac {a^2-a b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a \left (a^2+b^2\right )}+\frac {2 b x}{a^2+b^2}\right )}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle \frac {\left (a^2 \tan (d+e x)+a b\right ) \left (\frac {\left (a^2-b^2\right ) \log (a \sin (d+e x)+b \cos (d+e x))}{a e \left (a^2+b^2\right )}+\frac {2 b x}{a^2+b^2}\right )}{\sqrt {a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2}}\) |
Input:
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]
Output:
(((2*b*x)/(a^2 + b^2) + ((a^2 - b^2)*Log[b*Cos[d + e*x] + a*Sin[d + e*x]]) /(a*(a^2 + b^2)*e))*(a*b + a^2*Tan[d + e*x]))/Sqrt[b^2 + 2*a*b*Tan[d + e*x ] + a^2*Tan[d + e*x]^2]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* (x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si n[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] && EqQ[a*c + b*d, 0]
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] + Simp[(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] && N eQ[a*c + b*d, 0]
Int[((A_) + (B_.)*tan[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*tan[(d_.) + (e_.)* (x_)] + (c_.)*tan[(d_.) + (e_.)*(x_)]^2)^(n_), x_Symbol] :> Simp[(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*T an[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]
Time = 0.22 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.83
method | result | size |
derivativedivides | \(-\frac {\left (b +a \tan \left (e x +d \right )\right ) \left (\ln \left (1+\tan \left (e x +d \right )^{2}\right ) a^{2}-\ln \left (1+\tan \left (e x +d \right )^{2}\right ) b^{2}-4 a b \arctan \left (\tan \left (e x +d \right )\right )-2 \ln \left (b +a \tan \left (e x +d \right )\right ) a^{2}+2 \ln \left (b +a \tan \left (e x +d \right )\right ) b^{2}\right )}{2 e \sqrt {b^{2}+2 a b \tan \left (e x +d \right )+a^{2} \tan \left (e x +d \right )^{2}}\, \left (a^{2}+b^{2}\right )}\) | \(114\) |
default | \(-\frac {\left (b +a \tan \left (e x +d \right )\right ) \left (\ln \left (1+\tan \left (e x +d \right )^{2}\right ) a^{2}-\ln \left (1+\tan \left (e x +d \right )^{2}\right ) b^{2}-4 a b \arctan \left (\tan \left (e x +d \right )\right )-2 \ln \left (b +a \tan \left (e x +d \right )\right ) a^{2}+2 \ln \left (b +a \tan \left (e x +d \right )\right ) b^{2}\right )}{2 e \sqrt {b^{2}+2 a b \tan \left (e x +d \right )+a^{2} \tan \left (e x +d \right )^{2}}\, \left (a^{2}+b^{2}\right )}\) | \(114\) |
parts | \(\frac {a \left (b +a \tan \left (e x +d \right )\right ) \left (2 a \ln \left (b +a \tan \left (e x +d \right )\right )-a \ln \left (1+\tan \left (e x +d \right )^{2}\right )+2 b \arctan \left (\tan \left (e x +d \right )\right )\right )}{2 e \sqrt {b^{2}+2 a b \tan \left (e x +d \right )+a^{2} \tan \left (e x +d \right )^{2}}\, \left (a^{2}+b^{2}\right )}-\frac {b \left (b +a \tan \left (e x +d \right )\right ) \left (2 b \ln \left (b +a \tan \left (e x +d \right )\right )-b \ln \left (1+\tan \left (e x +d \right )^{2}\right )-2 a \arctan \left (\tan \left (e x +d \right )\right )\right )}{2 e \sqrt {b^{2}+2 a b \tan \left (e x +d \right )+a^{2} \tan \left (e x +d \right )^{2}}\, \left (a^{2}+b^{2}\right )}\) | \(158\) |
Input:
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,metho d=_RETURNVERBOSE)
Output:
-1/2/e*(b+a*tan(e*x+d))*(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))-2*ln(b+a*tan(e*x+d))*a^2+2*ln(b+a*tan(e*x+d))*b^2)/( (b+a*tan(e*x+d))^2)^(1/2)/(a^2+b^2)
Time = 0.08 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.51 \[ \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 {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} \] Input:
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")
Output:
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)
\[ \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=\int \frac {a + b \tan {\left (d + e x \right )}}{\sqrt {\left (a \tan {\left (d + e x \right )} + b\right )^{2}}}\, dx \] Input:
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)
Output:
Integral((a + b*tan(d + e*x))/sqrt((a*tan(d + e*x) + b)**2), x)
Time = 0.13 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.99 \[ \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 {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} \] Input:
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")
Output:
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
Time = 0.38 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.17 \[ \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 {2 \, {\left (e x + d\right )} a b}{a^{2} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right ) + b^{2} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right )} - \frac {{\left (a^{2} - b^{2}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{2 \, {\left (a^{2} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right ) + b^{2} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right )\right )}} + \frac {{\left (a^{3} - a b^{2}\right )} \log \left ({\left | a \tan \left (e x + d\right ) + b \right |}\right )}{a^{3} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right ) + a b^{2} e \mathrm {sgn}\left (a \tan \left (e x + d\right ) + b\right )} \] Input:
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")
Output:
2*(e*x + d)*a*b/(a^2*e*sgn(a*tan(e*x + d) + b) + b^2*e*sgn(a*tan(e*x + d) + b)) - 1/2*(a^2 - b^2)*log(tan(e*x + d)^2 + 1)/(a^2*e*sgn(a*tan(e*x + d) + b) + b^2*e*sgn(a*tan(e*x + d) + b)) + (a^3 - a*b^2)*log(abs(a*tan(e*x + d) + b))/(a^3*e*sgn(a*tan(e*x + d) + b) + a*b^2*e*sgn(a*tan(e*x + d) + b))
Timed out. \[ \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=\int \frac {a+b\,\mathrm {tan}\left (d+e\,x\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 \] Input:
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)
Output:
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)
Time = 0.16 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.61 \[ \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 {-\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) a^{2}+\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) b^{2}+2 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) a^{2}-2 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) b^{2}+4 a b e x}{2 e \left (a^{2}+b^{2}\right )} \] Input:
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)
Output:
( - log(tan(d + e*x)**2 + 1)*a**2 + log(tan(d + e*x)**2 + 1)*b**2 + 2*log( tan(d + e*x)*a + b)*a**2 - 2*log(tan(d + e*x)*a + b)*b**2 + 4*a*b*e*x)/(2* e*(a**2 + b**2))