Integrand size = 14, antiderivative size = 40 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=a^2 x+\frac {b (2 a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \] Output:
a^2*x+b*(2*a+b)*tan(f*x+e)/f+1/3*b^2*tan(f*x+e)^3/f
Time = 0.09 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.02 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 a^2 f x+3 b (2 a+b) \tan (e+f x)+b^2 \tan ^3(e+f x)}{3 f} \] Input:
Integrate[(a + b*Sec[e + f*x]^2)^2,x]
Output:
(3*a^2*f*x + 3*b*(2*a + b)*Tan[e + f*x] + b^2*Tan[e + f*x]^3)/(3*f)
Time = 0.23 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.10, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4616, 300, 2009}
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 \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sec (e+f x)^2\right )^2dx\) |
\(\Big \downarrow \) 4616 |
\(\displaystyle \frac {\int \frac {\left (b \tan ^2(e+f x)+a+b\right )^2}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle \frac {\int \left (\frac {a^2}{\tan ^2(e+f x)+1}+b^2 \tan ^2(e+f x)+b (2 a+b)\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \arctan (\tan (e+f x))+b (2 a+b) \tan (e+f x)+\frac {1}{3} b^2 \tan ^3(e+f x)}{f}\) |
Input:
Int[(a + b*Sec[e + f*x]^2)^2,x]
Output:
(a^2*ArcTan[Tan[e + f*x]] + b*(2*a + b)*Tan[e + f*x] + (b^2*Tan[e + f*x]^3 )/3)/f
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[(a + b + b*ff^2*x^2)^p /(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && NeQ[a + b, 0] && NeQ[p, -1]
Time = 1.50 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.15
method | result | size |
parts | \(a^{2} x -\frac {b^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}+\frac {2 a b \tan \left (f x +e \right )}{f}\) | \(46\) |
derivativedivides | \(\frac {a^{2} \left (f x +e \right )+2 a b \tan \left (f x +e \right )-b^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}\) | \(48\) |
default | \(\frac {a^{2} \left (f x +e \right )+2 a b \tan \left (f x +e \right )-b^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}\) | \(48\) |
risch | \(a^{2} x +\frac {4 i b \left (3 a \,{\mathrm e}^{4 i \left (f x +e \right )}+6 a \,{\mathrm e}^{2 i \left (f x +e \right )}+3 b \,{\mathrm e}^{2 i \left (f x +e \right )}+3 a +b \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}\) | \(68\) |
norman | \(\frac {a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}-a^{2} x +3 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-3 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-\frac {2 b \left (2 a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {2 b \left (2 a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{f}+\frac {4 b \left (6 a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}\) | \(138\) |
parallelrisch | \(\frac {3 x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6} a^{2} f +\left (-12 a b -6 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}-9 x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} a^{2} f +\left (24 a b +4 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+9 x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2} f +\left (-12 a b -6 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-3 a^{2} f x}{3 f \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(158\) |
Input:
int((a+b*sec(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
Output:
a^2*x-b^2/f*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e)+2*a*b*tan(f*x+e)/f
Time = 0.08 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.45 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 \, a^{2} f x \cos \left (f x + e\right )^{3} + {\left (2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \] Input:
integrate((a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")
Output:
1/3*(3*a^2*f*x*cos(f*x + e)^3 + (2*(3*a*b + b^2)*cos(f*x + e)^2 + b^2)*sin (f*x + e))/(f*cos(f*x + e)^3)
\[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}\, dx \] Input:
integrate((a+b*sec(f*x+e)**2)**2,x)
Output:
Integral((a + b*sec(e + f*x)**2)**2, x)
Time = 0.04 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.10 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=a^{2} x + \frac {{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} b^{2}}{3 \, f} + \frac {2 \, a b \tan \left (f x + e\right )}{f} \] Input:
integrate((a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")
Output:
a^2*x + 1/3*(tan(f*x + e)^3 + 3*tan(f*x + e))*b^2/f + 2*a*b*tan(f*x + e)/f
Time = 0.13 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.22 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right )^{3} + 3 \, {\left (f x + e\right )} a^{2} + 6 \, a b \tan \left (f x + e\right ) + 3 \, b^{2} \tan \left (f x + e\right )}{3 \, f} \] Input:
integrate((a+b*sec(f*x+e)^2)^2,x, algorithm="giac")
Output:
1/3*(b^2*tan(f*x + e)^3 + 3*(f*x + e)*a^2 + 6*a*b*tan(f*x + e) + 3*b^2*tan (f*x + e))/f
Time = 15.17 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.05 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3}-\mathrm {tan}\left (e+f\,x\right )\,\left (b^2-2\,b\,\left (a+b\right )\right )+a^2\,f\,x}{f} \] Input:
int((a + b/cos(e + f*x)^2)^2,x)
Output:
((b^2*tan(e + f*x)^3)/3 - tan(e + f*x)*(b^2 - 2*b*(a + b)) + a^2*f*x)/f
Time = 0.15 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.65 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a^{2} f x -3 \cos \left (f x +e \right ) a^{2} f x +6 \sin \left (f x +e \right )^{3} a b +2 \sin \left (f x +e \right )^{3} b^{2}-6 \sin \left (f x +e \right ) a b -3 \sin \left (f x +e \right ) b^{2}}{3 \cos \left (f x +e \right ) f \left (\sin \left (f x +e \right )^{2}-1\right )} \] Input:
int((a+b*sec(f*x+e)^2)^2,x)
Output:
(3*cos(e + f*x)*sin(e + f*x)**2*a**2*f*x - 3*cos(e + f*x)*a**2*f*x + 6*sin (e + f*x)**3*a*b + 2*sin(e + f*x)**3*b**2 - 6*sin(e + f*x)*a*b - 3*sin(e + f*x)*b**2)/(3*cos(e + f*x)*f*(sin(e + f*x)**2 - 1))