Integrand size = 21, antiderivative size = 56 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b (4 a+b) \text {arctanh}(\sin (e+f x))}{2 f}+\frac {a^2 \sin (e+f x)}{f}+\frac {b^2 \sec (e+f x) \tan (e+f x)}{2 f} \] Output:
1/2*b*(4*a+b)*arctanh(sin(f*x+e))/f+a^2*sin(f*x+e)/f+1/2*b^2*sec(f*x+e)*ta n(f*x+e)/f
Time = 0.04 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.43 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {2 a b \coth ^{-1}(\sin (e+f x))}{f}+\frac {b^2 \text {arctanh}(\sin (e+f x))}{2 f}+\frac {a^2 \cos (f x) \sin (e)}{f}+\frac {a^2 \cos (e) \sin (f x)}{f}+\frac {b^2 \sec (e+f x) \tan (e+f x)}{2 f} \] Input:
Integrate[Cos[e + f*x]*(a + b*Sec[e + f*x]^2)^2,x]
Output:
(2*a*b*ArcCoth[Sin[e + f*x]])/f + (b^2*ArcTanh[Sin[e + f*x]])/(2*f) + (a^2 *Cos[f*x]*Sin[e])/f + (a^2*Cos[e]*Sin[f*x])/f + (b^2*Sec[e + f*x]*Tan[e + f*x])/(2*f)
Time = 0.27 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.05, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4635, 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 \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sec (e+f x)^2\right )^2}{\sec (e+f x)}dx\) |
\(\Big \downarrow \) 4635 |
\(\displaystyle \frac {\int \frac {\left (-a \sin ^2(e+f x)+a+b\right )^2}{\left (1-\sin ^2(e+f x)\right )^2}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle \frac {\int \left (a^2+\frac {b (2 a+b)-2 a b \sin ^2(e+f x)}{\left (1-\sin ^2(e+f x)\right )^2}\right )d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \sin (e+f x)+\frac {1}{2} b (4 a+b) \text {arctanh}(\sin (e+f x))+\frac {b^2 \sin (e+f x)}{2 \left (1-\sin ^2(e+f x)\right )}}{f}\) |
Input:
Int[Cos[e + f*x]*(a + b*Sec[e + f*x]^2)^2,x]
Output:
((b*(4*a + b)*ArcTanh[Sin[e + f*x]])/2 + a^2*Sin[e + f*x] + (b^2*Sin[e + f *x])/(2*(1 - Sin[e + f*x]^2)))/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[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && In tegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 0.98 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.23
method | result | size |
derivativedivides | \(\frac {\sin \left (f x +e \right ) a^{2}+2 a b \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+b^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) | \(69\) |
default | \(\frac {\sin \left (f x +e \right ) a^{2}+2 a b \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+b^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) | \(69\) |
parallelrisch | \(\frac {-4 \left (a +\frac {b}{4}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+4 \left (a +\frac {b}{4}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\sin \left (3 f x +3 e \right ) a^{2}+\sin \left (f x +e \right ) \left (a^{2}+2 b^{2}\right )}{2 f \left (1+\cos \left (2 f x +2 e \right )\right )}\) | \(111\) |
risch | \(-\frac {i a^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 f}+\frac {i a^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 f}-\frac {i b^{2} \left ({\mathrm e}^{3 i \left (f x +e \right )}-{\mathrm e}^{i \left (f x +e \right )}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) a b}{f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) b^{2}}{2 f}+\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) a b}{f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) b^{2}}{2 f}\) | \(163\) |
norman | \(\frac {\frac {\left (2 a^{2}+b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{f}+\frac {\left (6 a^{2}-b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{f}-\frac {\left (2 a^{2}+b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {\left (6 a^{2}-b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}-\frac {b \left (4 a +b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 f}+\frac {b \left (4 a +b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 f}\) | \(180\) |
Input:
int(cos(f*x+e)*(a+b*sec(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
Output:
1/f*(sin(f*x+e)*a^2+2*a*b*ln(sec(f*x+e)+tan(f*x+e))+b^2*(1/2*sec(f*x+e)*ta n(f*x+e)+1/2*ln(sec(f*x+e)+tan(f*x+e))))
Time = 0.09 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.68 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {{\left (4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, a^{2} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \] Input:
integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")
Output:
1/4*((4*a*b + b^2)*cos(f*x + e)^2*log(sin(f*x + e) + 1) - (4*a*b + b^2)*co s(f*x + e)^2*log(-sin(f*x + e) + 1) + 2*(2*a^2*cos(f*x + e)^2 + b^2)*sin(f *x + e))/(f*cos(f*x + e)^2)
\[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \cos {\left (e + f x \right )}\, dx \] Input:
integrate(cos(f*x+e)*(a+b*sec(f*x+e)**2)**2,x)
Output:
Integral((a + b*sec(e + f*x)**2)**2*cos(e + f*x), x)
Time = 0.03 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.55 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {b^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 4 \, a b {\left (\log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 4 \, a^{2} \sin \left (f x + e\right )}{4 \, f} \] Input:
integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")
Output:
-1/4*(b^2*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + l og(sin(f*x + e) - 1)) - 4*a*b*(log(sin(f*x + e) + 1) - log(sin(f*x + e) - 1)) - 4*a^2*sin(f*x + e))/f
Time = 0.14 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.41 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {4 \, a^{2} \sin \left (f x + e\right ) + {\left (4 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (f x + e\right ) + 1 \right |}\right ) - {\left (4 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (f x + e\right ) - 1 \right |}\right ) - \frac {2 \, b^{2} \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1}}{4 \, f} \] Input:
integrate(cos(f*x+e)*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")
Output:
1/4*(4*a^2*sin(f*x + e) + (4*a*b + b^2)*log(abs(sin(f*x + e) + 1)) - (4*a* b + b^2)*log(abs(sin(f*x + e) - 1)) - 2*b^2*sin(f*x + e)/(sin(f*x + e)^2 - 1))/f
Time = 0.11 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.98 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {a^2\,\sin \left (e+f\,x\right )+\frac {b\,\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\,\left (4\,a+b\right )}{2}-\frac {b^2\,\sin \left (e+f\,x\right )}{2\,\left ({\sin \left (e+f\,x\right )}^2-1\right )}}{f} \] Input:
int(cos(e + f*x)*(a + b/cos(e + f*x)^2)^2,x)
Output:
(a^2*sin(e + f*x) + (b*atanh(sin(e + f*x))*(4*a + b))/2 - (b^2*sin(e + f*x ))/(2*(sin(e + f*x)^2 - 1)))/f
Time = 0.15 (sec) , antiderivative size = 215, normalized size of antiderivative = 3.84 \[ \int \cos (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {-4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \sin \left (f x +e \right )^{2} a b -\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \sin \left (f x +e \right )^{2} b^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) a b +\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) b^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \sin \left (f x +e \right )^{2} a b +\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \sin \left (f x +e \right )^{2} b^{2}-4 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) a b -\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) b^{2}+2 \sin \left (f x +e \right )^{3} a^{2}-2 \sin \left (f x +e \right ) a^{2}-\sin \left (f x +e \right ) b^{2}}{2 f \left (\sin \left (f x +e \right )^{2}-1\right )} \] Input:
int(cos(f*x+e)*(a+b*sec(f*x+e)^2)^2,x)
Output:
( - 4*log(tan((e + f*x)/2) - 1)*sin(e + f*x)**2*a*b - log(tan((e + f*x)/2) - 1)*sin(e + f*x)**2*b**2 + 4*log(tan((e + f*x)/2) - 1)*a*b + log(tan((e + f*x)/2) - 1)*b**2 + 4*log(tan((e + f*x)/2) + 1)*sin(e + f*x)**2*a*b + lo g(tan((e + f*x)/2) + 1)*sin(e + f*x)**2*b**2 - 4*log(tan((e + f*x)/2) + 1) *a*b - log(tan((e + f*x)/2) + 1)*b**2 + 2*sin(e + f*x)**3*a**2 - 2*sin(e + f*x)*a**2 - sin(e + f*x)*b**2)/(2*f*(sin(e + f*x)**2 - 1))