Integrand size = 45, antiderivative size = 597 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=-\frac {\left (a^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x}{\left (a^2+b^2\right )^3}-\frac {\left (3 a^2 b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^3 f}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-3 a^2 b^4 \left (c^2 C+2 B c d-2 C d^2-A \left (c^2-d^2\right )\right )+b^6 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )-a^3 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+3 a b^5 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b^3 \left (a^2+b^2\right )^3 f}-\frac {(b c-a d) \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right )}{b^3 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2} \] Output:
-(a^3*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))-3*a*b^2*(c^2*C+2*B*c*d-C*d^2-A*(c^ 2-d^2))-3*a^2*b*(2*c*(A-C)*d+B*(c^2-d^2))+b^3*(2*c*(A-C)*d+B*(c^2-d^2)))*x /(a^2+b^2)^3-(3*a^2*b*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))-b^3*(c^2*C+2*B*c*d -C*d^2-A*(c^2-d^2))+a^3*(2*c*(A-C)*d+B*(c^2-d^2))-3*a*b^2*(2*c*(A-C)*d+B*( c^2-d^2)))*ln(cos(f*x+e))/(a^2+b^2)^3/f+(a^6*C*d^2+3*a^4*b^2*C*d^2-3*a^2*b ^4*(c^2*C+2*B*c*d-2*C*d^2-A*(c^2-d^2))+b^6*(c*(2*B*d+C*c)-A*(c^2-d^2))-a^3 *b^3*(2*c*(A-C)*d+B*(c^2-d^2))+3*a*b^5*(2*c*(A-C)*d+B*(c^2-d^2)))*ln(a+b*t an(f*x+e))/b^3/(a^2+b^2)^3/f-(-a*d+b*c)*(a^4*C*d+b^4*(A*d+B*c)+2*a*b^3*(A* c-B*d-C*c)-a^2*b^2*(B*c+(A-3*C)*d))/b^3/(a^2+b^2)^2/f/(a+b*tan(f*x+e))-1/2 *(A*b^2-a*(B*b-C*a))*(c+d*tan(f*x+e))^2/b/(a^2+b^2)/f/(a+b*tan(f*x+e))^2
Result contains complex when optimal does not.
Time = 5.27 (sec) , antiderivative size = 403, normalized size of antiderivative = 0.68 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\frac {(a-i b)^3 (-i A+B+i C) (c+i d)^2 \log (i-\tan (e+f x))+(a+i b)^3 (i A+B-i C) (c-i d)^2 \log (i+\tan (e+f x))+\frac {2 \left (a^6 C d^2+3 a^4 b^2 C d^2+3 a b^5 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (c^2 C+2 B c d-2 C d^2+A \left (-c^2+d^2\right )\right )+b^6 \left (c (c C+2 B d)+A \left (-c^2+d^2\right )\right )+a^3 b^3 \left (2 c (-A+C) d+B \left (-c^2+d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b^3}-\frac {\left (a^2+b^2\right )^2 \left (A b^2+a (-b B+a C)\right ) (b c-a d)^2}{b^3 (a+b \tan (e+f x))^2}+\frac {2 \left (a^2+b^2\right ) (-b c+a d) \left (-a^3 b B d+2 a^4 C d+b^4 (B c+2 A d)+a b^3 (2 A c-2 c C-3 B d)+a^2 b^2 (-B c+4 C d)\right )}{b^3 (a+b \tan (e+f x))}}{2 \left (a^2+b^2\right )^3 f} \] Input:
Integrate[((c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2)) /(a + b*Tan[e + f*x])^3,x]
Output:
((a - I*b)^3*((-I)*A + B + I*C)*(c + I*d)^2*Log[I - Tan[e + f*x]] + (a + I *b)^3*(I*A + B - I*C)*(c - I*d)^2*Log[I + Tan[e + f*x]] + (2*(a^6*C*d^2 + 3*a^4*b^2*C*d^2 + 3*a*b^5*(2*c*(A - C)*d + B*(c^2 - d^2)) - 3*a^2*b^4*(c^2 *C + 2*B*c*d - 2*C*d^2 + A*(-c^2 + d^2)) + b^6*(c*(c*C + 2*B*d) + A*(-c^2 + d^2)) + a^3*b^3*(2*c*(-A + C)*d + B*(-c^2 + d^2)))*Log[a + b*Tan[e + f*x ]])/b^3 - ((a^2 + b^2)^2*(A*b^2 + a*(-(b*B) + a*C))*(b*c - a*d)^2)/(b^3*(a + b*Tan[e + f*x])^2) + (2*(a^2 + b^2)*(-(b*c) + a*d)*(-(a^3*b*B*d) + 2*a^ 4*C*d + b^4*(B*c + 2*A*d) + a*b^3*(2*A*c - 2*c*C - 3*B*d) + a^2*b^2*(-(B*c ) + 4*C*d)))/(b^3*(a + b*Tan[e + f*x])))/(2*(a^2 + b^2)^3*f)
Time = 4.06 (sec) , antiderivative size = 631, normalized size of antiderivative = 1.06, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.244, Rules used = {3042, 4128, 27, 3042, 4118, 3042, 4109, 3042, 3956, 4100, 16}
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 {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan (e+f x)^2\right )}{(a+b \tan (e+f x))^3}dx\) |
\(\Big \downarrow \) 4128 |
\(\displaystyle \frac {\int \frac {2 (c+d \tan (e+f x)) \left (\left (a^2+b^2\right ) C d \tan ^2(e+f x)-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-a d)+A b (a c+b d)\right )}{(a+b \tan (e+f x))^2}dx}{2 b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(c+d \tan (e+f x)) \left (\left (a^2+b^2\right ) C d \tan ^2(e+f x)-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-a d)+A b (a c+b d)\right )}{(a+b \tan (e+f x))^2}dx}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(c+d \tan (e+f x)) \left (\left (a^2+b^2\right ) C d \tan (e+f x)^2-b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+(b B-a C) (b c-a d)+A b (a c+b d)\right )}{(a+b \tan (e+f x))^2}dx}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4118 |
\(\displaystyle \frac {\frac {\int \frac {C d^2 a^4-b^2 \left (C c^2+2 B d c-3 C d^2-A \left (c^2-d^2\right )\right ) a^2+2 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) a+\left (a^2+b^2\right )^2 C d^2 \tan ^2(e+f x)+b^4 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )+b^2 \left (\left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) a^2+2 b \left (C c^2+2 B d c-C d^2-A \left (c^2-d^2\right )\right ) a-b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \tan (e+f x)}{a+b \tan (e+f x)}dx}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {C d^2 a^4-b^2 \left (C c^2+2 B d c-3 C d^2-A \left (c^2-d^2\right )\right ) a^2+2 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) a+\left (a^2+b^2\right )^2 C d^2 \tan (e+f x)^2+b^4 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )+b^2 \left (\left (2 c (A-C) d+B \left (c^2-d^2\right )\right ) a^2+2 b \left (C c^2+2 B d c-C d^2-A \left (c^2-d^2\right )\right ) a-b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \tan (e+f x)}{a+b \tan (e+f x)}dx}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4109 |
\(\displaystyle \frac {\frac {\frac {b^2 \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right ) \int \tan (e+f x)dx}{a^2+b^2}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \int \frac {\tan ^2(e+f x)+1}{a+b \tan (e+f x)}dx}{a^2+b^2}-\frac {b^2 x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{a^2+b^2}}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {b^2 \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right ) \int \tan (e+f x)dx}{a^2+b^2}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \int \frac {\tan (e+f x)^2+1}{a+b \tan (e+f x)}dx}{a^2+b^2}-\frac {b^2 x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{a^2+b^2}}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \int \frac {\tan (e+f x)^2+1}{a+b \tan (e+f x)}dx}{a^2+b^2}-\frac {b^2 \log (\cos (e+f x)) \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right )}{f \left (a^2+b^2\right )}-\frac {b^2 x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{a^2+b^2}}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4100 |
\(\displaystyle \frac {\frac {\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \int \frac {1}{a+b \tan (e+f x)}d(b \tan (e+f x))}{b f \left (a^2+b^2\right )}-\frac {b^2 \log (\cos (e+f x)) \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right )}{f \left (a^2+b^2\right )}-\frac {b^2 x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{a^2+b^2}}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {\frac {-\frac {b^2 \log (\cos (e+f x)) \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right )}{f \left (a^2+b^2\right )}-\frac {b^2 x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{a^2+b^2}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b f \left (a^2+b^2\right )}}{b \left (a^2+b^2\right )}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}}{b \left (a^2+b^2\right )}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}\) |
Input:
Int[((c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(a + b*Tan[e + f*x])^3,x]
Output:
-1/2*((A*b^2 - a*(b*B - a*C))*(c + d*Tan[e + f*x])^2)/(b*(a^2 + b^2)*f*(a + b*Tan[e + f*x])^2) + ((-((b^2*(a^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d ^2)) - 3*a*b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a^2*b*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^3*(2*c*(A - C)*d + B*(c^2 - d^2)))*x)/(a^2 + b^2)) - (b^2*(3*a^2*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^3*(c^2 *C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + a^3*(2*c*(A - C)*d + B*(c^2 - d^2) ) - 3*a*b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*Log[Cos[e + f*x]])/((a^2 + b^ 2)*f) + ((a^6*C*d^2 + 3*a^4*b^2*C*d^2 - 3*a^2*b^4*(c^2*C + 2*B*c*d - 2*C*d ^2 - A*(c^2 - d^2)) + b^6*(c*(c*C + 2*B*d) - A*(c^2 - d^2)) - a^3*b^3*(2*c *(A - C)*d + B*(c^2 - d^2)) + 3*a*b^5*(2*c*(A - C)*d + B*(c^2 - d^2)))*Log [a + b*Tan[e + f*x]])/(b*(a^2 + b^2)*f))/(b*(a^2 + b^2)) - ((b*c - a*d)*(a ^4*C*d + b^4*(B*c + A*d) + 2*a*b^3*(A*c - c*C - B*d) - a^2*b^2*(B*c + (A - 3*C)*d)))/(b^2*(a^2 + b^2)*f*(a + b*Tan[e + f*x])))/(b*(a^2 + b^2))
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[A/(b*f) Subst[Int[(a + x)^m, x], x, b* Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]
Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2 )/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*A + b*B - a *C)*(x/(a^2 + b^2)), x] + (Simp[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2) Int[( 1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Simp[(A*b - a*B - b*C)/( a^2 + b^2) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] & & NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a*B - b*C , 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_. )*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(c^2*C - B*c*d + A*d^2)*((c + d*Tan[e + f*x])^(n + 1)/(d^2*f*(n + 1)*(c^2 + d^2))), x] + Simp[1/(d*(c^2 + d^2)) Int[(c + d*Tan[e + f*x])^(n + 1)*Simp[a*d*(A*c - c*C + B*d) + b* (c^2*C - B*c*d + A*d^2) + d*(A*b*c + a*B*c - b*c*C - a*A*d + b*B*d + a*C*d) *Tan[e + f*x] + b*C*(c^2 + d^2)*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && LtQ[n , -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[(A*d^2 + c*(c*C - B*d))*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Sim p[1/(d*(n + 1)*(c^2 + d^2)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c*m + a*d* (n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b *(d*(B*c - A*d)*(m + n + 1) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ [a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Time = 0.48 (sec) , antiderivative size = 865, normalized size of antiderivative = 1.45
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (2 A \,a^{3} c d -3 A \,a^{2} b \,c^{2}+3 A \,a^{2} b \,d^{2}-6 A a \,b^{2} c d +A \,b^{3} c^{2}-A \,b^{3} d^{2}+B \,a^{3} c^{2}-B \,a^{3} d^{2}+6 B \,a^{2} b c d -3 B a \,b^{2} c^{2}+3 B a \,b^{2} d^{2}-2 B \,b^{3} c d -2 C \,a^{3} c d +3 C \,a^{2} b \,c^{2}-3 C \,a^{2} b \,d^{2}+6 C a \,b^{2} c d -C \,b^{3} c^{2}+C \,b^{3} d^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c^{2}-A \,a^{3} d^{2}+6 A \,a^{2} b c d -3 A a \,b^{2} c^{2}+3 A a \,b^{2} d^{2}-2 A \,b^{3} c d -2 B \,a^{3} c d +3 B \,a^{2} b \,c^{2}-3 B \,a^{2} b \,d^{2}+6 B a \,b^{2} c d -B \,b^{3} c^{2}+B \,b^{3} d^{2}-C \,a^{3} c^{2}+C \,a^{3} d^{2}-6 C \,a^{2} b c d +3 C a \,b^{2} c^{2}-3 C a \,b^{2} d^{2}+2 C \,b^{3} c d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}-\frac {A \,a^{2} d^{2} b^{2}-2 A a \,b^{3} c d +A \,b^{4} c^{2}-B \,a^{3} d^{2} b +2 B \,a^{2} c d \,b^{2}-B a \,b^{3} c^{2}+a^{4} C \,d^{2}-2 C \,a^{3} c d b +C \,a^{2} c^{2} b^{2}}{2 b^{3} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}-\frac {-2 A \,a^{2} b^{3} c d +2 A a \,b^{4} c^{2}-2 A a \,b^{4} d^{2}+2 A \,b^{5} c d +B \,a^{4} b \,d^{2}-B \,a^{2} b^{3} c^{2}+3 B \,a^{2} b^{3} d^{2}-4 B a \,b^{4} c d +B \,b^{5} c^{2}-2 C \,a^{5} d^{2}+2 C \,a^{4} b c d -4 C \,a^{3} b^{2} d^{2}+6 C \,a^{2} b^{3} c d -2 C a \,b^{4} c^{2}}{b^{3} \left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (f x +e \right )\right )}+\frac {\left (-2 A \,a^{3} b^{3} c d +3 A \,a^{2} b^{4} c^{2}-3 A \,a^{2} b^{4} d^{2}+6 b^{5} A c d a -A \,b^{6} c^{2}+A \,b^{6} d^{2}-B \,a^{3} b^{3} c^{2}+B \,a^{3} b^{3} d^{2}-6 B \,a^{2} b^{4} c d +3 a \,b^{5} B \,c^{2}-3 B a \,b^{5} d^{2}+2 B \,b^{6} c d +a^{6} C \,d^{2}+3 a^{4} b^{2} C \,d^{2}+2 C \,a^{3} b^{3} c d -3 C \,a^{2} b^{4} c^{2}+6 C \,a^{2} b^{4} d^{2}-6 C a \,b^{5} c d +C \,b^{6} c^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3} b^{3}}}{f}\) | \(865\) |
default | \(\frac {\frac {\frac {\left (2 A \,a^{3} c d -3 A \,a^{2} b \,c^{2}+3 A \,a^{2} b \,d^{2}-6 A a \,b^{2} c d +A \,b^{3} c^{2}-A \,b^{3} d^{2}+B \,a^{3} c^{2}-B \,a^{3} d^{2}+6 B \,a^{2} b c d -3 B a \,b^{2} c^{2}+3 B a \,b^{2} d^{2}-2 B \,b^{3} c d -2 C \,a^{3} c d +3 C \,a^{2} b \,c^{2}-3 C \,a^{2} b \,d^{2}+6 C a \,b^{2} c d -C \,b^{3} c^{2}+C \,b^{3} d^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c^{2}-A \,a^{3} d^{2}+6 A \,a^{2} b c d -3 A a \,b^{2} c^{2}+3 A a \,b^{2} d^{2}-2 A \,b^{3} c d -2 B \,a^{3} c d +3 B \,a^{2} b \,c^{2}-3 B \,a^{2} b \,d^{2}+6 B a \,b^{2} c d -B \,b^{3} c^{2}+B \,b^{3} d^{2}-C \,a^{3} c^{2}+C \,a^{3} d^{2}-6 C \,a^{2} b c d +3 C a \,b^{2} c^{2}-3 C a \,b^{2} d^{2}+2 C \,b^{3} c d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}-\frac {A \,a^{2} d^{2} b^{2}-2 A a \,b^{3} c d +A \,b^{4} c^{2}-B \,a^{3} d^{2} b +2 B \,a^{2} c d \,b^{2}-B a \,b^{3} c^{2}+a^{4} C \,d^{2}-2 C \,a^{3} c d b +C \,a^{2} c^{2} b^{2}}{2 b^{3} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}-\frac {-2 A \,a^{2} b^{3} c d +2 A a \,b^{4} c^{2}-2 A a \,b^{4} d^{2}+2 A \,b^{5} c d +B \,a^{4} b \,d^{2}-B \,a^{2} b^{3} c^{2}+3 B \,a^{2} b^{3} d^{2}-4 B a \,b^{4} c d +B \,b^{5} c^{2}-2 C \,a^{5} d^{2}+2 C \,a^{4} b c d -4 C \,a^{3} b^{2} d^{2}+6 C \,a^{2} b^{3} c d -2 C a \,b^{4} c^{2}}{b^{3} \left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (f x +e \right )\right )}+\frac {\left (-2 A \,a^{3} b^{3} c d +3 A \,a^{2} b^{4} c^{2}-3 A \,a^{2} b^{4} d^{2}+6 b^{5} A c d a -A \,b^{6} c^{2}+A \,b^{6} d^{2}-B \,a^{3} b^{3} c^{2}+B \,a^{3} b^{3} d^{2}-6 B \,a^{2} b^{4} c d +3 a \,b^{5} B \,c^{2}-3 B a \,b^{5} d^{2}+2 B \,b^{6} c d +a^{6} C \,d^{2}+3 a^{4} b^{2} C \,d^{2}+2 C \,a^{3} b^{3} c d -3 C \,a^{2} b^{4} c^{2}+6 C \,a^{2} b^{4} d^{2}-6 C a \,b^{5} c d +C \,b^{6} c^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3} b^{3}}}{f}\) | \(865\) |
norman | \(\text {Expression too large to display}\) | \(1447\) |
risch | \(\text {Expression too large to display}\) | \(4025\) |
parallelrisch | \(\text {Expression too large to display}\) | \(4626\) |
Input:
int((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3, x,method=_RETURNVERBOSE)
Output:
1/f*(1/(a^2+b^2)^3*(1/2*(2*A*a^3*c*d-3*A*a^2*b*c^2+3*A*a^2*b*d^2-6*A*a*b^2 *c*d+A*b^3*c^2-A*b^3*d^2+B*a^3*c^2-B*a^3*d^2+6*B*a^2*b*c*d-3*B*a*b^2*c^2+3 *B*a*b^2*d^2-2*B*b^3*c*d-2*C*a^3*c*d+3*C*a^2*b*c^2-3*C*a^2*b*d^2+6*C*a*b^2 *c*d-C*b^3*c^2+C*b^3*d^2)*ln(1+tan(f*x+e)^2)+(A*a^3*c^2-A*a^3*d^2+6*A*a^2* b*c*d-3*A*a*b^2*c^2+3*A*a*b^2*d^2-2*A*b^3*c*d-2*B*a^3*c*d+3*B*a^2*b*c^2-3* B*a^2*b*d^2+6*B*a*b^2*c*d-B*b^3*c^2+B*b^3*d^2-C*a^3*c^2+C*a^3*d^2-6*C*a^2* b*c*d+3*C*a*b^2*c^2-3*C*a*b^2*d^2+2*C*b^3*c*d)*arctan(tan(f*x+e)))-1/2*(A* a^2*b^2*d^2-2*A*a*b^3*c*d+A*b^4*c^2-B*a^3*b*d^2+2*B*a^2*b^2*c*d-B*a*b^3*c^ 2+C*a^4*d^2-2*C*a^3*b*c*d+C*a^2*b^2*c^2)/b^3/(a^2+b^2)/(a+b*tan(f*x+e))^2- (-2*A*a^2*b^3*c*d+2*A*a*b^4*c^2-2*A*a*b^4*d^2+2*A*b^5*c*d+B*a^4*b*d^2-B*a^ 2*b^3*c^2+3*B*a^2*b^3*d^2-4*B*a*b^4*c*d+B*b^5*c^2-2*C*a^5*d^2+2*C*a^4*b*c* d-4*C*a^3*b^2*d^2+6*C*a^2*b^3*c*d-2*C*a*b^4*c^2)/b^3/(a^2+b^2)^2/(a+b*tan( f*x+e))+1/(a^2+b^2)^3*(-2*A*a^3*b^3*c*d+3*A*a^2*b^4*c^2-3*A*a^2*b^4*d^2+6* A*a*b^5*c*d-A*b^6*c^2+A*b^6*d^2-B*a^3*b^3*c^2+B*a^3*b^3*d^2-6*B*a^2*b^4*c* d+3*B*a*b^5*c^2-3*B*a*b^5*d^2+2*B*b^6*c*d+C*a^6*d^2+3*C*a^4*b^2*d^2+2*C*a^ 3*b^3*c*d-3*C*a^2*b^4*c^2+6*C*a^2*b^4*d^2-6*C*a*b^5*c*d+C*b^6*c^2)/b^3*ln( a+b*tan(f*x+e)))
Leaf count of result is larger than twice the leaf count of optimal. 1699 vs. \(2 (595) = 1190\).
Time = 0.50 (sec) , antiderivative size = 1699, normalized size of antiderivative = 2.85 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\text {Too large to display} \] Input:
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+ e))^3,x, algorithm="fricas")
Output:
-1/2*((3*C*a^4*b^4 - 5*B*a^3*b^5 + (7*A - 3*C)*a^2*b^6 + B*a*b^7 + A*b^8)* c^2 - 2*(C*a^5*b^3 - 3*B*a^4*b^4 + 5*(A - C)*a^3*b^5 + 3*B*a^2*b^6 - A*a*b ^7)*c*d - (C*a^6*b^2 + B*a^5*b^3 - (3*A - 7*C)*a^4*b^4 - 5*B*a^3*b^5 + 3*A *a^2*b^6)*d^2 - 2*(((A - C)*a^5*b^3 + 3*B*a^4*b^4 - 3*(A - C)*a^3*b^5 - B* a^2*b^6)*c^2 - 2*(B*a^5*b^3 - 3*(A - C)*a^4*b^4 - 3*B*a^3*b^5 + (A - C)*a^ 2*b^6)*c*d - ((A - C)*a^5*b^3 + 3*B*a^4*b^4 - 3*(A - C)*a^3*b^5 - B*a^2*b^ 6)*d^2)*f*x - ((C*a^4*b^4 - 3*B*a^3*b^5 + 5*(A - C)*a^2*b^6 + 3*B*a*b^7 - A*b^8)*c^2 + 2*(C*a^5*b^3 + B*a^4*b^4 - (3*A - 7*C)*a^3*b^5 - 5*B*a^2*b^6 + 3*A*a*b^7)*c*d - (3*C*a^6*b^2 - B*a^5*b^3 - (A - 9*C)*a^4*b^4 - 7*B*a^3* b^5 + 5*A*a^2*b^6)*d^2 + 2*(((A - C)*a^3*b^5 + 3*B*a^2*b^6 - 3*(A - C)*a*b ^7 - B*b^8)*c^2 - 2*(B*a^3*b^5 - 3*(A - C)*a^2*b^6 - 3*B*a*b^7 + (A - C)*b ^8)*c*d - ((A - C)*a^3*b^5 + 3*B*a^2*b^6 - 3*(A - C)*a*b^7 - B*b^8)*d^2)*f *x)*tan(f*x + e)^2 + ((B*a^5*b^3 - 3*(A - C)*a^4*b^4 - 3*B*a^3*b^5 + (A - C)*a^2*b^6)*c^2 + 2*((A - C)*a^5*b^3 + 3*B*a^4*b^4 - 3*(A - C)*a^3*b^5 - B *a^2*b^6)*c*d - (C*a^8 + 3*C*a^6*b^2 + B*a^5*b^3 - 3*(A - 2*C)*a^4*b^4 - 3 *B*a^3*b^5 + A*a^2*b^6)*d^2 + ((B*a^3*b^5 - 3*(A - C)*a^2*b^6 - 3*B*a*b^7 + (A - C)*b^8)*c^2 + 2*((A - C)*a^3*b^5 + 3*B*a^2*b^6 - 3*(A - C)*a*b^7 - B*b^8)*c*d - (C*a^6*b^2 + 3*C*a^4*b^4 + B*a^3*b^5 - 3*(A - 2*C)*a^2*b^6 - 3*B*a*b^7 + A*b^8)*d^2)*tan(f*x + e)^2 + 2*((B*a^4*b^4 - 3*(A - C)*a^3*b^5 - 3*B*a^2*b^6 + (A - C)*a*b^7)*c^2 + 2*((A - C)*a^4*b^4 + 3*B*a^3*b^5 ...
Exception generated. \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\text {Exception raised: AttributeError} \] Input:
integrate((c+d*tan(f*x+e))**2*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*tan(f* x+e))**3,x)
Output:
Exception raised: AttributeError >> 'NoneType' object has no attribute 'pr imitive'
Time = 0.13 (sec) , antiderivative size = 839, normalized size of antiderivative = 1.41 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx =\text {Too large to display} \] Input:
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+ e))^3,x, algorithm="maxima")
Output:
1/2*(2*(((A - C)*a^3 + 3*B*a^2*b - 3*(A - C)*a*b^2 - B*b^3)*c^2 - 2*(B*a^3 - 3*(A - C)*a^2*b - 3*B*a*b^2 + (A - C)*b^3)*c*d - ((A - C)*a^3 + 3*B*a^2 *b - 3*(A - C)*a*b^2 - B*b^3)*d^2)*(f*x + e)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) - 2*((B*a^3*b^3 - 3*(A - C)*a^2*b^4 - 3*B*a*b^5 + (A - C)*b^6)*c^2 + 2*((A - C)*a^3*b^3 + 3*B*a^2*b^4 - 3*(A - C)*a*b^5 - B*b^6)*c*d - (C*a^6 + 3*C*a^4*b^2 + B*a^3*b^3 - 3*(A - 2*C)*a^2*b^4 - 3*B*a*b^5 + A*b^6)*d^2) *log(b*tan(f*x + e) + a)/(a^6*b^3 + 3*a^4*b^5 + 3*a^2*b^7 + b^9) + ((B*a^3 - 3*(A - C)*a^2*b - 3*B*a*b^2 + (A - C)*b^3)*c^2 + 2*((A - C)*a^3 + 3*B*a ^2*b - 3*(A - C)*a*b^2 - B*b^3)*c*d - (B*a^3 - 3*(A - C)*a^2*b - 3*B*a*b^2 + (A - C)*b^3)*d^2)*log(tan(f*x + e)^2 + 1)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) - ((C*a^4*b^2 - 3*B*a^3*b^3 + (5*A - 3*C)*a^2*b^4 + B*a*b^5 + A*b^6 )*c^2 + 2*(C*a^5*b + B*a^4*b^2 - (3*A - 5*C)*a^3*b^3 - 3*B*a^2*b^4 + A*a*b ^5)*c*d - (3*C*a^6 - B*a^5*b - (A - 7*C)*a^4*b^2 - 5*B*a^3*b^3 + 3*A*a^2*b ^4)*d^2 - 2*((B*a^2*b^4 - 2*(A - C)*a*b^5 - B*b^6)*c^2 - 2*(C*a^4*b^2 - (A - 3*C)*a^2*b^4 - 2*B*a*b^5 + A*b^6)*c*d + (2*C*a^5*b - B*a^4*b^2 + 4*C*a^ 3*b^3 - 3*B*a^2*b^4 + 2*A*a*b^5)*d^2)*tan(f*x + e))/(a^6*b^3 + 2*a^4*b^5 + a^2*b^7 + (a^4*b^5 + 2*a^2*b^7 + b^9)*tan(f*x + e)^2 + 2*(a^5*b^4 + 2*a^3 *b^6 + a*b^8)*tan(f*x + e)))/f
Leaf count of result is larger than twice the leaf count of optimal. 1218 vs. \(2 (595) = 1190\).
Time = 0.88 (sec) , antiderivative size = 1218, normalized size of antiderivative = 2.04 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx =\text {Too large to display} \] Input:
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+ e))^3,x, algorithm="giac")
Output:
(A*a^3*c^2 - C*a^3*c^2 + 3*B*a^2*b*c^2 - 3*A*a*b^2*c^2 + 3*C*a*b^2*c^2 - B *b^3*c^2 - 2*B*a^3*c*d + 6*A*a^2*b*c*d - 6*C*a^2*b*c*d + 6*B*a*b^2*c*d - 2 *A*b^3*c*d + 2*C*b^3*c*d - A*a^3*d^2 + C*a^3*d^2 - 3*B*a^2*b*d^2 + 3*A*a*b ^2*d^2 - 3*C*a*b^2*d^2 + B*b^3*d^2)*(f*x + e)/(a^6*f + 3*a^4*b^2*f + 3*a^2 *b^4*f + b^6*f) + 1/2*(B*a^3*c^2 - 3*A*a^2*b*c^2 + 3*C*a^2*b*c^2 - 3*B*a*b ^2*c^2 + A*b^3*c^2 - C*b^3*c^2 + 2*A*a^3*c*d - 2*C*a^3*c*d + 6*B*a^2*b*c*d - 6*A*a*b^2*c*d + 6*C*a*b^2*c*d - 2*B*b^3*c*d - B*a^3*d^2 + 3*A*a^2*b*d^2 - 3*C*a^2*b*d^2 + 3*B*a*b^2*d^2 - A*b^3*d^2 + C*b^3*d^2)*log(tan(f*x + e) ^2 + 1)/(a^6*f + 3*a^4*b^2*f + 3*a^2*b^4*f + b^6*f) - (B*a^3*b^3*c^2 - 3*A *a^2*b^4*c^2 + 3*C*a^2*b^4*c^2 - 3*B*a*b^5*c^2 + A*b^6*c^2 - C*b^6*c^2 + 2 *A*a^3*b^3*c*d - 2*C*a^3*b^3*c*d + 6*B*a^2*b^4*c*d - 6*A*a*b^5*c*d + 6*C*a *b^5*c*d - 2*B*b^6*c*d - C*a^6*d^2 - 3*C*a^4*b^2*d^2 - B*a^3*b^3*d^2 + 3*A *a^2*b^4*d^2 - 6*C*a^2*b^4*d^2 + 3*B*a*b^5*d^2 - A*b^6*d^2)*log(abs(b*tan( f*x + e) + a))/(a^6*b^3*f + 3*a^4*b^5*f + 3*a^2*b^7*f + b^9*f) + 1/2*(2*(B *a^4*b^3*c^2 - 2*A*a^3*b^4*c^2 + 2*C*a^3*b^4*c^2 - 2*A*a*b^6*c^2 + 2*C*a*b ^6*c^2 - B*b^7*c^2 - 2*C*a^6*b*c*d + 2*A*a^4*b^3*c*d - 8*C*a^4*b^3*c*d + 4 *B*a^3*b^4*c*d - 6*C*a^2*b^5*c*d + 4*B*a*b^6*c*d - 2*A*b^7*c*d + 2*C*a^7*d ^2 - B*a^6*b*d^2 + 6*C*a^5*b^2*d^2 - 4*B*a^4*b^3*d^2 + 2*A*a^3*b^4*d^2 + 4 *C*a^3*b^4*d^2 - 3*B*a^2*b^5*d^2 + 2*A*a*b^6*d^2)*tan(f*x + e) - (C*a^6*b^ 2*c^2 - 3*B*a^5*b^3*c^2 + 5*A*a^4*b^4*c^2 - 2*C*a^4*b^4*c^2 - 2*B*a^3*b...
Time = 24.36 (sec) , antiderivative size = 807, normalized size of antiderivative = 1.35 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=-\frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (\frac {a^2\,\left (b^4\,\left (3\,A\,d^2-3\,A\,c^2+3\,C\,c^2-6\,C\,d^2+6\,B\,c\,d\right )+3\,C\,b^4\,d^2\right )-b^6\,\left (A\,d^2-A\,c^2+C\,c^2+2\,B\,c\,d\right )+C\,b^6\,d^2-a\,b^5\,\left (3\,B\,c^2-3\,B\,d^2+6\,A\,c\,d-6\,C\,c\,d\right )+a^3\,b^3\,\left (B\,c^2-B\,d^2+2\,A\,c\,d-2\,C\,c\,d\right )}{a^6\,b^3+3\,a^4\,b^5+3\,a^2\,b^7+b^9}-\frac {C\,d^2}{b^3}\right )}{f}-\frac {\frac {A\,b^6\,c^2-3\,C\,a^6\,d^2+B\,a\,b^5\,c^2+B\,a^5\,b\,d^2+5\,A\,a^2\,b^4\,c^2-3\,A\,a^2\,b^4\,d^2+A\,a^4\,b^2\,d^2-3\,B\,a^3\,b^3\,c^2+5\,B\,a^3\,b^3\,d^2-3\,C\,a^2\,b^4\,c^2+C\,a^4\,b^2\,c^2-7\,C\,a^4\,b^2\,d^2+2\,A\,a\,b^5\,c\,d+2\,C\,a^5\,b\,c\,d-6\,A\,a^3\,b^3\,c\,d-6\,B\,a^2\,b^4\,c\,d+2\,B\,a^4\,b^2\,c\,d+10\,C\,a^3\,b^3\,c\,d}{2\,b^3\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (B\,b^5\,c^2-2\,C\,a^5\,d^2+2\,A\,b^5\,c\,d+2\,A\,a\,b^4\,c^2-2\,A\,a\,b^4\,d^2+B\,a^4\,b\,d^2-2\,C\,a\,b^4\,c^2-B\,a^2\,b^3\,c^2+3\,B\,a^2\,b^3\,d^2-4\,C\,a^3\,b^2\,d^2-4\,B\,a\,b^4\,c\,d+2\,C\,a^4\,b\,c\,d-2\,A\,a^2\,b^3\,c\,d+6\,C\,a^2\,b^3\,c\,d\right )}{b^2\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{f\,\left (a^2+2\,a\,b\,\mathrm {tan}\left (e+f\,x\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (B\,c^2-B\,d^2+2\,A\,c\,d-2\,C\,c\,d-A\,c^2\,1{}\mathrm {i}+A\,d^2\,1{}\mathrm {i}+C\,c^2\,1{}\mathrm {i}-C\,d^2\,1{}\mathrm {i}+B\,c\,d\,2{}\mathrm {i}\right )}{2\,f\,\left (-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (A\,d^2-A\,c^2+B\,c^2\,1{}\mathrm {i}-B\,d^2\,1{}\mathrm {i}+C\,c^2-C\,d^2+A\,c\,d\,2{}\mathrm {i}+2\,B\,c\,d-C\,c\,d\,2{}\mathrm {i}\right )}{2\,f\,\left (-a^3\,1{}\mathrm {i}-3\,a^2\,b+a\,b^2\,3{}\mathrm {i}+b^3\right )} \] Input:
int(((c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3,x)
Output:
- (log(a + b*tan(e + f*x))*((a^2*(b^4*(3*A*d^2 - 3*A*c^2 + 3*C*c^2 - 6*C*d ^2 + 6*B*c*d) + 3*C*b^4*d^2) - b^6*(A*d^2 - A*c^2 + C*c^2 + 2*B*c*d) + C*b ^6*d^2 - a*b^5*(3*B*c^2 - 3*B*d^2 + 6*A*c*d - 6*C*c*d) + a^3*b^3*(B*c^2 - B*d^2 + 2*A*c*d - 2*C*c*d))/(b^9 + 3*a^2*b^7 + 3*a^4*b^5 + a^6*b^3) - (C*d ^2)/b^3))/f - ((A*b^6*c^2 - 3*C*a^6*d^2 + B*a*b^5*c^2 + B*a^5*b*d^2 + 5*A* a^2*b^4*c^2 - 3*A*a^2*b^4*d^2 + A*a^4*b^2*d^2 - 3*B*a^3*b^3*c^2 + 5*B*a^3* b^3*d^2 - 3*C*a^2*b^4*c^2 + C*a^4*b^2*c^2 - 7*C*a^4*b^2*d^2 + 2*A*a*b^5*c* d + 2*C*a^5*b*c*d - 6*A*a^3*b^3*c*d - 6*B*a^2*b^4*c*d + 2*B*a^4*b^2*c*d + 10*C*a^3*b^3*c*d)/(2*b^3*(a^4 + b^4 + 2*a^2*b^2)) + (tan(e + f*x)*(B*b^5*c ^2 - 2*C*a^5*d^2 + 2*A*b^5*c*d + 2*A*a*b^4*c^2 - 2*A*a*b^4*d^2 + B*a^4*b*d ^2 - 2*C*a*b^4*c^2 - B*a^2*b^3*c^2 + 3*B*a^2*b^3*d^2 - 4*C*a^3*b^2*d^2 - 4 *B*a*b^4*c*d + 2*C*a^4*b*c*d - 2*A*a^2*b^3*c*d + 6*C*a^2*b^3*c*d))/(b^2*(a ^4 + b^4 + 2*a^2*b^2)))/(f*(a^2 + b^2*tan(e + f*x)^2 + 2*a*b*tan(e + f*x)) ) - (log(tan(e + f*x) - 1i)*(A*d^2*1i - A*c^2*1i + B*c^2 - B*d^2 + C*c^2*1 i - C*d^2*1i + 2*A*c*d + B*c*d*2i - 2*C*c*d))/(2*f*(3*a*b^2 - a^2*b*3i - a ^3 + b^3*1i)) - (log(tan(e + f*x) + 1i)*(A*d^2 - A*c^2 + B*c^2*1i - B*d^2* 1i + C*c^2 - C*d^2 + A*c*d*2i + 2*B*c*d - C*c*d*2i))/(2*f*(a*b^2*3i - 3*a^ 2*b - a^3*1i + b^3))
Time = 0.17 (sec) , antiderivative size = 3274, normalized size of antiderivative = 5.48 \[ \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx =\text {Too large to display} \] Input:
int((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3, x)
Output:
(2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**5*b**5*c*d - 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**4*b**6*c**2 + 2*log(tan(e + f*x)**2 + 1)*t an(e + f*x)**2*a**4*b**6*d**2 - 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2 *a**4*b**5*c**2*d + 3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**3*b**6*c **3 - 3*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**3*b**6*c*d**2 - 2*log( tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**2*b**8*c**2 + 2*log(tan(e + f*x)** 2 + 1)*tan(e + f*x)**2*a**2*b**8*d**2 + 6*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a**2*b**7*c**2*d - 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a*b **9*c*d - log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a*b**8*c**3 + log(tan(e + f*x)**2 + 1)*tan(e + f*x)**2*a*b**8*c*d**2 + 4*log(tan(e + f*x)**2 + 1) *tan(e + f*x)*a**6*b**4*c*d - 4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**5 *b**5*c**2 + 4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**5*b**5*d**2 - 4*lo g(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**5*b**4*c**2*d + 6*log(tan(e + f*x)* *2 + 1)*tan(e + f*x)*a**4*b**5*c**3 - 6*log(tan(e + f*x)**2 + 1)*tan(e + f *x)*a**4*b**5*c*d**2 - 4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**3*b**7*c **2 + 4*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**3*b**7*d**2 + 12*log(tan( e + f*x)**2 + 1)*tan(e + f*x)*a**3*b**6*c**2*d - 4*log(tan(e + f*x)**2 + 1 )*tan(e + f*x)*a**2*b**8*c*d - 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a** 2*b**7*c**3 + 2*log(tan(e + f*x)**2 + 1)*tan(e + f*x)*a**2*b**7*c*d**2 + 2 *log(tan(e + f*x)**2 + 1)*a**7*b**3*c*d - 2*log(tan(e + f*x)**2 + 1)*a*...