Optimal. Leaf size=142 \[ \frac {x \left (a^2 \sec (d+e x)+a b\right )}{b \sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}-\frac {2 \sqrt {a-b} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right ) (a \sec (d+e x)+b)}{b e \sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {4174, 3919, 3831, 2659, 205} \[ \frac {x \left (a^2 \sec (d+e x)+a b\right )}{b \sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}}-\frac {2 \sqrt {a-b} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a+b}}\right ) (a \sec (d+e x)+b)}{b e \sqrt {a^2 \sec ^2(d+e x)+2 a b \sec (d+e x)+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 2659
Rule 3831
Rule 3919
Rule 4174
Rubi steps
\begin {align*} \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 (2 a b+2 a^2 \sec (d+e x)\right ) \int \frac {a+b \sec (d+e x)}{2 a b+2 a^2 \sec (d+e x)} \, dx}{\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)}}-\frac {\left (\left (2 a^3-2 a b^2\right ) \left (2 a b+2 a^2 \sec (d+e x)\right )\right ) \int \frac {\sec (d+e x)}{2 a b+2 a^2 \sec (d+e x)} \, dx}{2 a b \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)}}-\frac {\left (\left (2 a^3-2 a b^2\right ) \left (2 a b+2 a^2 \sec (d+e x)\right )\right ) \int \frac {1}{1+\frac {b \cos (d+e x)}{a}} \, dx}{4 a^3 b \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)}}-\frac {\left (\left (2 a^3-2 a b^2\right ) \left (2 a b+2 a^2 \sec (d+e x)\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {b}{a}+\left (1-\frac {b}{a}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (d+e x)\right )\right )}{2 a^3 b e \sqrt {b^2+2 a b \sec (d+e x)+a^2 \sec ^2(d+e x)}}\\ &=-\frac {2 \sqrt {a-b} \sqrt {a+b} \tan ^{-1}\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)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 92, normalized size = 0.65 \[ \frac {\sec (d+e x) (a+b \cos (d+e x)) \left (2 \sqrt {b^2-a^2} \tanh ^{-1}\left (\frac {(b-a) \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {b^2-a^2}}\right )+a (d+e x)\right )}{b e \sqrt {(a \sec (d+e x)+b)^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.06, size = 184, normalized size = 1.30 \[ \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 ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 4.83, size = 1504, normalized size = 10.59 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.66, size = 157, normalized size = 1.11 \[ \frac {\left (b \cos \left (e x +d \right )+a \right ) \left (2 \arctan \left (\frac {\left (\cos \left (e x +d \right )-1\right ) \left (a -b \right )}{\sin \left (e x +d \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right ) a^{2}-2 \arctan \left (\frac {\left (\cos \left (e x +d \right )-1\right ) \left (a -b \right )}{\sin \left (e x +d \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right ) b^{2}+a \left (e x +d \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}\right )}{e \cos \left (e x +d \right ) \sqrt {\frac {\left (b \cos \left (e x +d \right )+a \right )^{2}}{\cos \left (e x +d \right )^{2}}}\, b \sqrt {\left (a +b \right ) \left (a -b \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \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 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \sec {\left (d + e x \right )}}{\sqrt {\left (a \sec {\left (d + e x \right )} + b\right )^{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________