Integrand size = 31, antiderivative size = 387 \[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=-\frac {\left (A b^3 (2+n) (3+n) (4+n)-a \left (b^2 B (3+n) (4+n)-2 a (3 a B-A b (4+n))\right )\right ) (a+b \tan (c+d x))^{1+n}}{b^4 d (1+n) (2+n) (3+n) (4+n)}+\frac {(A-i B) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \tan (c+d x)}{a-i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (i a+b) d (1+n)}-\frac {(A+i B) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \tan (c+d x)}{a+i b}\right ) (a+b \tan (c+d x))^{1+n}}{2 (i a-b) d (1+n)}-\frac {\left (b^2 B (3+n) (4+n)-2 a (3 a B-A b (4+n))\right ) \tan (c+d x) (a+b \tan (c+d x))^{1+n}}{b^3 d (2+n) (3+n) (4+n)}-\frac {(3 a B-A b (4+n)) \tan ^2(c+d x) (a+b \tan (c+d x))^{1+n}}{b^2 d (3+n) (4+n)}+\frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{1+n}}{b d (4+n)} \] Output:
-(A*b^3*(2+n)*(3+n)*(4+n)-a*(b^2*B*(3+n)*(4+n)-2*a*(3*B*a-A*b*(4+n))))*(a+ b*tan(d*x+c))^(1+n)/b^4/d/(1+n)/(2+n)/(3+n)/(4+n)+1/2*(A-I*B)*hypergeom([1 , 1+n],[2+n],(a+b*tan(d*x+c))/(a-I*b))*(a+b*tan(d*x+c))^(1+n)/(I*a+b)/d/(1 +n)-1/2*(A+I*B)*hypergeom([1, 1+n],[2+n],(a+b*tan(d*x+c))/(a+I*b))*(a+b*ta n(d*x+c))^(1+n)/(I*a-b)/d/(1+n)-(b^2*B*(3+n)*(4+n)-2*a*(3*B*a-A*b*(4+n)))* tan(d*x+c)*(a+b*tan(d*x+c))^(1+n)/b^3/d/(2+n)/(3+n)/(4+n)-(3*B*a-A*b*(4+n) )*tan(d*x+c)^2*(a+b*tan(d*x+c))^(1+n)/b^2/d/(3+n)/(4+n)+B*tan(d*x+c)^3*(a+ b*tan(d*x+c))^(1+n)/b/d/(4+n)
Time = 4.08 (sec) , antiderivative size = 384, normalized size of antiderivative = 0.99 \[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\frac {(a+b \tan (c+d x))^{1+n} \left (i \left (2 i (a-i b) (a+i b) \left (6 a^3 B-2 a^2 A b (4+n)-a b^2 B (3+n) (4+n)+A b^3 (2+n) (3+n) (4+n)\right )-(a+i b) b^4 (A-i B) \left (24+26 n+9 n^2+n^3\right ) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \tan (c+d x)}{a-i b}\right )+(a-i b) b^4 (A+i B) \left (24+26 n+9 n^2+n^3\right ) \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \tan (c+d x)}{a+i b}\right )\right )+2 (a-i b) (a+i b) b (1+n) \left (6 a^2 B-2 a A b (4+n)-b^2 B (3+n) (4+n)\right ) \tan (c+d x)-2 (a-i b) (a+i b) b^2 (1+n) (2+n) (3 a B-A b (4+n)) \tan ^2(c+d x)+2 (a-i b) (a+i b) b^3 B (1+n) (2+n) (3+n) \tan ^3(c+d x)\right )}{2 (a-i b) (a+i b) b^4 d (1+n) (2+n) (3+n) (4+n)} \] Input:
Integrate[Tan[c + d*x]^4*(a + b*Tan[c + d*x])^n*(A + B*Tan[c + d*x]),x]
Output:
((a + b*Tan[c + d*x])^(1 + n)*(I*((2*I)*(a - I*b)*(a + I*b)*(6*a^3*B - 2*a ^2*A*b*(4 + n) - a*b^2*B*(3 + n)*(4 + n) + A*b^3*(2 + n)*(3 + n)*(4 + n)) - (a + I*b)*b^4*(A - I*B)*(24 + 26*n + 9*n^2 + n^3)*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Tan[c + d*x])/(a - I*b)] + (a - I*b)*b^4*(A + I*B)*(24 + 26*n + 9*n^2 + n^3)*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Tan[c + d *x])/(a + I*b)]) + 2*(a - I*b)*(a + I*b)*b*(1 + n)*(6*a^2*B - 2*a*A*b*(4 + n) - b^2*B*(3 + n)*(4 + n))*Tan[c + d*x] - 2*(a - I*b)*(a + I*b)*b^2*(1 + n)*(2 + n)*(3*a*B - A*b*(4 + n))*Tan[c + d*x]^2 + 2*(a - I*b)*(a + I*b)*b ^3*B*(1 + n)*(2 + n)*(3 + n)*Tan[c + d*x]^3))/(2*(a - I*b)*(a + I*b)*b^4*d *(1 + n)*(2 + n)*(3 + n)*(4 + n))
Time = 2.01 (sec) , antiderivative size = 412, normalized size of antiderivative = 1.06, number of steps used = 18, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.548, Rules used = {3042, 4090, 25, 3042, 4130, 25, 3042, 4130, 25, 3042, 4113, 3042, 4022, 3042, 4020, 25, 78}
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 \tan ^4(c+d x) (A+B \tan (c+d x)) (a+b \tan (c+d x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^4 (A+B \tan (c+d x)) (a+b \tan (c+d x))^ndx\) |
\(\Big \downarrow \) 4090 |
\(\displaystyle \frac {\int -\tan ^2(c+d x) (a+b \tan (c+d x))^n \left ((3 a B-A b (n+4)) \tan ^2(c+d x)+b B (n+4) \tan (c+d x)+3 a B\right )dx}{b (n+4)}+\frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\int \tan ^2(c+d x) (a+b \tan (c+d x))^n \left ((3 a B-A b (n+4)) \tan ^2(c+d x)+b B (n+4) \tan (c+d x)+3 a B\right )dx}{b (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\int \tan (c+d x)^2 (a+b \tan (c+d x))^n \left ((3 a B-A b (n+4)) \tan (c+d x)^2+b B (n+4) \tan (c+d x)+3 a B\right )dx}{b (n+4)}\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\int -\tan (c+d x) (a+b \tan (c+d x))^n \left (-A (n+3) (n+4) \tan (c+d x) b^2+\left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right ) \tan ^2(c+d x)+2 a (3 a B-A b (n+4))\right )dx}{b (n+3)}+\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\int \tan (c+d x) (a+b \tan (c+d x))^n \left (-A (n+3) (n+4) \tan (c+d x) b^2+\left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right ) \tan ^2(c+d x)+2 a (3 a B-A b (n+4))\right )dx}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\int \tan (c+d x) (a+b \tan (c+d x))^n \left (-A (n+3) (n+4) \tan (c+d x) b^2+\left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right ) \tan (c+d x)^2+2 a (3 a B-A b (n+4))\right )dx}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\int -(a+b \tan (c+d x))^n \left (-B (n+2) (n+3) (n+4) \tan (c+d x) b^3+\left (6 B a^3-2 A b (n+4) a^2-b^2 B (n+3) (n+4) a+A b^3 (n+2) (n+3) (n+4)\right ) \tan ^2(c+d x)+a \left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right )\right )dx}{b (n+2)}+\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\int (a+b \tan (c+d x))^n \left (-B (n+2) (n+3) (n+4) \tan (c+d x) b^3+\left (6 B a^3-2 A b (n+4) a^2-b^2 B (n+3) (n+4) a+A b^3 (n+2) (n+3) (n+4)\right ) \tan ^2(c+d x)+a \left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right )\right )dx}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\int (a+b \tan (c+d x))^n \left (-B (n+2) (n+3) (n+4) \tan (c+d x) b^3+\left (6 B a^3-2 A b (n+4) a^2-b^2 B (n+3) (n+4) a+A b^3 (n+2) (n+3) (n+4)\right ) \tan (c+d x)^2+a \left (6 B a^2-2 A b (n+4) a-b^2 B (n+3) (n+4)\right )\right )dx}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 4113 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\int (a+b \tan (c+d x))^n \left (-A (n+2) (n+3) (n+4) b^3-B (n+2) (n+3) (n+4) \tan (c+d x) b^3\right )dx+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\int (a+b \tan (c+d x))^n \left (-A (n+2) (n+3) (n+4) b^3-B (n+2) (n+3) (n+4) \tan (c+d x) b^3\right )dx+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 4022 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {-\frac {1}{2} b^3 (n+2) (n+3) (n+4) (A+i B) \int (1-i \tan (c+d x)) (a+b \tan (c+d x))^ndx-\frac {1}{2} b^3 (n+2) (n+3) (n+4) (A-i B) \int (i \tan (c+d x)+1) (a+b \tan (c+d x))^ndx+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {-\frac {1}{2} b^3 (n+2) (n+3) (n+4) (A+i B) \int (1-i \tan (c+d x)) (a+b \tan (c+d x))^ndx-\frac {1}{2} b^3 (n+2) (n+3) (n+4) (A-i B) \int (i \tan (c+d x)+1) (a+b \tan (c+d x))^ndx+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 4020 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {-\frac {i b^3 (n+2) (n+3) (n+4) (A-i B) \int -\frac {(a+b \tan (c+d x))^n}{1-i \tan (c+d x)}d(i \tan (c+d x))}{2 d}+\frac {i b^3 (n+2) (n+3) (n+4) (A+i B) \int -\frac {(a+b \tan (c+d x))^n}{i \tan (c+d x)+1}d(-i \tan (c+d x))}{2 d}+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\frac {i b^3 (n+2) (n+3) (n+4) (A-i B) \int \frac {(a+b \tan (c+d x))^n}{1-i \tan (c+d x)}d(i \tan (c+d x))}{2 d}-\frac {i b^3 (n+2) (n+3) (n+4) (A+i B) \int \frac {(a+b \tan (c+d x))^n}{i \tan (c+d x)+1}d(-i \tan (c+d x))}{2 d}+\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
\(\Big \downarrow \) 78 |
\(\displaystyle \frac {B \tan ^3(c+d x) (a+b \tan (c+d x))^{n+1}}{b d (n+4)}-\frac {\frac {\tan ^2(c+d x) (3 a B-A b (n+4)) (a+b \tan (c+d x))^{n+1}}{b d (n+3)}-\frac {\frac {\tan (c+d x) \left (6 a^2 B-2 a A b (n+4)-b^2 B (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+2)}-\frac {\frac {\left (6 a^3 B-2 a^2 A b (n+4)-a b^2 B (n+3) (n+4)+A b^3 (n+2) (n+3) (n+4)\right ) (a+b \tan (c+d x))^{n+1}}{b d (n+1)}+\frac {i b^3 (n+2) (n+3) (n+4) (A-i B) (a+b \tan (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \tan (c+d x)}{a-i b}\right )}{2 d (n+1) (a-i b)}-\frac {i b^3 (n+2) (n+3) (n+4) (A+i B) (a+b \tan (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \tan (c+d x)}{a+i b}\right )}{2 d (n+1) (a+i b)}}{b (n+2)}}{b (n+3)}}{b (n+4)}\) |
Input:
Int[Tan[c + d*x]^4*(a + b*Tan[c + d*x])^n*(A + B*Tan[c + d*x]),x]
Output:
(B*Tan[c + d*x]^3*(a + b*Tan[c + d*x])^(1 + n))/(b*d*(4 + n)) - (((3*a*B - A*b*(4 + n))*Tan[c + d*x]^2*(a + b*Tan[c + d*x])^(1 + n))/(b*d*(3 + n)) - (((6*a^2*B - 2*a*A*b*(4 + n) - b^2*B*(3 + n)*(4 + n))*Tan[c + d*x]*(a + b *Tan[c + d*x])^(1 + n))/(b*d*(2 + n)) - (((6*a^3*B - 2*a^2*A*b*(4 + n) - a *b^2*B*(3 + n)*(4 + n) + A*b^3*(2 + n)*(3 + n)*(4 + n))*(a + b*Tan[c + d*x ])^(1 + n))/(b*d*(1 + n)) + ((I/2)*b^3*(A - I*B)*(2 + n)*(3 + n)*(4 + n)*H ypergeometric2F1[1, 1 + n, 2 + n, (a + b*Tan[c + d*x])/(a - I*b)]*(a + b*T an[c + d*x])^(1 + n))/((a - I*b)*d*(1 + n)) - ((I/2)*b^3*(A + I*B)*(2 + n) *(3 + n)*(4 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Tan[c + d*x])/( a + I*b)]*(a + b*Tan[c + d*x])^(1 + n))/((a + I*b)*d*(1 + n)))/(b*(2 + n)) )/(b*(3 + n)))/(b*(4 + n))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b *c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] && !IntegerQ[m] && IntegerQ[n]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f) Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2 Int[(a + b*Tan[e + f*x])^m*( 1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2 Int[(a + b*Tan[e + f*x])^m *(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && !IntegerQ[m]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[b*B*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Ta n[e + f*x])^n*Simp[a^2*A*d*(m + n) - b*B*(b*c*(m - 1) + a*d*(n + 1)) + d*(m + n)*(2*a*A*b + B*(a^2 - b^2))*Tan[e + f*x] - (b*B*(b*c - a*d)*(m - 1) - b *(A*b + a*B)*d*(m + n))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2 , 0] && GtQ[m, 1] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) && !(IGtQ[n, 1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Si mp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && !LeQ[m, -1]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. ) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C *(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ c, 0] && NeQ[a, 0])))
\[\int \tan \left (d x +c \right )^{4} \left (a +b \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )d x\]
Input:
int(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x)
Output:
int(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x)
\[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{4} \,d x } \] Input:
integrate(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x, algorithm="f ricas")
Output:
integral((B*tan(d*x + c)^5 + A*tan(d*x + c)^4)*(b*tan(d*x + c) + a)^n, x)
\[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \left (A + B \tan {\left (c + d x \right )}\right ) \left (a + b \tan {\left (c + d x \right )}\right )^{n} \tan ^{4}{\left (c + d x \right )}\, dx \] Input:
integrate(tan(d*x+c)**4*(a+b*tan(d*x+c))**n*(A+B*tan(d*x+c)),x)
Output:
Integral((A + B*tan(c + d*x))*(a + b*tan(c + d*x))**n*tan(c + d*x)**4, x)
\[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{4} \,d x } \] Input:
integrate(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x, algorithm="m axima")
Output:
integrate((B*tan(d*x + c) + A)*(b*tan(d*x + c) + a)^n*tan(d*x + c)^4, x)
\[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{4} \,d x } \] Input:
integrate(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x, algorithm="g iac")
Output:
integrate((B*tan(d*x + c) + A)*(b*tan(d*x + c) + a)^n*tan(d*x + c)^4, x)
Timed out. \[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^4\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^n \,d x \] Input:
int(tan(c + d*x)^4*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n,x)
Output:
int(tan(c + d*x)^4*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n, x)
\[ \int \tan ^4(c+d x) (a+b \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\left (\int \left (a +\tan \left (d x +c \right ) b \right )^{n} \tan \left (d x +c \right )^{5}d x \right ) b +\left (\int \left (a +\tan \left (d x +c \right ) b \right )^{n} \tan \left (d x +c \right )^{4}d x \right ) a \] Input:
int(tan(d*x+c)^4*(a+b*tan(d*x+c))^n*(A+B*tan(d*x+c)),x)
Output:
int((tan(c + d*x)*b + a)**n*tan(c + d*x)**5,x)*b + int((tan(c + d*x)*b + a )**n*tan(c + d*x)**4,x)*a