Integrand size = 41, antiderivative size = 173 \[ \int (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^2+b^2\right ) \text {arctanh}(\sin (d+e x)) \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}}{e (b+a \sec (d+e x))}+\frac {a^2 b x \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}}{a b+a^2 \sec (d+e x)}+\frac {a^2 b \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)} \tan (d+e x)}{e \left (a b+a^2 \sec (d+e x)\right )} \] Output:
(a^2+b^2)*arctanh(sin(e*x+d))*(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2 )/e/(b+a*sec(e*x+d))+a^2*b*x*(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2) /(a*b+a^2*sec(e*x+d))+a^2*b*(b^2+2*a*b*sec(e*x+d)+a^2*sec(e*x+d)^2)^(1/2)* tan(e*x+d)/e/(a*b+a^2*sec(e*x+d))
Time = 0.21 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.39 \[ \int (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 {\cos (d+e x) \sqrt {(b+a \sec (d+e x))^2} \left (\left (a^2+b^2\right ) \coth ^{-1}(\sin (d+e x))+a b (e x+\tan (d+e x))\right )}{e (a+b \cos (d+e x))} \] 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:
(Cos[d + e*x]*Sqrt[(b + a*Sec[d + e*x])^2]*((a^2 + b^2)*ArcCoth[Sin[d + e* x]] + a*b*(e*x + Tan[d + e*x])))/(e*(a + b*Cos[d + e*x]))
Time = 0.54 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.50, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.220, Rules used = {3042, 4662, 27, 3042, 4402, 3042, 4254, 24, 4257}
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 (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 (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 {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \int 2 \left (\sec (d+e x) a^2+b a\right ) (a+b \sec (d+e x))dx}{2 \left (a^2 \sec (d+e x)+a b\right )}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \int \left (\sec (d+e x) a^2+b a\right ) (a+b \sec (d+e x))dx}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \int \left (\csc \left (d+e x+\frac {\pi }{2}\right ) a^2+b a\right ) \left (a+b \csc \left (d+e x+\frac {\pi }{2}\right )\right )dx}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 4402 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \left (a \left (a^2+b^2\right ) \int \sec (d+e x)dx+a^2 b \int \sec ^2(d+e x)dx+a^2 b x\right )}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \left (a \left (a^2+b^2\right ) \int \csc \left (d+e x+\frac {\pi }{2}\right )dx+a^2 b \int \csc \left (d+e x+\frac {\pi }{2}\right )^2dx+a^2 b x\right )}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \left (a \left (a^2+b^2\right ) \int \csc \left (d+e x+\frac {\pi }{2}\right )dx-\frac {a^2 b \int 1d(-\tan (d+e x))}{e}+a^2 b x\right )}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \left (a \left (a^2+b^2\right ) \int \csc \left (d+e x+\frac {\pi }{2}\right )dx+\frac {a^2 b \tan (d+e x)}{e}+a^2 b x\right )}{a^2 \sec (d+e x)+a b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2} \left (\frac {a \left (a^2+b^2\right ) \text {arctanh}(\sin (d+e x))}{e}+\frac {a^2 b \tan (d+e x)}{e}+a^2 b x\right )}{a^2 \sec (d+e x)+a b}\) |
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:
(Sqrt[b^2 + 2*a*b*Sec[d + e*x] + a^2*Sec[d + e*x]^2]*(a^2*b*x + (a*(a^2 + b^2)*ArcTanh[Sin[d + e*x]])/e + (a^2*b*Tan[d + e*x])/e))/(a*b + a^2*Sec[d + e*x])
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)), x_Symbol] :> Simp[a*c*x, x] + (Simp[b*d Int[Csc[e + f*x]^2, x], x ] + Simp[(b*c + a*d) Int[Csc[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f }, x] && NeQ[b*c - a*d, 0] && 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.78 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.01
method | result | size |
default | \(\frac {\left (\cos \left (e x +d \right ) \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )+1\right ) a^{2}+\cos \left (e x +d \right ) \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )+1\right ) b^{2}-\cos \left (e x +d \right ) \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )-1\right ) a^{2}-\cos \left (e x +d \right ) \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )-1\right ) b^{2}+\cos \left (e x +d \right ) a b \left (e x +d \right )+a b \sin \left (e x +d \right )\right ) \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}}{e \left (b \cos \left (e x +d \right )+a \right )}\) | \(174\) |
parts | \(\frac {a \left (a \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )+1\right )-a \ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )-1\right )+\left (e x +d \right ) b \right ) \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}\, \cos \left (e x +d \right )}{e \left (b \cos \left (e x +d \right )+a \right )}+\frac {b \left (\ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )+1\right ) \cos \left (e x +d \right ) b -\ln \left (-\cot \left (e x +d \right )+\csc \left (e x +d \right )-1\right ) \cos \left (e x +d \right ) b +a \sin \left (e x +d \right )\right ) \sqrt {\left (b \cos \left (e x +d \right )+a \right )^{2} \sec \left (e x +d \right )^{2}}}{e \left (b \cos \left (e x +d \right )+a \right )}\) | \(195\) |
risch | \(\frac {\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 ) a b x}{{\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b}+\frac {2 i \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}}}\, a b}{\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) e}-\frac {\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 ) \left (a^{2}+b^{2}\right ) \ln \left ({\mathrm e}^{i \left (e x +d \right )}-i\right )}{\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) e}+\frac {\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 ) \left (a^{2}+b^{2}\right ) \ln \left ({\mathrm e}^{i \left (e x +d \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (e x +d \right )} b +2 \,{\mathrm e}^{i \left (e x +d \right )} a +b \right ) e}\) | \(376\) |
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*(cos(e*x+d)*ln(-cot(e*x+d)+csc(e*x+d)+1)*a^2+cos(e*x+d)*ln(-cot(e*x+d) +csc(e*x+d)+1)*b^2-cos(e*x+d)*ln(-cot(e*x+d)+csc(e*x+d)-1)*a^2-cos(e*x+d)* ln(-cot(e*x+d)+csc(e*x+d)-1)*b^2+cos(e*x+d)*a*b*(e*x+d)+a*b*sin(e*x+d))*(( b*cos(e*x+d)+a)^2*sec(e*x+d)^2)^(1/2)/(b*cos(e*x+d)+a)
Time = 0.08 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.49 \[ \int (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 \, a b e x \cos \left (e x + d\right ) + {\left (a^{2} + b^{2}\right )} \cos \left (e x + d\right ) \log \left (\sin \left (e x + d\right ) + 1\right ) - {\left (a^{2} + b^{2}\right )} \cos \left (e x + d\right ) \log \left (-\sin \left (e x + d\right ) + 1\right ) + 2 \, a b \sin \left (e x + d\right )}{2 \, e \cos \left (e x + d\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*b*e*x*cos(e*x + d) + (a^2 + b^2)*cos(e*x + d)*log(sin(e*x + d) + 1) - (a^2 + b^2)*cos(e*x + d)*log(-sin(e*x + d) + 1) + 2*a*b*sin(e*x + d)) /(e*cos(e*x + d))
\[ \int (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 \left (a + b \sec {\left (d + e x \right )}\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)
Time = 0.13 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.95 \[ \int (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 (2 \, b \arctan \left (\frac {\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1}\right ) + a \log \left (\frac {\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1} + 1\right ) - a \log \left (\frac {\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1} - 1\right )\right )} a + {\left (b \log \left (\frac {\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1} + 1\right ) - b \log \left (\frac {\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1} - 1\right ) - \frac {2 \, a \sin \left (e x + d\right )}{{\left (\frac {\sin \left (e x + d\right )^{2}}{{\left (\cos \left (e x + d\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (e x + d\right ) + 1\right )}}\right )} b}{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="maxima")
Output:
((2*b*arctan(sin(e*x + d)/(cos(e*x + d) + 1)) + a*log(sin(e*x + d)/(cos(e* x + d) + 1) + 1) - a*log(sin(e*x + d)/(cos(e*x + d) + 1) - 1))*a + (b*log( sin(e*x + d)/(cos(e*x + d) + 1) + 1) - b*log(sin(e*x + d)/(cos(e*x + d) + 1) - 1) - 2*a*sin(e*x + d)/((sin(e*x + d)^2/(cos(e*x + d) + 1)^2 - 1)*(cos (e*x + d) + 1)))*b)/e
Time = 0.35 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.20 \[ \int (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 (e x + d\right )} a b \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) - \frac {2 \, a b \mathrm {sgn}\left (b \cos \left (e x + d\right )^{2} + a \cos \left (e x + d\right )\right ) \tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right )}{\tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right )^{2} - 1} + {\left (a^{2} \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 )} \log \left ({\left | \tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right ) + 1 \right |}\right ) - {\left (a^{2} \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 )} \log \left ({\left | \tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right ) - 1 \right |}\right )}{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:
((e*x + d)*a*b*sgn(b*cos(e*x + d)^2 + a*cos(e*x + d)) - 2*a*b*sgn(b*cos(e* x + d)^2 + a*cos(e*x + d))*tan(1/2*e*x + 1/2*d)/(tan(1/2*e*x + 1/2*d)^2 - 1) + (a^2*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)))*log(abs(tan(1/2*e*x + 1/2*d) + 1)) - (a^2*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)))* log(abs(tan(1/2*e*x + 1/2*d) - 1)))/e
Timed out. \[ \int (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 \left (a+\frac {b}{\cos \left (d+e\,x\right )}\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.18 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.71 \[ \int (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 {-\cos \left (e x +d \right ) \mathrm {log}\left (\tan \left (\frac {e x}{2}+\frac {d}{2}\right )-1\right ) a^{2}-\cos \left (e x +d \right ) \mathrm {log}\left (\tan \left (\frac {e x}{2}+\frac {d}{2}\right )-1\right ) b^{2}+\cos \left (e x +d \right ) \mathrm {log}\left (\tan \left (\frac {e x}{2}+\frac {d}{2}\right )+1\right ) a^{2}+\cos \left (e x +d \right ) \mathrm {log}\left (\tan \left (\frac {e x}{2}+\frac {d}{2}\right )+1\right ) b^{2}+\cos \left (e x +d \right ) a b e x +\sin \left (e x +d \right ) a b}{\cos \left (e x +d \right ) 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:
( - cos(d + e*x)*log(tan((d + e*x)/2) - 1)*a**2 - cos(d + e*x)*log(tan((d + e*x)/2) - 1)*b**2 + cos(d + e*x)*log(tan((d + e*x)/2) + 1)*a**2 + cos(d + e*x)*log(tan((d + e*x)/2) + 1)*b**2 + cos(d + e*x)*a*b*e*x + sin(d + e*x )*a*b)/(cos(d + e*x)*e)