Integrand size = 23, antiderivative size = 244 \[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=-\frac {a^3 (7-4 n) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {2+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{f (2-n) n \sqrt {\sin ^2(e+f x)}}-\frac {a^3 (1-4 n) \cos (e+f x) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{f (1-n) (1+n) \sqrt {\sin ^2(e+f x)}}+\frac {a^3 (5-2 n) (d \cos (e+f x))^n \tan (e+f x)}{f (1-n) (2-n)}+\frac {(d \cos (e+f x))^n \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{f (2-n)} \] Output:
-a^3*(7-4*n)*(d*cos(f*x+e))^n*hypergeom([1/2, 1/2*n],[1+1/2*n],cos(f*x+e)^ 2)*sin(f*x+e)/f/(2-n)/n/(sin(f*x+e)^2)^(1/2)-a^3*(1-4*n)*cos(f*x+e)*(d*cos (f*x+e))^n*hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e) /f/(1-n)/(1+n)/(sin(f*x+e)^2)^(1/2)+a^3*(5-2*n)*(d*cos(f*x+e))^n*tan(f*x+e )/f/(1-n)/(2-n)+(d*cos(f*x+e))^n*(a^3+a^3*sec(f*x+e))*tan(f*x+e)/f/(2-n)
Time = 0.85 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.64 \[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=\frac {a^3 d (d \cos (e+f x))^{-1+n} \left (-n (-7+4 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+n),\frac {n}{2},\cos ^2(e+f x)\right )+(-2+n) \left (-\left ((-1+4 n) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+n),\frac {1+n}{2},\cos ^2(e+f x)\right )\right )+(3 n+(-1+n) \cos (e+f x)) \sqrt {\sin ^2(e+f x)}\right )\right ) \tan (e+f x)}{f (-2+n) (-1+n) n \sqrt {\sin ^2(e+f x)}} \] Input:
Integrate[(d*Cos[e + f*x])^n*(a + a*Sec[e + f*x])^3,x]
Output:
(a^3*d*(d*Cos[e + f*x])^(-1 + n)*(-(n*(-7 + 4*n)*Hypergeometric2F1[1/2, (- 2 + n)/2, n/2, Cos[e + f*x]^2]) + (-2 + n)*(-((-1 + 4*n)*Cos[e + f*x]*Hype rgeometric2F1[1/2, (-1 + n)/2, (1 + n)/2, Cos[e + f*x]^2]) + (3*n + (-1 + n)*Cos[e + f*x])*Sqrt[Sin[e + f*x]^2]))*Tan[e + f*x])/(f*(-2 + n)*(-1 + n) *n*Sqrt[Sin[e + f*x]^2])
Time = 1.33 (sec) , antiderivative size = 278, normalized size of antiderivative = 1.14, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.522, Rules used = {3042, 4752, 3042, 4301, 3042, 4485, 3042, 4274, 3042, 4259, 3042, 3122}
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 (a \sec (e+f x)+a)^3 (d \cos (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3 \left (d \sin \left (e+f x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4752 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int (d \sec (e+f x))^{-n} (\sec (e+f x) a+a)^3dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n} \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^3dx\) |
\(\Big \downarrow \) 4301 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \int (d \sec (e+f x))^{-n} (\sec (e+f x) a+a) (2 a (1-n)+a (5-2 n) \sec (e+f x))dx}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n} \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right ) \left (2 a (1-n)+a (5-2 n) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 4485 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\int (d \sec (e+f x))^{-n} \left ((1-4 n) (2-n) a^2+(7-4 n) (1-n) \sec (e+f x) a^2\right )dx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n} \left ((1-4 n) (2-n) a^2+(7-4 n) (1-n) \csc \left (e+f x+\frac {\pi }{2}\right ) a^2\right )dx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\frac {a^2 (7-4 n) (1-n) \int (d \sec (e+f x))^{1-n}dx}{d}+a^2 (1-4 n) (2-n) \int (d \sec (e+f x))^{-n}dx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\frac {a^2 (7-4 n) (1-n) \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{1-n}dx}{d}+a^2 (1-4 n) (2-n) \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}dx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\frac {a^2 (7-4 n) (1-n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^{n-1}dx}{d}+a^2 (1-4 n) (2-n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^ndx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {a \left (\frac {\frac {a^2 (7-4 n) (1-n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^{n-1}dx}{d}+a^2 (1-4 n) (2-n) \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^ndx}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}+\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {\tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right ) (d \sec (e+f x))^{-n}}{f (2-n)}+\frac {a \left (\frac {-\frac {a^2 d (1-4 n) (2-n) \sin (e+f x) (d \sec (e+f x))^{-n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+1}{2},\frac {n+3}{2},\cos ^2(e+f x)\right )}{f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {a^2 (7-4 n) (1-n) \sin (e+f x) (d \sec (e+f x))^{-n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {n+2}{2},\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}}}{1-n}+\frac {a^2 (5-2 n) \tan (e+f x) (d \sec (e+f x))^{-n}}{f (1-n)}\right )}{2-n}\right )\) |
Input:
Int[(d*Cos[e + f*x])^n*(a + a*Sec[e + f*x])^3,x]
Output:
(d*Cos[e + f*x])^n*(d*Sec[e + f*x])^n*(((a^3 + a^3*Sec[e + f*x])*Tan[e + f *x])/(f*(2 - n)*(d*Sec[e + f*x])^n) + (a*((-((a^2*d*(1 - 4*n)*(2 - n)*Hype rgeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*(d*Sec[e + f*x])^ (-1 - n)*Sin[e + f*x])/(f*(1 + n)*Sqrt[Sin[e + f*x]^2])) - (a^2*(7 - 4*n)* (1 - n)*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Cos[e + f*x]^2]*Sin[e + f*x ])/(f*n*(d*Sec[e + f*x])^n*Sqrt[Sin[e + f*x]^2]))/(1 - n) + (a^2*(5 - 2*n) *Tan[e + f*x])/(f*(1 - n)*(d*Sec[e + f*x])^n)))/(2 - n))
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-b^2)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*((d*Csc[e + f*x])^n/(f*(m + n - 1))), x] + Simp[b/(m + n - 1) Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^n*(b*(m + 2*n - 1) + a*(3*m + 2*n - 4)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^ 2, 0] && GtQ[m, 1] && NeQ[m + n - 1, 0] && IntegerQ[2*m]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[ e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Simp[1/(n + 1) Int[(d*Csc [e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x ], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && !LeQ[ n, -1]
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownSecantIntegrandQ[u, x ]
\[\int \left (d \cos \left (f x +e \right )\right )^{n} \left (a +a \sec \left (f x +e \right )\right )^{3}d x\]
Input:
int((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x)
Output:
int((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x)
\[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{3} \left (d \cos \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x, algorithm="fricas")
Output:
integral((a^3*sec(f*x + e)^3 + 3*a^3*sec(f*x + e)^2 + 3*a^3*sec(f*x + e) + a^3)*(d*cos(f*x + e))^n, x)
\[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=a^{3} \left (\int \left (d \cos {\left (e + f x \right )}\right )^{n}\, dx + \int 3 \left (d \cos {\left (e + f x \right )}\right )^{n} \sec {\left (e + f x \right )}\, dx + \int 3 \left (d \cos {\left (e + f x \right )}\right )^{n} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (d \cos {\left (e + f x \right )}\right )^{n} \sec ^{3}{\left (e + f x \right )}\, dx\right ) \] Input:
integrate((d*cos(f*x+e))**n*(a+a*sec(f*x+e))**3,x)
Output:
a**3*(Integral((d*cos(e + f*x))**n, x) + Integral(3*(d*cos(e + f*x))**n*se c(e + f*x), x) + Integral(3*(d*cos(e + f*x))**n*sec(e + f*x)**2, x) + Inte gral((d*cos(e + f*x))**n*sec(e + f*x)**3, x))
\[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{3} \left (d \cos \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x, algorithm="maxima")
Output:
integrate((a*sec(f*x + e) + a)^3*(d*cos(f*x + e))^n, x)
\[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{3} \left (d \cos \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x, algorithm="giac")
Output:
integrate((a*sec(f*x + e) + a)^3*(d*cos(f*x + e))^n, x)
Timed out. \[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=\int {\left (d\,\cos \left (e+f\,x\right )\right )}^n\,{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \] Input:
int((d*cos(e + f*x))^n*(a + a/cos(e + f*x))^3,x)
Output:
int((d*cos(e + f*x))^n*(a + a/cos(e + f*x))^3, x)
\[ \int (d \cos (e+f x))^n (a+a \sec (e+f x))^3 \, dx=d^{n} a^{3} \left (\int \cos \left (f x +e \right )^{n}d x +\int \cos \left (f x +e \right )^{n} \sec \left (f x +e \right )^{3}d x +3 \left (\int \cos \left (f x +e \right )^{n} \sec \left (f x +e \right )^{2}d x \right )+3 \left (\int \cos \left (f x +e \right )^{n} \sec \left (f x +e \right )d x \right )\right ) \] Input:
int((d*cos(f*x+e))^n*(a+a*sec(f*x+e))^3,x)
Output:
d**n*a**3*(int(cos(e + f*x)**n,x) + int(cos(e + f*x)**n*sec(e + f*x)**3,x) + 3*int(cos(e + f*x)**n*sec(e + f*x)**2,x) + 3*int(cos(e + f*x)**n*sec(e + f*x),x))