Integrand size = 43, antiderivative size = 232 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=-\frac {(8 A+B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{10 a^4 d}+\frac {(17 A+4 B+3 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{42 a^4 d}-\frac {(83 A+B-15 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{210 a^4 d (1+\cos (c+d x))^2}+\frac {(8 A+B) \sqrt {\cos (c+d x)} \sin (c+d x)}{10 a^4 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 d (a+a \cos (c+d x))^4}-\frac {(9 A-2 B-5 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{35 a d (a+a \cos (c+d x))^3} \] Output:
-1/10*(8*A+B)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/a^4/d+1/42*(17*A+4*B+3 *C)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2))/a^4/d-1/210*(83*A+B-15*C)*cos(d *x+c)^(1/2)*sin(d*x+c)/a^4/d/(1+cos(d*x+c))^2+1/10*(8*A+B)*cos(d*x+c)^(1/2 )*sin(d*x+c)/a^4/d/(1+cos(d*x+c))-1/7*(A-B+C)*cos(d*x+c)^(5/2)*sin(d*x+c)/ d/(a+a*cos(d*x+c))^4-1/35*(9*A-2*B-5*C)*cos(d*x+c)^(3/2)*sin(d*x+c)/a/d/(a +a*cos(d*x+c))^3
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 10.02 (sec) , antiderivative size = 1139, normalized size of antiderivative = 4.91 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx =\text {Too large to display} \] Input:
Integrate[(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + a*Sec[c + d*x])^4),x]
Output:
(4*C*Cos[c + d*x]^(3/2)*Csc[c + d*x])/(3*a^4*d*(1 - Cos[c + d*x])*(1 + Cos [c + d*x])) - (2*C*Cos[c + d*x]^(5/2)*Csc[c + d*x])/(a^4*d*(1 - Cos[c + d* x])*(1 + Cos[c + d*x])) + (12*(B - 2*C)*Cos[c + d*x]^(3/2)*Csc[c + d*x]^3) /(7*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (12*(B - 2*C)*Cos[c + d *x]^(5/2)*Csc[c + d*x]^3)/(5*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (2*(B - 2*C)*Cos[c + d*x]^(7/2)*Csc[c + d*x]^3)/(a^4*d*(1 - Cos[c + d*x] )*(1 + Cos[c + d*x])) + (2*(B - 2*C)*Cos[c + d*x]^(9/2)*Csc[c + d*x]^3)/(a ^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) + (64*(A - B + C)*Cos[c + d*x] ^(3/2)*Csc[c + d*x]^5)/(33*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (136*(A - B + C)*Cos[c + d*x]^(5/2)*Csc[c + d*x]^5)/(45*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (64*(A - B + C)*Cos[c + d*x]^(7/2)*Csc[c + d* x]^5)/(21*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) + (14*(A - B + C)*C os[c + d*x]^(9/2)*Csc[c + d*x]^5)/(5*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) + (8*(A - B + C)*Cos[c + d*x]^(11/2)*Csc[c + d*x]^5)/(3*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (2*(A - B + C)*Cos[c + d*x]^(13/2)*Cs c[c + d*x]^5)/(a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (4*C*Cos[c + d*x]^(3/2)*Hypergeometric2F1[3/4, 5/2, 7/4, Cos[c + d*x]^2]*Sin[c + d*x]* Sqrt[Sin[c + d*x]^2])/(3*a^4*d*(1 - Cos[c + d*x])*(1 + Cos[c + d*x])) - (1 2*(B - 2*C)*Cos[c + d*x]^(3/2)*Hypergeometric2F1[3/4, 7/2, 7/4, Cos[c + d* x]^2]*Sin[c + d*x]*Sqrt[Sin[c + d*x]^2])/(7*a^4*d*(1 - Cos[c + d*x])*(1...
Time = 1.70 (sec) , antiderivative size = 253, normalized size of antiderivative = 1.09, number of steps used = 18, number of rules used = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.419, Rules used = {3042, 4600, 3042, 3520, 27, 3042, 3456, 3042, 3456, 27, 3042, 3457, 25, 3042, 3227, 3042, 3119, 3120}
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 \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a \sec (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sec (c+d x)+C \sec (c+d x)^2}{\sqrt {\cos (c+d x)} (a \sec (c+d x)+a)^4}dx\) |
\(\Big \downarrow \) 4600 |
\(\displaystyle \int \frac {\cos ^{\frac {3}{2}}(c+d x) \left (A \cos ^2(c+d x)+B \cos (c+d x)+C\right )}{(a \cos (c+d x)+a)^4}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2} \left (A \sin \left (c+d x+\frac {\pi }{2}\right )^2+B \sin \left (c+d x+\frac {\pi }{2}\right )+C\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3520 |
\(\displaystyle \frac {\int -\frac {\cos ^{\frac {3}{2}}(c+d x) (a (5 A-5 B-9 C)-a (13 A+B-C) \cos (c+d x))}{2 (\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {\cos ^{\frac {3}{2}}(c+d x) (a (5 A-5 B-9 C)-a (13 A+B-C) \cos (c+d x))}{(\cos (c+d x) a+a)^3}dx}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2} \left (a (5 A-5 B-9 C)-a (13 A+B-C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle -\frac {\frac {\int \frac {\sqrt {\cos (c+d x)} \left (3 a^2 (9 A-2 B-5 C)-7 a^2 (8 A+B) \cos (c+d x)\right )}{(\cos (c+d x) a+a)^2}dx}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {\int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \left (3 a^2 (9 A-2 B-5 C)-7 a^2 (8 A+B) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle -\frac {\frac {\frac {\int \frac {a^3 (83 A+B-15 C)-a^3 (253 A+41 B+15 C) \cos (c+d x)}{2 \sqrt {\cos (c+d x)} (\cos (c+d x) a+a)}dx}{3 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\frac {\frac {\int \frac {a^3 (83 A+B-15 C)-a^3 (253 A+41 B+15 C) \cos (c+d x)}{\sqrt {\cos (c+d x)} (\cos (c+d x) a+a)}dx}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {\frac {\int \frac {a^3 (83 A+B-15 C)-a^3 (253 A+41 B+15 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle -\frac {\frac {\frac {\frac {\int -\frac {5 a^4 (17 A+4 B+3 C)-21 a^4 (8 A+B) \cos (c+d x)}{\sqrt {\cos (c+d x)}}dx}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {\frac {-\frac {\int \frac {5 a^4 (17 A+4 B+3 C)-21 a^4 (8 A+B) \cos (c+d x)}{\sqrt {\cos (c+d x)}}dx}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {\frac {-\frac {\int \frac {5 a^4 (17 A+4 B+3 C)-21 a^4 (8 A+B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle -\frac {\frac {\frac {-\frac {5 a^4 (17 A+4 B+3 C) \int \frac {1}{\sqrt {\cos (c+d x)}}dx-21 a^4 (8 A+B) \int \sqrt {\cos (c+d x)}dx}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {\frac {-\frac {5 a^4 (17 A+4 B+3 C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx-21 a^4 (8 A+B) \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle -\frac {\frac {\frac {-\frac {5 a^4 (17 A+4 B+3 C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx-\frac {42 a^4 (8 A+B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}}{a^2}-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle -\frac {\frac {\frac {-\frac {42 a^3 (8 A+B) \sin (c+d x) \sqrt {\cos (c+d x)}}{d (a \cos (c+d x)+a)}-\frac {\frac {10 a^4 (17 A+4 B+3 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}-\frac {42 a^4 (8 A+B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}}{a^2}}{6 a^2}+\frac {(83 A+B-15 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {2 a (9 A-2 B-5 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{14 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
Input:
Int[(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + a*Sec [c + d*x])^4),x]
Output:
-1/7*((A - B + C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x]) ^4) - ((2*a*(9*A - 2*B - 5*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d*(a + a *Cos[c + d*x])^3) + (((83*A + B - 15*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/( 3*d*(1 + Cos[c + d*x])^2) + (-(((-42*a^4*(8*A + B)*EllipticE[(c + d*x)/2, 2])/d + (10*a^4*(17*A + 4*B + 3*C)*EllipticF[(c + d*x)/2, 2])/d)/a^2) - (4 2*a^3*(8*A + B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(d*(a + a*Cos[c + d*x]))) /(6*a^2))/(5*a^2))/(14*a^2)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(a*A - b*B + a*C)*Cos[e + f*x]*(a + b* Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x ] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) + B*(b*c*m + a *d*(n + 1)) - C*(a*c*m + b*d*(n + 1)) + (d*(a*A - b*B)*(m + n + 2) + C*(b*c *(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c ^2 - d^2, 0] && LtQ[m, -2^(-1)]
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x _)])^(m_.)*((A_.) + (B_.)*sec[(e_.) + (f_.)*(x_)] + (C_.)*sec[(e_.) + (f_.) *(x_)]^2), x_Symbol] :> Simp[d^(m + 2) Int[(b + a*Cos[e + f*x])^m*(d*Cos[ e + f*x])^(n - m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; Fr eeQ[{a, b, d, e, f, A, B, C, n}, x] && !IntegerQ[n] && IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(594\) vs. \(2(215)=430\).
Time = 7.05 (sec) , antiderivative size = 595, normalized size of antiderivative = 2.56
method | result | size |
default | \(-\frac {\sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (1344 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+340 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+672 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+168 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+80 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+84 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+60 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}-2684 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-88 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+60 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+1902 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-306 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-30 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-706 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+328 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-90 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+159 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-117 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+75 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-15 A +15 B -15 C \right )}{840 a^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(595\) |
Input:
int((A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c))^4,x, method=_RETURNVERBOSE)
Output:
-1/840*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(1344*A*cos (1/2*d*x+1/2*c)^10+340*A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2* c)^2+1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*cos(1/2*d*x+1/2*c)^7+6 72*A*cos(1/2*d*x+1/2*c)^7*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2 *c)^2+1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+168*B*cos(1/2*d*x+1/2 *c)^10+80*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^2+1)^(1/2) *EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*cos(1/2*d*x+1/2*c)^7+84*B*cos(1/2*d *x+1/2*c)^7*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*cos(1/2*d*x+1/2*c)^2+1)^(1/2) *EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+60*C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*( -2*cos(1/2*d*x+1/2*c)^2+1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*cos (1/2*d*x+1/2*c)^7-2684*A*cos(1/2*d*x+1/2*c)^8-88*B*cos(1/2*d*x+1/2*c)^8+60 *C*cos(1/2*d*x+1/2*c)^8+1902*A*cos(1/2*d*x+1/2*c)^6-306*B*cos(1/2*d*x+1/2* c)^6-30*C*cos(1/2*d*x+1/2*c)^6-706*A*cos(1/2*d*x+1/2*c)^4+328*B*cos(1/2*d* x+1/2*c)^4-90*C*cos(1/2*d*x+1/2*c)^4+159*A*cos(1/2*d*x+1/2*c)^2-117*B*cos( 1/2*d*x+1/2*c)^2+75*C*cos(1/2*d*x+1/2*c)^2-15*A+15*B-15*C)/a^4/cos(1/2*d*x +1/2*c)^7/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x +1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d
Result contains complex when optimal does not.
Time = 0.10 (sec) , antiderivative size = 613, normalized size of antiderivative = 2.64 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx =\text {Too large to display} \] Input:
integrate((A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c) )^4,x, algorithm="fricas")
Output:
1/420*(2*(21*(8*A + B)*cos(d*x + c)^3 + (337*A + 104*B + 15*C)*cos(d*x + c )^2 + (284*A + 73*B + 60*C)*cos(d*x + c) + 85*A + 20*B + 15*C)*sqrt(cos(d* x + c))*sin(d*x + c) - 5*(sqrt(2)*(17*I*A + 4*I*B + 3*I*C)*cos(d*x + c)^4 + 4*sqrt(2)*(17*I*A + 4*I*B + 3*I*C)*cos(d*x + c)^3 + 6*sqrt(2)*(17*I*A + 4*I*B + 3*I*C)*cos(d*x + c)^2 + 4*sqrt(2)*(17*I*A + 4*I*B + 3*I*C)*cos(d*x + c) + sqrt(2)*(17*I*A + 4*I*B + 3*I*C))*weierstrassPInverse(-4, 0, cos(d *x + c) + I*sin(d*x + c)) - 5*(sqrt(2)*(-17*I*A - 4*I*B - 3*I*C)*cos(d*x + c)^4 + 4*sqrt(2)*(-17*I*A - 4*I*B - 3*I*C)*cos(d*x + c)^3 + 6*sqrt(2)*(-1 7*I*A - 4*I*B - 3*I*C)*cos(d*x + c)^2 + 4*sqrt(2)*(-17*I*A - 4*I*B - 3*I*C )*cos(d*x + c) + sqrt(2)*(-17*I*A - 4*I*B - 3*I*C))*weierstrassPInverse(-4 , 0, cos(d*x + c) - I*sin(d*x + c)) - 21*(sqrt(2)*(8*I*A + I*B)*cos(d*x + c)^4 + 4*sqrt(2)*(8*I*A + I*B)*cos(d*x + c)^3 + 6*sqrt(2)*(8*I*A + I*B)*co s(d*x + c)^2 + 4*sqrt(2)*(8*I*A + I*B)*cos(d*x + c) + sqrt(2)*(8*I*A + I*B ))*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin( d*x + c))) - 21*(sqrt(2)*(-8*I*A - I*B)*cos(d*x + c)^4 + 4*sqrt(2)*(-8*I*A - I*B)*cos(d*x + c)^3 + 6*sqrt(2)*(-8*I*A - I*B)*cos(d*x + c)^2 + 4*sqrt( 2)*(-8*I*A - I*B)*cos(d*x + c) + sqrt(2)*(-8*I*A - I*B))*weierstrassZeta(- 4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/(a^4*d*c os(d*x + c)^4 + 4*a^4*d*cos(d*x + c)^3 + 6*a^4*d*cos(d*x + c)^2 + 4*a^4*d* cos(d*x + c) + a^4*d)
Timed out. \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=\text {Timed out} \] Input:
integrate((A+B*sec(d*x+c)+C*sec(d*x+c)**2)/cos(d*x+c)**(1/2)/(a+a*sec(d*x+ c))**4,x)
Output:
Timed out
Timed out. \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=\text {Timed out} \] Input:
integrate((A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c) )^4,x, algorithm="maxima")
Output:
Timed out
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (a \sec \left (d x + c\right ) + a\right )}^{4} \sqrt {\cos \left (d x + c\right )}} \,d x } \] Input:
integrate((A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c) )^4,x, algorithm="giac")
Output:
integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)/((a*sec(d*x + c) + a)^4* sqrt(cos(d*x + c))), x)
Timed out. \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {\cos \left (c+d\,x\right )}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^4} \,d x \] Input:
int((A + B/cos(c + d*x) + C/cos(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a/cos (c + d*x))^4),x)
Output:
int((A + B/cos(c + d*x) + C/cos(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a/cos (c + d*x))^4), x)
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+a \sec (c+d x))^4} \, dx=\frac {\left (\int \frac {\sqrt {\cos \left (d x +c \right )}}{\cos \left (d x +c \right ) \sec \left (d x +c \right )^{4}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{3}+6 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )+\cos \left (d x +c \right )}d x \right ) a +\left (\int \frac {\sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )^{2}}{\cos \left (d x +c \right ) \sec \left (d x +c \right )^{4}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{3}+6 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )+\cos \left (d x +c \right )}d x \right ) c +\left (\int \frac {\sqrt {\cos \left (d x +c \right )}\, \sec \left (d x +c \right )}{\cos \left (d x +c \right ) \sec \left (d x +c \right )^{4}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{3}+6 \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}+4 \cos \left (d x +c \right ) \sec \left (d x +c \right )+\cos \left (d x +c \right )}d x \right ) b}{a^{4}} \] Input:
int((A+B*sec(d*x+c)+C*sec(d*x+c)^2)/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c))^4,x)
Output:
(int(sqrt(cos(c + d*x))/(cos(c + d*x)*sec(c + d*x)**4 + 4*cos(c + d*x)*sec (c + d*x)**3 + 6*cos(c + d*x)*sec(c + d*x)**2 + 4*cos(c + d*x)*sec(c + d*x ) + cos(c + d*x)),x)*a + int((sqrt(cos(c + d*x))*sec(c + d*x)**2)/(cos(c + d*x)*sec(c + d*x)**4 + 4*cos(c + d*x)*sec(c + d*x)**3 + 6*cos(c + d*x)*se c(c + d*x)**2 + 4*cos(c + d*x)*sec(c + d*x) + cos(c + d*x)),x)*c + int((sq rt(cos(c + d*x))*sec(c + d*x))/(cos(c + d*x)*sec(c + d*x)**4 + 4*cos(c + d *x)*sec(c + d*x)**3 + 6*cos(c + d*x)*sec(c + d*x)**2 + 4*cos(c + d*x)*sec( c + d*x) + cos(c + d*x)),x)*b)/a**4