Integrand size = 28, antiderivative size = 54 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C x}{2}+\frac {B \sin (c+d x)}{d}+\frac {C \cos (c+d x) \sin (c+d x)}{2 d}-\frac {B \sin ^3(c+d x)}{3 d} \] Output:
1/2*C*x+B*sin(d*x+c)/d+1/2*C*cos(d*x+c)*sin(d*x+c)/d-1/3*B*sin(d*x+c)^3/d
Time = 0.04 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.06 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C (c+d x)}{2 d}+\frac {B \sin (c+d x)}{d}-\frac {B \sin ^3(c+d x)}{3 d}+\frac {C \sin (2 (c+d x))}{4 d} \] Input:
Integrate[Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
(C*(c + d*x))/(2*d) + (B*Sin[c + d*x])/d - (B*Sin[c + d*x]^3)/(3*d) + (C*S in[2*(c + d*x)])/(4*d)
Time = 0.32 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4535, 27, 3042, 3113, 2009, 3115, 24}
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 ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle B \int \cos ^3(c+d x)dx+\int C \cos ^2(c+d x)dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle B \int \cos ^3(c+d x)dx+C \int \cos ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx+C \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle C \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {B \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle C \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {B \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle C \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {B \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle C \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {B \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\) |
Input:
Int[Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
Output:
C*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)) - (B*(-Sin[c + d*x] + Sin[c + d*x]^3/3))/d
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Time = 0.27 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.81
method | result | size |
parallelrisch | \(\frac {6 d x C +B \sin \left (3 d x +3 c \right )+9 B \sin \left (d x +c \right )+3 \sin \left (2 d x +2 c \right ) C}{12 d}\) | \(44\) |
risch | \(\frac {C x}{2}+\frac {3 B \sin \left (d x +c \right )}{4 d}+\frac {B \sin \left (3 d x +3 c \right )}{12 d}+\frac {\sin \left (2 d x +2 c \right ) C}{4 d}\) | \(48\) |
derivativedivides | \(\frac {\frac {B \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(49\) |
default | \(\frac {\frac {B \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(49\) |
norman | \(\frac {C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (2 B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {C x}{2}-\frac {4 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {4 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}+\frac {2 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {3 C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {3 C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}+\frac {C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{2}-\frac {\left (2 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) | \(203\) |
Input:
int(cos(d*x+c)^4*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/12*(6*d*x*C+B*sin(3*d*x+3*c)+9*B*sin(d*x+c)+3*sin(2*d*x+2*c)*C)/d
Time = 0.08 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.78 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, C d x + {\left (2 \, B \cos \left (d x + c\right )^{2} + 3 \, C \cos \left (d x + c\right ) + 4 \, B\right )} \sin \left (d x + c\right )}{6 \, d} \] Input:
integrate(cos(d*x+c)^4*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas" )
Output:
1/6*(3*C*d*x + (2*B*cos(d*x + c)^2 + 3*C*cos(d*x + c) + 4*B)*sin(d*x + c)) /d
\[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (B + C \sec {\left (c + d x \right )}\right ) \cos ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**4*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)
Output:
Integral((B + C*sec(c + d*x))*cos(c + d*x)**4*sec(c + d*x), x)
Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.85 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C}{12 \, d} \] Input:
integrate(cos(d*x+c)^4*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima" )
Output:
-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*B - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*C)/d
Leaf count of result is larger than twice the leaf count of optimal. 98 vs. \(2 (48) = 96\).
Time = 0.31 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.81 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (d x + c\right )} C + \frac {2 \, {\left (6 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \] Input:
integrate(cos(d*x+c)^4*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
Output:
1/6*(3*(d*x + c)*C + 2*(6*B*tan(1/2*d*x + 1/2*c)^5 - 3*C*tan(1/2*d*x + 1/2 *c)^5 + 4*B*tan(1/2*d*x + 1/2*c)^3 + 6*B*tan(1/2*d*x + 1/2*c) + 3*C*tan(1/ 2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 12.17 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.02 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,x}{2}+\frac {2\,B\,\sin \left (c+d\,x\right )}{3\,d}+\frac {C\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {B\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \] Input:
int(cos(c + d*x)^4*(B/cos(c + d*x) + C/cos(c + d*x)^2),x)
Output:
(C*x)/2 + (2*B*sin(c + d*x))/(3*d) + (C*cos(c + d*x)*sin(c + d*x))/(2*d) + (B*cos(c + d*x)^2*sin(c + d*x))/(3*d)
Time = 0.15 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.85 \[ \int \cos ^4(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \cos \left (d x +c \right ) \sin \left (d x +c \right ) c -2 \sin \left (d x +c \right )^{3} b +6 \sin \left (d x +c \right ) b +3 c d x}{6 d} \] Input:
int(cos(d*x+c)^4*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)
Output:
(3*cos(c + d*x)*sin(c + d*x)*c - 2*sin(c + d*x)**3*b + 6*sin(c + d*x)*b + 3*c*d*x)/(6*d)