Integrand size = 31, antiderivative size = 289 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\frac {(A b-3 a B) \text {arctanh}(\sin (c+d x))}{b^4 d}-\frac {a \left (2 a^4 A b-5 a^2 A b^3+6 A b^5-6 a^5 B+15 a^3 b^2 B-12 a b^4 B\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} b^4 (a+b)^{5/2} d}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \tan (c+d x)}{2 b^3 \left (a^2-b^2\right ) d}+\frac {a (A b-a B) \sec ^2(c+d x) \tan (c+d x)}{2 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^2 A b-4 A b^3-3 a^3 B+6 a b^2 B\right ) \tan (c+d x)}{2 b^3 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))} \] Output:
(A*b-3*B*a)*arctanh(sin(d*x+c))/b^4/d-a*(2*A*a^4*b-5*A*a^2*b^3+6*A*b^5-6*B *a^5+15*B*a^3*b^2-12*B*a*b^4)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b) ^(1/2))/(a-b)^(5/2)/b^4/(a+b)^(5/2)/d-1/2*(A*a*b-3*B*a^2+2*B*b^2)*tan(d*x+ c)/b^3/(a^2-b^2)/d+1/2*a*(A*b-B*a)*sec(d*x+c)^2*tan(d*x+c)/b/(a^2-b^2)/d/( a+b*sec(d*x+c))^2-1/2*a^2*(A*a^2*b-4*A*b^3-3*B*a^3+6*B*a*b^2)*tan(d*x+c)/b ^3/(a^2-b^2)^2/d/(a+b*sec(d*x+c))
Time = 6.97 (sec) , antiderivative size = 418, normalized size of antiderivative = 1.45 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\frac {a \left (2 a^4 A b-5 a^2 A b^3+6 A b^5-6 a^5 B+15 a^3 b^2 B-12 a b^4 B\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^4 \sqrt {a^2-b^2} \left (-a^2+b^2\right )^2 d}+\frac {(-A b+3 a B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^4 d}+\frac {(A b-3 a B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^4 d}+\frac {B \sin \left (\frac {1}{2} (c+d x)\right )}{b^3 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {B \sin \left (\frac {1}{2} (c+d x)\right )}{b^3 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {a^2 A b \sin (c+d x)-a^3 B \sin (c+d x)}{2 b^2 (-a+b) (a+b) d (b+a \cos (c+d x))^2}+\frac {-2 a^4 A b \sin (c+d x)+5 a^2 A b^3 \sin (c+d x)+4 a^5 B \sin (c+d x)-7 a^3 b^2 B \sin (c+d x)}{2 b^3 (-a+b)^2 (a+b)^2 d (b+a \cos (c+d x))} \] Input:
Integrate[(Sec[c + d*x]^4*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^3,x]
Output:
(a*(2*a^4*A*b - 5*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 15*a^3*b^2*B - 12*a*b^4* B)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b ^2]*(-a^2 + b^2)^2*d) + ((-(A*b) + 3*a*B)*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]])/(b^4*d) + ((A*b - 3*a*B)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2] ])/(b^4*d) + (B*Sin[(c + d*x)/2])/(b^3*d*(Cos[(c + d*x)/2] - Sin[(c + d*x) /2])) + (B*Sin[(c + d*x)/2])/(b^3*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])) + (a^2*A*b*Sin[c + d*x] - a^3*B*Sin[c + d*x])/(2*b^2*(-a + b)*(a + b)*d*( b + a*Cos[c + d*x])^2) + (-2*a^4*A*b*Sin[c + d*x] + 5*a^2*A*b^3*Sin[c + d* x] + 4*a^5*B*Sin[c + d*x] - 7*a^3*b^2*B*Sin[c + d*x])/(2*b^3*(-a + b)^2*(a + b)^2*d*(b + a*Cos[c + d*x]))
Time = 2.04 (sec) , antiderivative size = 326, normalized size of antiderivative = 1.13, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.452, Rules used = {3042, 4517, 3042, 4578, 3042, 4570, 3042, 4486, 3042, 4257, 4318, 3042, 3138, 221}
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 {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^4 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4517 |
\(\displaystyle \frac {\int \frac {\sec ^2(c+d x) \left (-\left (\left (-3 B a^2+A b a+2 b^2 B\right ) \sec ^2(c+d x)\right )-2 b (A b-a B) \sec (c+d x)+2 a (A b-a B)\right )}{(a+b \sec (c+d x))^2}dx}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (\left (3 B a^2-A b a-2 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2-2 b (A b-a B) \csc \left (c+d x+\frac {\pi }{2}\right )+2 a (A b-a B)\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 4578 |
\(\displaystyle \frac {\frac {\int \frac {\sec (c+d x) \left (-b \left (a^2-b^2\right ) \left (-3 B a^2+A b a+2 b^2 B\right ) \sec ^2(c+d x)+\left (a^2-b^2\right ) \left (-3 B a^3+A b a^2+4 b^2 B a-2 A b^3\right ) \sec (c+d x)+a b \left (-3 B a^3+A b a^2+6 b^2 B a-4 A b^3\right )\right )}{a+b \sec (c+d x)}dx}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (-b \left (a^2-b^2\right ) \left (-3 B a^2+A b a+2 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (a^2-b^2\right ) \left (-3 B a^3+A b a^2+4 b^2 B a-2 A b^3\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+a b \left (-3 B a^3+A b a^2+6 b^2 B a-4 A b^3\right )\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 4570 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\sec (c+d x) \left (a \left (-3 B a^3+A b a^2+6 b^2 B a-4 A b^3\right ) b^2+2 \left (a^2-b^2\right )^2 (A b-3 a B) \sec (c+d x) b\right )}{a+b \sec (c+d x)}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a \left (-3 B a^3+A b a^2+6 b^2 B a-4 A b^3\right ) b^2+2 \left (a^2-b^2\right )^2 (A b-3 a B) \csc \left (c+d x+\frac {\pi }{2}\right ) b\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 4486 |
\(\displaystyle \frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \int \sec (c+d x)dx-a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \text {arctanh}(\sin (c+d x))}{d}-a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \text {arctanh}(\sin (c+d x))}{d}-\frac {a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{b}}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \text {arctanh}(\sin (c+d x))}{d}-\frac {a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{b}}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d}}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x) \sec ^2(c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}+\frac {\frac {\frac {\frac {2 \left (a^2-b^2\right )^2 (A b-3 a B) \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a \left (-6 a^5 B+2 a^4 A b+15 a^3 b^2 B-5 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b}}}{b}-\frac {\left (a^2-b^2\right ) \left (-3 a^2 B+a A b+2 b^2 B\right ) \tan (c+d x)}{d}}{b^2 \left (a^2-b^2\right )}-\frac {a^2 \left (-3 a^3 B+a^2 A b+6 a b^2 B-4 A b^3\right ) \tan (c+d x)}{b^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 b \left (a^2-b^2\right )}\) |
Input:
Int[(Sec[c + d*x]^4*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^3,x]
Output:
(a*(A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[ c + d*x])^2) + (-((a^2*(a^2*A*b - 4*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Tan[c + d *x])/(b^2*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))) + (((2*(a^2 - b^2)^2*(A*b - 3*a*B)*ArcTanh[Sin[c + d*x]])/d - (2*a*(2*a^4*A*b - 5*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 15*a^3*b^2*B - 12*a*b^4*B)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x) /2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*d))/b - ((a^2 - b^2)*(a*A*b - 3*a^2*B + 2*b^2*B)*Tan[c + d*x])/d)/(b^2*(a^2 - b^2)))/(2*b*(a^2 - b^2))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b Int[Csc[e + f*x], x], x] + Simp[(A*b - a*B)/b Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x ] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 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*d^2*( A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^(n - 2)/(b*f*(m + 1)*(a^2 - b^2))), x] - Simp[d/(b*(m + 1)*(a^2 - b^2)) Int[( a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 2)*Simp[a*d*(A*b - a*B)*( n - 2) + b*d*(A*b - a*B)*(m + 1)*Csc[e + f*x] - (a*A*b*d*(m + n) - d*B*(a^2 *(n - 1) + b^2*(m + 1)))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f , A, B}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[ n, 1]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e _.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) )), x] + Simp[1/(b*(m + 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[csc[(e_.) + (f_.)*(x_)]^2*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[ (e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x _Symbol] :> Simp[a*(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*((a + b*Csc[e + f*x ])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - Simp[1/(b^2*(m + 1)*(a^2 - b^ 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[b*(m + 1)*((-a)*(b *B - a*C) + A*b^2) + (b*B*(a^2 + b^2*(m + 1)) - a*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Csc[e + f*x] - b*C*(m + 1)*(a^2 - b^2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1 ]
Time = 1.19 (sec) , antiderivative size = 380, normalized size of antiderivative = 1.31
method | result | size |
derivativedivides | \(\frac {-\frac {B}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (A b -3 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{4}}+\frac {2 a \left (\frac {\frac {\left (2 A \,a^{2} b -A a \,b^{2}-6 A \,b^{3}-4 B \,a^{3}+B \,a^{2} b +8 B a \,b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {b a \left (2 A \,a^{2} b +A a \,b^{2}-6 A \,b^{3}-4 B \,a^{3}-B \,a^{2} b +8 B a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (2 A \,a^{4} b -5 A \,a^{2} b^{3}+6 A \,b^{5}-6 B \,a^{5}+15 B \,a^{3} b^{2}-12 B a \,b^{4}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4}}-\frac {B}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-A b +3 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{4}}}{d}\) | \(380\) |
default | \(\frac {-\frac {B}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (A b -3 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{4}}+\frac {2 a \left (\frac {\frac {\left (2 A \,a^{2} b -A a \,b^{2}-6 A \,b^{3}-4 B \,a^{3}+B \,a^{2} b +8 B a \,b^{2}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {b a \left (2 A \,a^{2} b +A a \,b^{2}-6 A \,b^{3}-4 B \,a^{3}-B \,a^{2} b +8 B a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (2 A \,a^{4} b -5 A \,a^{2} b^{3}+6 A \,b^{5}-6 B \,a^{5}+15 B \,a^{3} b^{2}-12 B a \,b^{4}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4}}-\frac {B}{b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-A b +3 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{4}}}{d}\) | \(380\) |
risch | \(\text {Expression too large to display}\) | \(1691\) |
Input:
int(sec(d*x+c)^4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^3,x,method=_RETURNVERBO SE)
Output:
1/d*(-B/b^3/(tan(1/2*d*x+1/2*c)+1)+(A*b-3*B*a)/b^4*ln(tan(1/2*d*x+1/2*c)+1 )+2*a/b^4*((1/2*(2*A*a^2*b-A*a*b^2-6*A*b^3-4*B*a^3+B*a^2*b+8*B*a*b^2)*a*b/ (a-b)/(a^2+2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3-1/2*b*a*(2*A*a^2*b+A*a*b^2-6*A* b^3-4*B*a^3-B*a^2*b+8*B*a*b^2)/(a+b)/(a-b)^2*tan(1/2*d*x+1/2*c))/(tan(1/2* d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)^2-1/2*(2*A*a^4*b-5*A*a^2*b^3+6* A*b^5-6*B*a^5+15*B*a^3*b^2-12*B*a*b^4)/(a^4-2*a^2*b^2+b^4)/((a+b)*(a-b))^( 1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))-B/b^3/(tan(1/2 *d*x+1/2*c)-1)+1/b^4*(-A*b+3*B*a)*ln(tan(1/2*d*x+1/2*c)-1))
Leaf count of result is larger than twice the leaf count of optimal. 1026 vs. \(2 (277) = 554\).
Time = 25.59 (sec) , antiderivative size = 2111, normalized size of antiderivative = 7.30 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \] Input:
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^3,x, algorithm="f ricas")
Output:
[-1/4*(((6*B*a^8 - 2*A*a^7*b - 15*B*a^6*b^2 + 5*A*a^5*b^3 + 12*B*a^4*b^4 - 6*A*a^3*b^5)*cos(d*x + c)^3 + 2*(6*B*a^7*b - 2*A*a^6*b^2 - 15*B*a^5*b^3 + 5*A*a^4*b^4 + 12*B*a^3*b^5 - 6*A*a^2*b^6)*cos(d*x + c)^2 + (6*B*a^6*b^2 - 2*A*a^5*b^3 - 15*B*a^4*b^4 + 5*A*a^3*b^5 + 12*B*a^2*b^6 - 6*A*a*b^7)*cos( d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2 )/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) + 2*((3*B*a^9 - A*a^8*b - 9*B*a^7*b^2 + 3*A*a^6*b^3 + 9*B*a^5*b^4 - 3*A*a^4*b^5 - 3*B*a^3*b^6 + A *a^2*b^7)*cos(d*x + c)^3 + 2*(3*B*a^8*b - A*a^7*b^2 - 9*B*a^6*b^3 + 3*A*a^ 5*b^4 + 9*B*a^4*b^5 - 3*A*a^3*b^6 - 3*B*a^2*b^7 + A*a*b^8)*cos(d*x + c)^2 + (3*B*a^7*b^2 - A*a^6*b^3 - 9*B*a^5*b^4 + 3*A*a^4*b^5 + 9*B*a^3*b^6 - 3*A *a^2*b^7 - 3*B*a*b^8 + A*b^9)*cos(d*x + c))*log(sin(d*x + c) + 1) - 2*((3* B*a^9 - A*a^8*b - 9*B*a^7*b^2 + 3*A*a^6*b^3 + 9*B*a^5*b^4 - 3*A*a^4*b^5 - 3*B*a^3*b^6 + A*a^2*b^7)*cos(d*x + c)^3 + 2*(3*B*a^8*b - A*a^7*b^2 - 9*B*a ^6*b^3 + 3*A*a^5*b^4 + 9*B*a^4*b^5 - 3*A*a^3*b^6 - 3*B*a^2*b^7 + A*a*b^8)* cos(d*x + c)^2 + (3*B*a^7*b^2 - A*a^6*b^3 - 9*B*a^5*b^4 + 3*A*a^4*b^5 + 9* B*a^3*b^6 - 3*A*a^2*b^7 - 3*B*a*b^8 + A*b^9)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2*(2*B*a^6*b^3 - 6*B*a^4*b^5 + 6*B*a^2*b^7 - 2*B*b^9 + (6*B*a^8* b - 2*A*a^7*b^2 - 17*B*a^6*b^3 + 7*A*a^5*b^4 + 13*B*a^4*b^5 - 5*A*a^3*b^6 - 2*B*a^2*b^7)*cos(d*x + c)^2 + (9*B*a^7*b^2 - 3*A*a^6*b^3 - 25*B*a^5*b...
\[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \] Input:
integrate(sec(d*x+c)**4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))**3,x)
Output:
Integral((A + B*sec(c + d*x))*sec(c + d*x)**4/(a + b*sec(c + d*x))**3, x)
Exception generated. \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^3,x, algorithm="m axima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 581 vs. \(2 (277) = 554\).
Time = 0.26 (sec) , antiderivative size = 581, normalized size of antiderivative = 2.01 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx =\text {Too large to display} \] Input:
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^3,x, algorithm="g iac")
Output:
((6*B*a^6 - 2*A*a^5*b - 15*B*a^4*b^2 + 5*A*a^3*b^3 + 12*B*a^2*b^4 - 6*A*a* b^5)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/ 2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^4*b^4 - 2* a^2*b^6 + b^8)*sqrt(-a^2 + b^2)) - (4*B*a^6*tan(1/2*d*x + 1/2*c)^3 - 2*A*a ^5*b*tan(1/2*d*x + 1/2*c)^3 - 5*B*a^5*b*tan(1/2*d*x + 1/2*c)^3 + 3*A*a^4*b ^2*tan(1/2*d*x + 1/2*c)^3 - 7*B*a^4*b^2*tan(1/2*d*x + 1/2*c)^3 + 5*A*a^3*b ^3*tan(1/2*d*x + 1/2*c)^3 + 8*B*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 - 6*A*a^2*b ^4*tan(1/2*d*x + 1/2*c)^3 - 4*B*a^6*tan(1/2*d*x + 1/2*c) + 2*A*a^5*b*tan(1 /2*d*x + 1/2*c) - 5*B*a^5*b*tan(1/2*d*x + 1/2*c) + 3*A*a^4*b^2*tan(1/2*d*x + 1/2*c) + 7*B*a^4*b^2*tan(1/2*d*x + 1/2*c) - 5*A*a^3*b^3*tan(1/2*d*x + 1 /2*c) + 8*B*a^3*b^3*tan(1/2*d*x + 1/2*c) - 6*A*a^2*b^4*tan(1/2*d*x + 1/2*c ))/((a^4*b^3 - 2*a^2*b^5 + b^7)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)^2) - (3*B*a - A*b)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/ b^4 + (3*B*a - A*b)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^4 - 2*B*tan(1/2*d *x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*b^3))/d
Time = 23.64 (sec) , antiderivative size = 9286, normalized size of antiderivative = 32.13 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \] Input:
int((A + B/cos(c + d*x))/(cos(c + d*x)^4*(a + b/cos(c + d*x))^3),x)
Output:
((tan(c/2 + (d*x)/2)^5*(6*B*a^5 - 2*B*b^5 + 6*A*a^2*b^3 + A*a^3*b^2 + 4*B* a^2*b^3 - 12*B*a^3*b^2 - 2*A*a^4*b + 2*B*a*b^4 - 3*B*a^4*b))/((a*b^3 - b^4 )*(a + b)^2) + (tan(c/2 + (d*x)/2)*(6*B*a^5 + 2*B*b^5 + 6*A*a^2*b^3 - A*a^ 3*b^2 - 4*B*a^2*b^3 - 12*B*a^3*b^2 - 2*A*a^4*b + 2*B*a*b^4 + 3*B*a^4*b))/( (a + b)*(b^5 - 2*a*b^4 + a^2*b^3)) - (2*tan(c/2 + (d*x)/2)^3*(6*B*a^6 - 2* B*b^6 + 5*A*a^3*b^3 + 6*B*a^2*b^4 - 13*B*a^4*b^2 - 2*A*a^5*b))/(b*(a*b^2 - b^3)*(a + b)^2*(a - b)))/(d*(2*a*b - tan(c/2 + (d*x)/2)^2*(2*a*b + 3*a^2 - b^2) - tan(c/2 + (d*x)/2)^6*(a^2 - 2*a*b + b^2) + a^2 + b^2 - tan(c/2 + (d*x)/2)^4*(2*a*b - 3*a^2 + b^2))) + (atan(((((8*tan(c/2 + (d*x)/2)*(4*A^2 *b^12 + 72*B^2*a^12 - 8*A^2*a*b^11 - 72*B^2*a^11*b + 24*A^2*a^2*b^10 + 32* A^2*a^3*b^9 - 52*A^2*a^4*b^8 - 48*A^2*a^5*b^7 + 57*A^2*a^6*b^6 + 32*A^2*a^ 7*b^5 - 32*A^2*a^8*b^4 - 8*A^2*a^9*b^3 + 8*A^2*a^10*b^2 + 36*B^2*a^2*b^10 - 72*B^2*a^3*b^9 + 36*B^2*a^4*b^8 + 288*B^2*a^5*b^7 - 288*B^2*a^6*b^6 - 43 2*B^2*a^7*b^5 + 441*B^2*a^8*b^4 + 288*B^2*a^9*b^3 - 288*B^2*a^10*b^2 - 24* A*B*a*b^11 - 48*A*B*a^11*b + 48*A*B*a^2*b^10 - 72*A*B*a^3*b^9 - 192*A*B*a^ 4*b^8 + 252*A*B*a^5*b^7 + 288*A*B*a^6*b^6 - 318*A*B*a^7*b^5 - 192*A*B*a^8* b^4 + 192*A*B*a^9*b^3 + 48*A*B*a^10*b^2))/(a*b^12 + b^13 - 3*a^2*b^11 - 3* a^3*b^10 + 3*a^4*b^9 + 3*a^5*b^8 - a^6*b^7 - a^7*b^6) + (((8*(4*A*b^18 - 8 *A*a^2*b^16 + 34*A*a^3*b^15 + 6*A*a^4*b^14 - 36*A*a^5*b^13 - 4*A*a^6*b^12 + 18*A*a^7*b^11 + 2*A*a^8*b^10 - 4*A*a^9*b^9 + 24*B*a^2*b^16 + 36*B*a^3...
Time = 0.17 (sec) , antiderivative size = 977, normalized size of antiderivative = 3.38 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^3} \, dx =\text {Too large to display} \] Input:
int(sec(d*x+c)^4*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^3,x)
Output:
(4*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqr t( - a**2 + b**2))*cos(c + d*x)*a**4*b - 6*sqrt( - a**2 + b**2)*atan((tan( (c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*cos(c + d*x)*a* *2*b**3 - 4*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/ 2)*b)/sqrt( - a**2 + b**2))*sin(c + d*x)**2*a**5 + 6*sqrt( - a**2 + b**2)* atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*sin(c + d*x)**2*a**3*b**2 + 4*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - t an((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a**5 - 6*sqrt( - a**2 + b**2)*ata n((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a**3*b** 2 + 2*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*a**5*b - 4*cos(c + d*x)*log(t an((c + d*x)/2) - 1)*a**3*b**3 + 2*cos(c + d*x)*log(tan((c + d*x)/2) - 1)* a*b**5 - 2*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*a**5*b + 4*cos(c + d*x)* log(tan((c + d*x)/2) + 1)*a**3*b**3 - 2*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*a*b**5 + 2*cos(c + d*x)*sin(c + d*x)*a**5*b - 3*cos(c + d*x)*sin(c + d*x)*a**3*b**3 + cos(c + d*x)*sin(c + d*x)*a*b**5 - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**6 + 4*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a **4*b**2 - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**2*b**4 + 2*log(t an((c + d*x)/2) - 1)*a**6 - 4*log(tan((c + d*x)/2) - 1)*a**4*b**2 + 2*log( tan((c + d*x)/2) - 1)*a**2*b**4 + 2*log(tan((c + d*x)/2) + 1)*sin(c + d*x) **2*a**6 - 4*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**4*b**2 + 2*lo...