Integrand size = 21, antiderivative size = 81 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {2 a b \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {\left (2 a^2-b^2\right ) \sin ^3(c+d x)}{3 d}+\frac {\left (a^2-b^2\right ) \sin ^5(c+d x)}{5 d} \] Output:
-2/5*a*b*cos(d*x+c)^5/d+a^2*sin(d*x+c)/d-1/3*(2*a^2-b^2)*sin(d*x+c)^3/d+1/ 5*(a^2-b^2)*sin(d*x+c)^5/d
Time = 0.12 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.85 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {-6 a b \cos ^5(c+d x)+15 a^2 \sin (c+d x)+5 \left (-2 a^2+b^2\right ) \sin ^3(c+d x)+3 \left (a^2-b^2\right ) \sin ^5(c+d x)}{15 d} \] Input:
Integrate[Cos[c + d*x]^5*(a + b*Tan[c + d*x])^2,x]
Output:
(-6*a*b*Cos[c + d*x]^5 + 15*a^2*Sin[c + d*x] + 5*(-2*a^2 + b^2)*Sin[c + d* x]^3 + 3*(a^2 - b^2)*Sin[c + d*x]^5)/(15*d)
Time = 0.42 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.95, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3991, 27, 3042, 3045, 15, 4159, 290, 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 ^5(c+d x) (a+b \tan (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^2}{\sec (c+d x)^5}dx\) |
\(\Big \downarrow \) 3991 |
\(\displaystyle \int \cos ^5(c+d x) \left (a^2+b^2 \tan ^2(c+d x)\right )dx+\int 2 a b \cos ^4(c+d x) \sin (c+d x)dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \cos ^5(c+d x) \left (a^2+b^2 \tan ^2(c+d x)\right )dx+2 a b \int \cos ^4(c+d x) \sin (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^2+b^2 \tan (c+d x)^2}{\sec (c+d x)^5}dx+2 a b \int \cos (c+d x)^4 \sin (c+d x)dx\) |
\(\Big \downarrow \) 3045 |
\(\displaystyle \int \frac {a^2+b^2 \tan (c+d x)^2}{\sec (c+d x)^5}dx-\frac {2 a b \int \cos ^4(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \int \frac {a^2+b^2 \tan (c+d x)^2}{\sec (c+d x)^5}dx-\frac {2 a b \cos ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \frac {\int \left (1-\sin ^2(c+d x)\right ) \left (a^2-\left (a^2-b^2\right ) \sin ^2(c+d x)\right )d\sin (c+d x)}{d}-\frac {2 a b \cos ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 290 |
\(\displaystyle \frac {\int \left ((a-b) (a+b) \sin ^4(c+d x)-\left (2 a^2-b^2\right ) \sin ^2(c+d x)+a^2\right )d\sin (c+d x)}{d}-\frac {2 a b \cos ^5(c+d x)}{5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{5} \left (a^2-b^2\right ) \sin ^5(c+d x)-\frac {1}{3} \left (2 a^2-b^2\right ) \sin ^3(c+d x)+a^2 \sin (c+d x)}{d}-\frac {2 a b \cos ^5(c+d x)}{5 d}\) |
Input:
Int[Cos[c + d*x]^5*(a + b*Tan[c + d*x])^2,x]
Output:
(-2*a*b*Cos[c + d*x]^5)/(5*d) + (a^2*Sin[c + d*x] - ((2*a^2 - b^2)*Sin[c + d*x]^3)/3 + ((a^2 - b^2)*Sin[c + d*x]^5)/5)/d
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
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)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> I nt[ExpandIntegrand[(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] && IGtQ[q, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> Simp[-(a*f)^(-1) Subst[Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] && !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _), x_Symbol] :> Module[{k}, Int[Sec[e + f*x]^m*Sum[Binomial[n, 2*k]*a^(n - 2*k)*b^(2*k)*Tan[e + f*x]^(2*k), {k, 0, n/2}], x] + Int[Sec[e + f*x]^m*Tan [e + f*x]*Sum[Binomial[n, 2*k + 1]*a^(n - 2*k - 1)*b^(2*k + 1)*Tan[e + f*x] ^(2*k), {k, 0, (n - 1)/2}], x]] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + 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] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 20.72 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(88\) |
default | \(\frac {b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(88\) |
risch | \(-\frac {a b \cos \left (d x +c \right )}{4 d}+\frac {5 a^{2} \sin \left (d x +c \right )}{8 d}+\frac {\sin \left (d x +c \right ) b^{2}}{8 d}-\frac {a b \cos \left (5 d x +5 c \right )}{40 d}+\frac {\sin \left (5 d x +5 c \right ) a^{2}}{80 d}-\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}-\frac {a b \cos \left (3 d x +3 c \right )}{8 d}+\frac {5 \sin \left (3 d x +3 c \right ) a^{2}}{48 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{48 d}\) | \(143\) |
Input:
int(cos(d*x+c)^5*(a+b*tan(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(b^2*(-1/5*cos(d*x+c)^4*sin(d*x+c)+1/15*(2+cos(d*x+c)^2)*sin(d*x+c))-2 /5*a*b*cos(d*x+c)^5+1/5*a^2*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c) )
Time = 0.09 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.91 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} + 8 \, a^{2} + 2 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d} \] Input:
integrate(cos(d*x+c)^5*(a+b*tan(d*x+c))^2,x, algorithm="fricas")
Output:
-1/15*(6*a*b*cos(d*x + c)^5 - (3*(a^2 - b^2)*cos(d*x + c)^4 + (4*a^2 + b^2 )*cos(d*x + c)^2 + 8*a^2 + 2*b^2)*sin(d*x + c))/d
\[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \cos ^{5}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**5*(a+b*tan(d*x+c))**2,x)
Output:
Integral((a + b*tan(c + d*x))**2*cos(c + d*x)**5, x)
Time = 0.05 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.95 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2} + {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} b^{2}}{15 \, d} \] Input:
integrate(cos(d*x+c)^5*(a+b*tan(d*x+c))^2,x, algorithm="maxima")
Output:
-1/15*(6*a*b*cos(d*x + c)^5 - (3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*s in(d*x + c))*a^2 + (3*sin(d*x + c)^5 - 5*sin(d*x + c)^3)*b^2)/d
Leaf count of result is larger than twice the leaf count of optimal. 28204 vs. \(2 (75) = 150\).
Time = 29.80 (sec) , antiderivative size = 28204, normalized size of antiderivative = 348.20 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^5*(a+b*tan(d*x+c))^2,x, algorithm="giac")
Output:
-1/960*(45*pi*a*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1 /2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x) ^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c )^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b*sgn(ta n(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan( 1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 1 )*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^ 2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/ 2*c) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 45*pi*a*b*sgn(tan(1/2*d*x)^2*tan (1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 60*pi*a*b*sgn(tan(1/2*d* x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c )^2 + 1)*tan(1/2*d*x)^10*tan(1/2*c)^10 + 225*pi*a*b*sgn(tan(1/2*d*x)^2*tan (1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 + 2*tan(1/2*c) - 1)*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)*tan(1/2 *c)^2 - tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) - 1)*tan(1/2*d*x)^1 0*tan(1/2*c)^8 + 225*pi*a*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d* x)^2*tan(1/2*c) + tan(1/2*d*x)^2 - tan(1/2*c)^2 - 2*tan(1/2*c) - 1)*sgn(ta n(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)*tan(1/2*c)^2 - tan(1/2*d*x)^...
Time = 0.86 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.42 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {2\,\left (\frac {3\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^4}{2}+2\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^2+4\,\sin \left (c+d\,x\right )\,a^2-3\,a\,b\,{\cos \left (c+d\,x\right )}^5-\frac {3\,\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^4}{2}+\frac {\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^2}{2}+\sin \left (c+d\,x\right )\,b^2\right )}{15\,d} \] Input:
int(cos(c + d*x)^5*(a + b*tan(c + d*x))^2,x)
Output:
(2*(4*a^2*sin(c + d*x) + b^2*sin(c + d*x) + 2*a^2*cos(c + d*x)^2*sin(c + d *x) + (3*a^2*cos(c + d*x)^4*sin(c + d*x))/2 + (b^2*cos(c + d*x)^2*sin(c + d*x))/2 - (3*b^2*cos(c + d*x)^4*sin(c + d*x))/2 - 3*a*b*cos(c + d*x)^5))/( 15*d)
Time = 0.20 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.47 \[ \int \cos ^5(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {-6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a b +12 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a b -6 \cos \left (d x +c \right ) a b +3 \sin \left (d x +c \right )^{5} a^{2}-3 \sin \left (d x +c \right )^{5} b^{2}-10 \sin \left (d x +c \right )^{3} a^{2}+5 \sin \left (d x +c \right )^{3} b^{2}+15 \sin \left (d x +c \right ) a^{2}+6 a b}{15 d} \] Input:
int(cos(d*x+c)^5*(a+b*tan(d*x+c))^2,x)
Output:
( - 6*cos(c + d*x)*sin(c + d*x)**4*a*b + 12*cos(c + d*x)*sin(c + d*x)**2*a *b - 6*cos(c + d*x)*a*b + 3*sin(c + d*x)**5*a**2 - 3*sin(c + d*x)**5*b**2 - 10*sin(c + d*x)**3*a**2 + 5*sin(c + d*x)**3*b**2 + 15*sin(c + d*x)*a**2 + 6*a*b)/(15*d)