Integrand size = 33, antiderivative size = 233 \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\frac {2^{\frac {3}{2}+m} B c \operatorname {AppellF1}\left (\frac {1}{2},1-n,-\frac {1}{2}-m,\frac {3}{2},1-\sec (e+f x),\frac {1}{2} (1-\sec (e+f x))\right ) \sec ^{2-n}(e+f x) (c \sec (e+f x))^{-1+n} (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \sin (e+f x)}{f}+\frac {2^{\frac {1}{2}+m} (A-B) c \operatorname {AppellF1}\left (\frac {1}{2},1-n,\frac {1}{2}-m,\frac {3}{2},1-\sec (e+f x),\frac {1}{2} (1-\sec (e+f x))\right ) \sec ^{2-n}(e+f x) (c \sec (e+f x))^{-1+n} (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \sin (e+f x)}{f} \] Output:
2^(3/2+m)*B*c*AppellF1(1/2,1-n,-1/2-m,3/2,1-sec(f*x+e),1/2-1/2*sec(f*x+e)) *sec(f*x+e)^(2-n)*(c*sec(f*x+e))^(-1+n)*(1+sec(f*x+e))^(-1/2-m)*(a+a*sec(f *x+e))^m*sin(f*x+e)/f+2^(1/2+m)*(A-B)*c*AppellF1(1/2,1-n,1/2-m,3/2,1-sec(f *x+e),1/2-1/2*sec(f*x+e))*sec(f*x+e)^(2-n)*(c*sec(f*x+e))^(-1+n)*(1+sec(f* x+e))^(-1/2-m)*(a+a*sec(f*x+e))^m*sin(f*x+e)/f
Leaf count is larger than twice the leaf count of optimal. \(4897\) vs. \(2(233)=466\).
Time = 20.37 (sec) , antiderivative size = 4897, normalized size of antiderivative = 21.02 \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\text {Result too large to show} \] Input:
Integrate[(c*Sec[e + f*x])^n*(a + a*Sec[e + f*x])^m*(A + B*Sec[e + f*x]),x ]
Output:
(2^(1 + m)*(Sec[(e + f*x)/2]^2)^n*Sec[e + f*x]^(-1 - n)*(c*Sec[e + f*x])^n *(Cos[(e + f*x)/2]^2*Sec[e + f*x])^(m + n)*(a*(1 + Sec[e + f*x]))^m*(A + B *Sec[e + f*x])*(A*Sec[e + f*x]^n*(1 + Sec[e + f*x])^m + B*Sec[e + f*x]^(1 + n)*(1 + Sec[e + f*x])^m)*Tan[(e + f*x)/2]*((-3*A*AppellF1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[e + f*x])/(3*Appell F1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*(( -1 + n)*AppellF1[3/2, m + n, 2 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x )/2]^2] + (m + n)*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) - (B*AppellF1[1/2, 1 + m + n, - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])/(AppellF1[1/2, 1 + m + n , -n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (2*(n*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (1 + m + n)*AppellF1[3/2, 2 + m + n, -n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2 ]^2])*Tan[(e + f*x)/2]^2)/3)))/(f*(B + A*Cos[e + f*x])*(1 + Sec[e + f*x])^ m*(-1 + Tan[(e + f*x)/2]^2)*(-((2^(1 + m)*(Sec[(e + f*x)/2]^2)^(1 + n)*(Co s[(e + f*x)/2]^2*Sec[e + f*x])^(m + n)*Tan[(e + f*x)/2]^2*((-3*A*AppellF1[ 1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[e + f *x])/(3*AppellF1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x )/2]^2] + 2*((-1 + n)*AppellF1[3/2, m + n, 2 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (m + n)*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Ta...
Time = 0.71 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.85, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3042, 4511, 3042, 4315, 3042, 4314, 150}
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)^m (A+B \sec (e+f x)) (c \sec (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^m \left (A+B \csc \left (e+f x+\frac {\pi }{2}\right )\right ) \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4511 |
\(\displaystyle (A-B) \int (c \sec (e+f x))^n (\sec (e+f x) a+a)^mdx+\frac {B \int (c \sec (e+f x))^n (\sec (e+f x) a+a)^{m+1}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^mdx+\frac {B \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{m+1}dx}{a}\) |
\(\Big \downarrow \) 4315 |
\(\displaystyle (A-B) (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int (c \sec (e+f x))^n (\sec (e+f x)+1)^mdx+B (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int (c \sec (e+f x))^n (\sec (e+f x)+1)^{m+1}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )^mdx+B (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )^{m+1}dx\) |
\(\Big \downarrow \) 4314 |
\(\displaystyle -\frac {c (A-B) \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m \int \frac {(c \sec (e+f x))^{n-1} (\sec (e+f x)+1)^{m-\frac {1}{2}}}{\sqrt {1-\sec (e+f x)}}d\sec (e+f x)}{f \sqrt {1-\sec (e+f x)}}-\frac {B c \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m \int \frac {(c \sec (e+f x))^{n-1} (\sec (e+f x)+1)^{m+\frac {1}{2}}}{\sqrt {1-\sec (e+f x)}}d\sec (e+f x)}{f \sqrt {1-\sec (e+f x)}}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle -\frac {(A-B) \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m (c \sec (e+f x))^n \operatorname {AppellF1}\left (n,\frac {1}{2},\frac {1}{2}-m,n+1,\sec (e+f x),-\sec (e+f x)\right )}{f n \sqrt {1-\sec (e+f x)}}-\frac {B \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m (c \sec (e+f x))^n \operatorname {AppellF1}\left (n,\frac {1}{2},-m-\frac {1}{2},n+1,\sec (e+f x),-\sec (e+f x)\right )}{f n \sqrt {1-\sec (e+f x)}}\) |
Input:
Int[(c*Sec[e + f*x])^n*(a + a*Sec[e + f*x])^m*(A + B*Sec[e + f*x]),x]
Output:
-((B*AppellF1[n, 1/2, -1/2 - m, 1 + n, Sec[e + f*x], -Sec[e + f*x]]*(c*Sec [e + f*x])^n*(1 + Sec[e + f*x])^(-1/2 - m)*(a + a*Sec[e + f*x])^m*Tan[e + f*x])/(f*n*Sqrt[1 - Sec[e + f*x]])) - ((A - B)*AppellF1[n, 1/2, 1/2 - m, 1 + n, Sec[e + f*x], -Sec[e + f*x]]*(c*Sec[e + f*x])^n*(1 + Sec[e + f*x])^( -1/2 - m)*(a + a*Sec[e + f*x])^m*Tan[e + f*x])/(f*n*Sqrt[1 - Sec[e + f*x]] )
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^2*d*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x ]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(d*x)^(n - 1)*((a + b*x)^(m - 1/2 )/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^IntPart[m]*((a + b*Csc[e + f*x])^FracPart[m ]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]) Int[(1 + (b/a)*Csc[e + f*x])^m*(d *Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^ 2, 0] && !IntegerQ[m] && !GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(A*b - a*B)/b Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^n, x], x] + Simp[B/b Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b , d, e, f, A, B, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0]
\[\int \left (c \sec \left (f x +e \right )\right )^{n} \left (a +a \sec \left (f x +e \right )\right )^{m} \left (A +B \sec \left (f x +e \right )\right )d x\]
Input:
int((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x)
Output:
int((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x)
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x, algorith m="fricas")
Output:
integral((B*sec(f*x + e) + A)*(a*sec(f*x + e) + a)^m*(c*sec(f*x + e))^n, x )
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int \left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{m} \left (c \sec {\left (e + f x \right )}\right )^{n} \left (A + B \sec {\left (e + f x \right )}\right )\, dx \] Input:
integrate((c*sec(f*x+e))**n*(a+a*sec(f*x+e))**m*(A+B*sec(f*x+e)),x)
Output:
Integral((a*(sec(e + f*x) + 1))**m*(c*sec(e + f*x))**n*(A + B*sec(e + f*x) ), x)
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x, algorith m="maxima")
Output:
integrate((B*sec(f*x + e) + A)*(a*sec(f*x + e) + a)^m*(c*sec(f*x + e))^n, x)
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \] Input:
integrate((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x, algorith m="giac")
Output:
integrate((B*sec(f*x + e) + A)*(a*sec(f*x + e) + a)^m*(c*sec(f*x + e))^n, x)
Timed out. \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int \left (A+\frac {B}{\cos \left (e+f\,x\right )}\right )\,{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m\,{\left (\frac {c}{\cos \left (e+f\,x\right )}\right )}^n \,d x \] Input:
int((A + B/cos(e + f*x))*(a + a/cos(e + f*x))^m*(c/cos(e + f*x))^n,x)
Output:
int((A + B/cos(e + f*x))*(a + a/cos(e + f*x))^m*(c/cos(e + f*x))^n, x)
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=c^{n} \left (\left (\int \sec \left (f x +e \right )^{n} \left (\sec \left (f x +e \right ) a +a \right )^{m} \sec \left (f x +e \right )d x \right ) b +\left (\int \sec \left (f x +e \right )^{n} \left (\sec \left (f x +e \right ) a +a \right )^{m}d x \right ) a \right ) \] Input:
int((c*sec(f*x+e))^n*(a+a*sec(f*x+e))^m*(A+B*sec(f*x+e)),x)
Output:
c**n*(int(sec(e + f*x)**n*(sec(e + f*x)*a + a)**m*sec(e + f*x),x)*b + int( sec(e + f*x)**n*(sec(e + f*x)*a + a)**m,x)*a)