Integrand size = 41, antiderivative size = 142 \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=-\frac {2 \sqrt {a-b} \sqrt {a+b} \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right ) (b+a \sec (d+e x))}{b e \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}}+\frac {x \left (a b+a^2 \sec (d+e x)\right )}{b \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \] Output:
-2*(a-b)^(1/2)*(a+b)^(1/2)*arctan((a-b)^(1/2)*tan(1/2*e*x+1/2*d)/(a+b)^(1/ 2))*(b+a*sec(e*x+d))/b/e/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2)+x*( a*b+a^2*sec(e*x+d))/b/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2)
Time = 0.60 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.65 \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\frac {\left (a (d+e x)+2 \sqrt {-a^2+b^2} \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {-a^2+b^2}}\right )\right ) (a+b \cos (d+e x)) \sec (d+e x)}{b e \sqrt {(b+a \sec (d+e x))^2}} \] Input:
Integrate[(a + b*Sec[d + e*x])/Sqrt[b^2 + 2*a*b*Sec[d + e*x] + a^2*Sec[d + e*x]^2],x]
Output:
((a*(d + e*x) + 2*Sqrt[-a^2 + b^2]*ArcTanh[((-a + b)*Tan[(d + e*x)/2])/Sqr t[-a^2 + b^2]])*(a + b*Cos[d + e*x])*Sec[d + e*x])/(b*e*Sqrt[(b + a*Sec[d + e*x])^2])
Time = 0.65 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.81, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.244, Rules used = {3042, 4662, 27, 3042, 4407, 3042, 4318, 3042, 3138, 218}
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 \sec (d+e x)}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sec (d+e x)}{\sqrt {a^2 \sec (d+e x)^2+2 a b \sec (d+e x)+b^2}}dx\) |
\(\Big \downarrow \) 4662 |
\(\displaystyle \frac {2 \left (a^2 \sec (d+e x)+a b\right ) \int \frac {a+b \sec (d+e x)}{2 \left (\sec (d+e x) a^2+b a\right )}dx}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \int \frac {a+b \sec (d+e x)}{\sec (d+e x) a^2+b a}dx}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \int \frac {a+b \csc \left (d+e x+\frac {\pi }{2}\right )}{\csc \left (d+e x+\frac {\pi }{2}\right ) a^2+b a}dx}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 4407 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {\sec (d+e x)}{\sec (d+e x) a^2+b a}dx}{b}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {\csc \left (d+e x+\frac {\pi }{2}\right )}{\csc \left (d+e x+\frac {\pi }{2}\right ) a^2+b a}dx}{b}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{\frac {b \cos (d+e x)}{a}+1}dx}{a^2 b}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{\frac {b \sin \left (d+e x+\frac {\pi }{2}\right )}{a}+1}dx}{a^2 b}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {2 \left (a^2-b^2\right ) \int \frac {1}{\frac {(a-b) \tan ^2\left (\frac {1}{2} (d+e x)\right )}{a}+\frac {a+b}{a}}d\tan \left (\frac {1}{2} (d+e x)\right )}{a^2 b e}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\left (a^2 \sec (d+e x)+a b\right ) \left (\frac {x}{b}-\frac {2 \left (a^2-b^2\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right )}{a b e \sqrt {a-b} \sqrt {a+b}}\right )}{\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}\) |
Input:
Int[(a + b*Sec[d + e*x])/Sqrt[b^2 + 2*a*b*Sec[d + e*x] + a^2*Sec[d + e*x]^ 2],x]
Output:
((x/b - (2*(a^2 - b^2)*ArcTan[(Sqrt[a - b]*Tan[(d + e*x)/2])/Sqrt[a + b]]) /(a*Sqrt[a - b]*b*Sqrt[a + b]*e))*(a*b + a^2*Sec[d + e*x]))/Sqrt[b^2 + 2*a *b*Sec[d + e*x] + a^2*Sec[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[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a Int[Csc[e + f* x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((A_) + (B_.)*sec[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*sec[(d_.) + (e_.)* (x_)] + (c_.)*sec[(d_.) + (e_.)*(x_)]^2)^(n_), x_Symbol] :> Simp[(a + b*Sec [d + e*x] + c*Sec[d + e*x]^2)^n/(b + 2*c*Sec[d + e*x])^(2*n) Int[(A + B*S ec[d + e*x])*(b + 2*c*Sec[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 = 2.60 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.04
method | result | size |
default | \(\frac {\left (a \left (e x +d \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}-2 \arctan \left (\frac {\left (a -b \right ) \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) a^{2}+2 \arctan \left (\frac {\left (a -b \right ) \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) b^{2}\right ) \left (b +a \sec \left (e x +d \right )\right )}{e b \sqrt {\left (a -b \right ) \left (a +b \right )}\, \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}}\) | \(147\) |
parts | \(-\frac {a \left (2 a \arctan \left (\frac {\left (a -b \right ) \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )-\left (e x +d \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}\right ) \left (b +a \sec \left (e x +d \right )\right )}{e b \sqrt {\left (a -b \right ) \left (a +b \right )}\, \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}}+\frac {2 b \arctan \left (\frac {\left (a -b \right ) \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) \left (b +a \sec \left (e x +d \right )\right )}{e \sqrt {\left (a -b \right ) \left (a +b \right )}\, \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}}\) | \(193\) |
risch | \(\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) a x}{\sqrt {\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right )^{2}}{\left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right ) b}+\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (e x +d \right )}+\frac {i \sqrt {-a^{2}+b^{2}}+a}{b}\right )}{\sqrt {\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right )^{2}}{\left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right ) e b}-\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) \sqrt {-a^{2}+b^{2}}\, \ln \left ({\mathrm e}^{i \left (e x +d \right )}-\frac {i \sqrt {-a^{2}+b^{2}}-a}{b}\right )}{\sqrt {\frac {\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right )^{2}}{\left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (e x +d \right )}+1\right ) e b}\) | \(353\) |
Input:
int((a+b*sec(e*x+d))/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2),x,metho d=_RETURNVERBOSE)
Output:
1/e/b/((a-b)*(a+b))^(1/2)*(a*(e*x+d)*((a-b)*(a+b))^(1/2)-2*arctan((a-b)/(( a-b)*(a+b))^(1/2)*(-cot(e*x+d)+csc(e*x+d)))*a^2+2*arctan((a-b)/((a-b)*(a+b ))^(1/2)*(-cot(e*x+d)+csc(e*x+d)))*b^2)/((b*cos(e*x+d)+a)^2*sec(e*x+d)^2)^ (1/2)*(b+a*sec(e*x+d))
Time = 0.09 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.30 \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\left [\frac {2 \, a e x + \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (e x + d\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (e x + d\right )^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (e x + d\right ) + b\right )} \sin \left (e x + d\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (e x + d\right )^{2} + 2 \, a b \cos \left (e x + d\right ) + a^{2}}\right )}{2 \, b e}, \frac {a e x - \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (e x + d\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (e x + d\right )}\right )}{b e}\right ] \] Input:
integrate((a+b*sec(e*x+d))/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2),x , algorithm="fricas")
Output:
[1/2*(2*a*e*x + sqrt(-a^2 + b^2)*log((2*a*b*cos(e*x + d) + (2*a^2 - b^2)*c os(e*x + d)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(e*x + d) + b)*sin(e*x + d) - a^2 + 2*b^2)/(b^2*cos(e*x + d)^2 + 2*a*b*cos(e*x + d) + a^2)))/(b*e), (a*e*x - sqrt(a^2 - b^2)*arctan(-(a*cos(e*x + d) + b)/(sqrt(a^2 - b^2)*sin(e*x + d))))/(b*e)]
\[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\int \frac {a + b \sec {\left (d + e x \right )}}{\sqrt {\left (a \sec {\left (d + e x \right )} + b\right )^{2}}}\, dx \] Input:
integrate((a+b*sec(e*x+d))/(b**2+2*a*b*sec(e*x+d)+a**2*sec(e*x+d)**2)**(1/ 2),x)
Output:
Integral((a + b*sec(d + e*x))/sqrt((a*sec(d + e*x) + b)**2), x)
Exception generated. \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((a+b*sec(e*x+d))/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2),x , algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 383 vs. \(2 (129) = 258\).
Time = 0.60 (sec) , antiderivative size = 383, normalized size of antiderivative = 2.70 \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=-\frac {\frac {{\left (a {\left | b \right |} {\left | \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \right |} - b {\left | b \right |} {\left | \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \right |} - 2 \, a^{2} \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) + a b \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) + b^{2} \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right )\right )} {\left (e x + d\right )}}{a {\left | b \right |} {\left | \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \right |} \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) - b^{2}} + \frac {2 \, {\left (\sqrt {a^{2} - b^{2}} {\left | a - b \right |} {\left | b \right |} {\left | \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \right |} + \sqrt {a^{2} - b^{2}} {\left (2 \, a + b\right )} {\left | a - b \right |} \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right )\right )} {\left (\pi \left \lfloor \frac {e x + d}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\sqrt {a^{2} - b^{2}} \tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right )}{a + b}\right )\right )}}{{\left (a^{2} - a b\right )} {\left | b \right |} {\left | \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \right |} \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) + {\left (a - b\right )} b^{2}}}{2 \, e} \] Input:
integrate((a+b*sec(e*x+d))/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2),x , algorithm="giac")
Output:
-1/2*((a*abs(b)*abs(sgn(b*cos(e*x + d)^2 + a*cos(e*x + d))) - b*abs(b)*abs (sgn(b*cos(e*x + d)^2 + a*cos(e*x + d))) - 2*a^2*sgn(b*cos(e*x + d)^2 + a* cos(e*x + d)) + a*b*sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)) + b^2*sgn(b*cos (e*x + d)^2 + a*cos(e*x + d)))*(e*x + d)/(a*abs(b)*abs(sgn(b*cos(e*x + d)^ 2 + a*cos(e*x + d)))*sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)) - b^2) + 2*(sq rt(a^2 - b^2)*abs(a - b)*abs(b)*abs(sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)) ) + sqrt(a^2 - b^2)*(2*a + b)*abs(a - b)*sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)))*(pi*floor(1/2*(e*x + d)/pi + 1/2) + arctan(sqrt(a^2 - b^2)*tan(1/2* e*x + 1/2*d)/(a + b)))/((a^2 - a*b)*abs(b)*abs(sgn(b*cos(e*x + d)^2 + a*co s(e*x + d)))*sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)) + (a - b)*b^2))/e
Timed out. \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\int \frac {a+\frac {b}{\cos \left (d+e\,x\right )}}{\sqrt {b^2+\frac {a^2}{{\cos \left (d+e\,x\right )}^2}+\frac {2\,a\,b}{\cos \left (d+e\,x\right )}}} \,d x \] Input:
int((a + b/cos(d + e*x))/(b^2 + a^2/cos(d + e*x)^2 + (2*a*b)/cos(d + e*x)) ^(1/2),x)
Output:
int((a + b/cos(d + e*x))/(b^2 + a^2/cos(d + e*x)^2 + (2*a*b)/cos(d + e*x)) ^(1/2), x)
Time = 0.16 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.44 \[ \int \frac {a+b \sec (d+e x)}{\sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}} \, dx=\frac {-2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {e x}{2}+\frac {d}{2}\right ) a -\tan \left (\frac {e x}{2}+\frac {d}{2}\right ) b}{\sqrt {a^{2}-b^{2}}}\right )+a e x}{b e} \] Input:
int((a+b*sec(e*x+d))/(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2),x)
Output:
( - 2*sqrt(a**2 - b**2)*atan((tan((d + e*x)/2)*a - tan((d + e*x)/2)*b)/sqr t(a**2 - b**2)) + a*e*x)/(b*e)