Integrand size = 39, antiderivative size = 197 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\frac {a \left (a^4-10 a^2 b^2+5 b^4\right ) x}{\left (a^2+b^2\right )^4}-\frac {b \left (5 a^4-10 a^2 b^2+b^4\right ) \log (b \cos (d+e x)+a \sin (d+e x))}{\left (a^2+b^2\right )^4 e}-\frac {a^2-b^2}{3 \left (a^2+b^2\right ) e (b+a \tan (d+e x))^3}-\frac {b \left (3 a^2-b^2\right )}{2 \left (a^2+b^2\right )^2 e (b+a \tan (d+e x))^2}+\frac {a^4-6 a^2 b^2+b^4}{\left (a^2+b^2\right )^3 e (b+a \tan (d+e x))} \] Output:
a*(a^4-10*a^2*b^2+5*b^4)*x/(a^2+b^2)^4-b*(5*a^4-10*a^2*b^2+b^4)*ln(b*cos(e *x+d)+a*sin(e*x+d))/(a^2+b^2)^4/e-1/3*(a^2-b^2)/(a^2+b^2)/e/(b+a*tan(e*x+d ))^3-1/2*b*(3*a^2-b^2)/(a^2+b^2)^2/e/(b+a*tan(e*x+d))^2+(a^4-6*a^2*b^2+b^4 )/(a^2+b^2)^3/e/(b+a*tan(e*x+d))
Result contains complex when optimal does not.
Time = 3.70 (sec) , antiderivative size = 308, normalized size of antiderivative = 1.56 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\frac {-\left ((a-b) (a+b) \left (\frac {3 i \log (i-\tan (d+e x))}{(a-i b)^4}-\frac {3 i \log (i+\tan (d+e x))}{(a+i b)^4}+\frac {24 a (a-b) b (a+b) \log (b+a \tan (d+e x))}{\left (a^2+b^2\right )^4}+\frac {2 a}{\left (a^2+b^2\right ) (b+a \tan (d+e x))^3}+\frac {6 a b}{\left (a^2+b^2\right )^2 (b+a \tan (d+e x))^2}-\frac {6 a \left (a^2-3 b^2\right )}{\left (a^2+b^2\right )^3 (b+a \tan (d+e x))}\right )\right )+3 b \left (\frac {\log (i-\tan (d+e x))}{(a-i b)^3}+\frac {\log (i+\tan (d+e x))}{(a+i b)^3}+\frac {a \left (-2 \left (a^2-3 b^2\right ) \log (b+a \tan (d+e x))-\frac {\left (a^2+b^2\right ) \left (a^2+5 b^2+4 a b \tan (d+e x)\right )}{(b+a \tan (d+e x))^2}\right )}{\left (a^2+b^2\right )^3}\right )}{6 a e} \] Input:
Integrate[(a + b*Tan[d + e*x])/(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x ]^2)^2,x]
Output:
(-((a - b)*(a + b)*(((3*I)*Log[I - Tan[d + e*x]])/(a - I*b)^4 - ((3*I)*Log [I + Tan[d + e*x]])/(a + I*b)^4 + (24*a*(a - b)*b*(a + b)*Log[b + a*Tan[d + e*x]])/(a^2 + b^2)^4 + (2*a)/((a^2 + b^2)*(b + a*Tan[d + e*x])^3) + (6*a *b)/((a^2 + b^2)^2*(b + a*Tan[d + e*x])^2) - (6*a*(a^2 - 3*b^2))/((a^2 + b ^2)^3*(b + a*Tan[d + e*x])))) + 3*b*(Log[I - Tan[d + e*x]]/(a - I*b)^3 + L og[I + Tan[d + e*x]]/(a + I*b)^3 + (a*(-2*(a^2 - 3*b^2)*Log[b + a*Tan[d + e*x]] - ((a^2 + b^2)*(a^2 + 5*b^2 + 4*a*b*Tan[d + e*x]))/(b + a*Tan[d + e* x])^2))/(a^2 + b^2)^3))/(6*a*e)
Time = 1.36 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.32, number of steps used = 14, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.359, Rules used = {3042, 4191, 27, 3042, 4012, 3042, 4012, 25, 3042, 4012, 3042, 4014, 3042, 4013}
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 \tan (d+e x)}{\left (a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (d+e x)}{\left (a^2 \tan (d+e x)^2+2 a b \tan (d+e x)+b^2\right )^2}dx\) |
\(\Big \downarrow \) 4191 |
\(\displaystyle 16 a^4 \int \frac {a+b \tan (d+e x)}{16 \left (\tan (d+e x) a^2+b a\right )^4}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle a^4 \int \frac {a+b \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^4}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \int \frac {a+b \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^4}dx\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle a^4 \left (\frac {\int \frac {2 a^2 b-a \left (a^2-b^2\right ) \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^3}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {\int \frac {2 a^2 b-a \left (a^2-b^2\right ) \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^3}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle a^4 \left (\frac {\frac {\int -\frac {\left (a^2-3 b^2\right ) a^3+b \left (3 a^2-b^2\right ) \tan (d+e x) a^2}{\left (\tan (d+e x) a^2+b a\right )^2}dx}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle a^4 \left (\frac {-\frac {\int \frac {\left (a^2-3 b^2\right ) a^3+b \left (3 a^2-b^2\right ) \tan (d+e x) a^2}{\left (\tan (d+e x) a^2+b a\right )^2}dx}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {-\frac {\int \frac {\left (a^2-3 b^2\right ) a^3+b \left (3 a^2-b^2\right ) \tan (d+e x) a^2}{\left (\tan (d+e x) a^2+b a\right )^2}dx}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle a^4 \left (\frac {-\frac {\frac {\int \frac {4 a^4 b \left (a^2-b^2\right )-a^3 \left (a^4-6 b^2 a^2+b^4\right ) \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^4-6 a^2 b^2+b^4}{e \left (a^2+b^2\right ) (a \tan (d+e x)+b)}}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {-\frac {\frac {\int \frac {4 a^4 b \left (a^2-b^2\right )-a^3 \left (a^4-6 b^2 a^2+b^4\right ) \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^4-6 a^2 b^2+b^4}{e \left (a^2+b^2\right ) (a \tan (d+e x)+b)}}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle a^4 \left (\frac {-\frac {\frac {\frac {a^2 b \left (5 a^4-10 a^2 b^2+b^4\right ) \int \frac {a^2-a b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2+b^2}-\frac {a^3 x \left (a^4-10 a^2 b^2+5 b^4\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^4-6 a^2 b^2+b^4}{e \left (a^2+b^2\right ) (a \tan (d+e x)+b)}}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^4 \left (\frac {-\frac {\frac {\frac {a^2 b \left (5 a^4-10 a^2 b^2+b^4\right ) \int \frac {a^2-a b \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2+b^2}-\frac {a^3 x \left (a^4-10 a^2 b^2+5 b^4\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^4-6 a^2 b^2+b^4}{e \left (a^2+b^2\right ) (a \tan (d+e x)+b)}}{a^2 \left (a^2+b^2\right )}-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle a^4 \left (\frac {-\frac {b \left (3 a^2-b^2\right )}{2 e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^2}-\frac {\frac {\frac {a^2 b \left (5 a^4-10 a^2 b^2+b^4\right ) \log (a \sin (d+e x)+b \cos (d+e x))}{e \left (a^2+b^2\right )}-\frac {a^3 x \left (a^4-10 a^2 b^2+5 b^4\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^4-6 a^2 b^2+b^4}{e \left (a^2+b^2\right ) (a \tan (d+e x)+b)}}{a^2 \left (a^2+b^2\right )}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{3 a e \left (a^2+b^2\right ) \left (a^2 \tan (d+e x)+a b\right )^3}\right )\) |
Input:
Int[(a + b*Tan[d + e*x])/(b^2 + 2*a*b*Tan[d + e*x] + a^2*Tan[d + e*x]^2)^2 ,x]
Output:
a^4*(-1/3*(a^2 - b^2)/(a*(a^2 + b^2)*e*(a*b + a^2*Tan[d + e*x])^3) + (-1/2 *(b*(3*a^2 - b^2))/((a^2 + b^2)*e*(a*b + a^2*Tan[d + e*x])^2) - ((-((a^3*( a^4 - 10*a^2*b^2 + 5*b^4)*x)/(a^2 + b^2)) + (a^2*b*(5*a^4 - 10*a^2*b^2 + b ^4)*Log[b*Cos[d + e*x] + a*Sin[d + e*x]])/((a^2 + b^2)*e))/(a^2*(a^2 + b^2 )) - (a^4 - 6*a^2*b^2 + b^4)/((a^2 + b^2)*e*(b + a*Tan[d + e*x])))/(a^2*(a ^2 + b^2)))/(a^2*(a^2 + b^2)))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* (x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si n[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && N eQ[a*c + b*d, 0]
Int[((A_) + (B_.)*tan[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*tan[(d_.) + (e_.)* (x_)] + (c_.)*tan[(d_.) + (e_.)*(x_)]^2)^(n_), x_Symbol] :> Simp[1/(4^n*c^n ) Int[(A + B*Tan[d + e*x])*(b + 2*c*Tan[d + e*x])^(2*n), x], x] /; FreeQ[ {a, b, c, d, e, A, B}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[n]
Time = 0.33 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.11
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (5 a^{4} b -10 a^{2} b^{3}+b^{5}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2}+\left (a^{5}-10 a^{3} b^{2}+5 a \,b^{4}\right ) \arctan \left (\tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {a^{2}-b^{2}}{3 \left (a^{2}+b^{2}\right ) \left (b +a \tan \left (e x +d \right )\right )^{3}}-\frac {b \left (3 a^{2}-b^{2}\right )}{2 \left (a^{2}+b^{2}\right )^{2} \left (b +a \tan \left (e x +d \right )\right )^{2}}+\frac {a^{4}-6 a^{2} b^{2}+b^{4}}{\left (a^{2}+b^{2}\right )^{3} \left (b +a \tan \left (e x +d \right )\right )}-\frac {b \left (5 a^{4}-10 a^{2} b^{2}+b^{4}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}}{e}\) | \(218\) |
default | \(\frac {\frac {\frac {\left (5 a^{4} b -10 a^{2} b^{3}+b^{5}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2}+\left (a^{5}-10 a^{3} b^{2}+5 a \,b^{4}\right ) \arctan \left (\tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {a^{2}-b^{2}}{3 \left (a^{2}+b^{2}\right ) \left (b +a \tan \left (e x +d \right )\right )^{3}}-\frac {b \left (3 a^{2}-b^{2}\right )}{2 \left (a^{2}+b^{2}\right )^{2} \left (b +a \tan \left (e x +d \right )\right )^{2}}+\frac {a^{4}-6 a^{2} b^{2}+b^{4}}{\left (a^{2}+b^{2}\right )^{3} \left (b +a \tan \left (e x +d \right )\right )}-\frac {b \left (5 a^{4}-10 a^{2} b^{2}+b^{4}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}}{e}\) | \(218\) |
norman | \(\frac {\frac {a^{4} \left (a^{4}-10 a^{2} b^{2}+5 b^{4}\right ) x \tan \left (e x +d \right )^{3}}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}+\frac {\left (a^{4}-10 a^{2} b^{2}+5 b^{4}\right ) b^{3} a x}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {2 a^{8}+7 a^{6} b^{2}+28 a^{4} b^{4}-9 a^{2} b^{6}}{6 a^{2} e \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b \left (-a^{6}-14 a^{4} b^{2}+3 a^{2} b^{4}\right ) \tan \left (e x +d \right )}{2 a e \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {a \left (-a^{6}+6 a^{4} b^{2}-a^{2} b^{4}\right ) \tan \left (e x +d \right )^{3}}{3 e b \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {3 a^{2} \left (a^{4}-10 a^{2} b^{2}+5 b^{4}\right ) b^{2} x \tan \left (e x +d \right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}+\frac {3 a^{3} \left (a^{4}-10 a^{2} b^{2}+5 b^{4}\right ) b x \tan \left (e x +d \right )^{2}}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}}{\left (b +a \tan \left (e x +d \right )\right )^{3}}+\frac {b \left (5 a^{4}-10 a^{2} b^{2}+b^{4}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2 e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}-\frac {b \left (5 a^{4}-10 a^{2} b^{2}+b^{4}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}\) | \(592\) |
risch | \(-\frac {i x b}{4 i a^{3} b -4 i a \,b^{3}+a^{4}-6 a^{2} b^{2}+b^{4}}+\frac {x a}{4 i a^{3} b -4 i a \,b^{3}+a^{4}-6 a^{2} b^{2}+b^{4}}+\frac {10 i b \,a^{4} x}{a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}}-\frac {20 i b^{3} a^{2} x}{a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}}+\frac {2 i b^{5} x}{a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}}+\frac {10 i b \,a^{4} d}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}-\frac {20 i b^{3} a^{2} d}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}+\frac {2 i b^{5} d}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}+\frac {2 i a \left (6 i {\mathrm e}^{2 i \left (e x +d \right )} a^{3} b^{3}-8 i b \,a^{5}-42 i a^{3} b^{3} {\mathrm e}^{4 i \left (e x +d \right )}+6 \,{\mathrm e}^{4 i \left (e x +d \right )} a^{6}-9 \,{\mathrm e}^{4 i \left (e x +d \right )} a^{4} b^{2}+24 \,{\mathrm e}^{4 i \left (e x +d \right )} a^{2} b^{4}-9 \,{\mathrm e}^{4 i \left (e x +d \right )} b^{6}+15 i {\mathrm e}^{2 i \left (e x +d \right )} a^{5} b -3 i a^{5} b \,{\mathrm e}^{4 i \left (e x +d \right )}-9 i {\mathrm e}^{2 i \left (e x +d \right )} a \,b^{5}-6 a^{6} {\mathrm e}^{2 i \left (e x +d \right )}+54 a^{4} {\mathrm e}^{2 i \left (e x +d \right )} b^{2}+42 \,{\mathrm e}^{2 i \left (e x +d \right )} b^{4} a^{2}-18 \,{\mathrm e}^{2 i \left (e x +d \right )} b^{6}+62 i b^{3} a^{3}+9 i a \,b^{5} {\mathrm e}^{4 i \left (e x +d \right )}-18 i b^{5} a +4 a^{6}-35 a^{4} b^{2}+40 a^{2} b^{4}-9 b^{6}\right )}{3 \left (-i b +a \right )^{3} \left (i b \,{\mathrm e}^{2 i \left (e x +d \right )}+a \,{\mathrm e}^{2 i \left (e x +d \right )}+i b -a \right )^{3} \left (i b +a \right )^{4} e}-\frac {5 b \ln \left ({\mathrm e}^{2 i \left (e x +d \right )}+\frac {i b -a}{i b +a}\right ) a^{4}}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}+\frac {10 b^{3} \ln \left ({\mathrm e}^{2 i \left (e x +d \right )}+\frac {i b -a}{i b +a}\right ) a^{2}}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}-\frac {b^{5} \ln \left ({\mathrm e}^{2 i \left (e x +d \right )}+\frac {i b -a}{i b +a}\right )}{e \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}\) | \(871\) |
parallelrisch | \(\text {Expression too large to display}\) | \(1001\) |
Input:
int((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^2,x,method=_R ETURNVERBOSE)
Output:
1/e*(1/(a^2+b^2)^4*(1/2*(5*a^4*b-10*a^2*b^3+b^5)*ln(1+tan(e*x+d)^2)+(a^5-1 0*a^3*b^2+5*a*b^4)*arctan(tan(e*x+d)))-1/3*(a^2-b^2)/(a^2+b^2)/(b+a*tan(e* x+d))^3-1/2*b*(3*a^2-b^2)/(a^2+b^2)^2/(b+a*tan(e*x+d))^2+(a^4-6*a^2*b^2+b^ 4)/(a^2+b^2)^3/(b+a*tan(e*x+d))-b*(5*a^4-10*a^2*b^2+b^4)/(a^2+b^2)^4*ln(b+ a*tan(e*x+d)))
Leaf count of result is larger than twice the leaf count of optimal. 580 vs. \(2 (193) = 386\).
Time = 0.10 (sec) , antiderivative size = 580, normalized size of antiderivative = 2.94 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=-\frac {2 \, a^{8} + 7 \, a^{6} b^{2} + 66 \, a^{4} b^{4} - 27 \, a^{2} b^{6} + {\left (21 \, a^{7} b - 56 \, a^{5} b^{3} + 11 \, a^{3} b^{5} - 6 \, {\left (a^{8} - 10 \, a^{6} b^{2} + 5 \, a^{4} b^{4}\right )} e x\right )} \tan \left (e x + d\right )^{3} - 6 \, {\left (a^{5} b^{3} - 10 \, a^{3} b^{5} + 5 \, a b^{7}\right )} e x - 3 \, {\left (2 \, a^{8} - 31 \, a^{6} b^{2} + 46 \, a^{4} b^{4} - 9 \, a^{2} b^{6} + 6 \, {\left (a^{7} b - 10 \, a^{5} b^{3} + 5 \, a^{3} b^{5}\right )} e x\right )} \tan \left (e x + d\right )^{2} + 3 \, {\left (5 \, a^{4} b^{4} - 10 \, a^{2} b^{6} + b^{8} + {\left (5 \, a^{7} b - 10 \, a^{5} b^{3} + a^{3} b^{5}\right )} \tan \left (e x + d\right )^{3} + 3 \, {\left (5 \, a^{6} b^{2} - 10 \, a^{4} b^{4} + a^{2} b^{6}\right )} \tan \left (e x + d\right )^{2} + 3 \, {\left (5 \, a^{5} b^{3} - 10 \, a^{3} b^{5} + a b^{7}\right )} \tan \left (e x + d\right )\right )} \log \left (\frac {a^{2} \tan \left (e x + d\right )^{2} + 2 \, a b \tan \left (e x + d\right ) + b^{2}}{\tan \left (e x + d\right )^{2} + 1}\right ) - 3 \, {\left (a^{7} b - 46 \, a^{5} b^{3} + 35 \, a^{3} b^{5} - 6 \, a b^{7} + 6 \, {\left (a^{6} b^{2} - 10 \, a^{4} b^{4} + 5 \, a^{2} b^{6}\right )} e x\right )} \tan \left (e x + d\right )}{6 \, {\left ({\left (a^{11} + 4 \, a^{9} b^{2} + 6 \, a^{7} b^{4} + 4 \, a^{5} b^{6} + a^{3} b^{8}\right )} e \tan \left (e x + d\right )^{3} + 3 \, {\left (a^{10} b + 4 \, a^{8} b^{3} + 6 \, a^{6} b^{5} + 4 \, a^{4} b^{7} + a^{2} b^{9}\right )} e \tan \left (e x + d\right )^{2} + 3 \, {\left (a^{9} b^{2} + 4 \, a^{7} b^{4} + 6 \, a^{5} b^{6} + 4 \, a^{3} b^{8} + a b^{10}\right )} e \tan \left (e x + d\right ) + {\left (a^{8} b^{3} + 4 \, a^{6} b^{5} + 6 \, a^{4} b^{7} + 4 \, a^{2} b^{9} + b^{11}\right )} e\right )}} \] Input:
integrate((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^2,x, al gorithm="fricas")
Output:
-1/6*(2*a^8 + 7*a^6*b^2 + 66*a^4*b^4 - 27*a^2*b^6 + (21*a^7*b - 56*a^5*b^3 + 11*a^3*b^5 - 6*(a^8 - 10*a^6*b^2 + 5*a^4*b^4)*e*x)*tan(e*x + d)^3 - 6*( a^5*b^3 - 10*a^3*b^5 + 5*a*b^7)*e*x - 3*(2*a^8 - 31*a^6*b^2 + 46*a^4*b^4 - 9*a^2*b^6 + 6*(a^7*b - 10*a^5*b^3 + 5*a^3*b^5)*e*x)*tan(e*x + d)^2 + 3*(5 *a^4*b^4 - 10*a^2*b^6 + b^8 + (5*a^7*b - 10*a^5*b^3 + a^3*b^5)*tan(e*x + d )^3 + 3*(5*a^6*b^2 - 10*a^4*b^4 + a^2*b^6)*tan(e*x + d)^2 + 3*(5*a^5*b^3 - 10*a^3*b^5 + a*b^7)*tan(e*x + d))*log((a^2*tan(e*x + d)^2 + 2*a*b*tan(e*x + d) + b^2)/(tan(e*x + d)^2 + 1)) - 3*(a^7*b - 46*a^5*b^3 + 35*a^3*b^5 - 6*a*b^7 + 6*(a^6*b^2 - 10*a^4*b^4 + 5*a^2*b^6)*e*x)*tan(e*x + d))/((a^11 + 4*a^9*b^2 + 6*a^7*b^4 + 4*a^5*b^6 + a^3*b^8)*e*tan(e*x + d)^3 + 3*(a^10*b + 4*a^8*b^3 + 6*a^6*b^5 + 4*a^4*b^7 + a^2*b^9)*e*tan(e*x + d)^2 + 3*(a^9* b^2 + 4*a^7*b^4 + 6*a^5*b^6 + 4*a^3*b^8 + a*b^10)*e*tan(e*x + d) + (a^8*b^ 3 + 4*a^6*b^5 + 6*a^4*b^7 + 4*a^2*b^9 + b^11)*e)
Exception generated. \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\text {Exception raised: AttributeError} \] Input:
integrate((a+b*tan(e*x+d))/(b**2+2*a*b*tan(e*x+d)+a**2*tan(e*x+d)**2)**2,x )
Output:
Exception raised: AttributeError >> 'NoneType' object has no attribute 'pr imitive'
Leaf count of result is larger than twice the leaf count of optimal. 419 vs. \(2 (193) = 386\).
Time = 0.13 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.13 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\frac {\frac {6 \, {\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} {\left (e x + d\right )}}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} - \frac {6 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \log \left (a \tan \left (e x + d\right ) + b\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {3 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} - \frac {2 \, a^{6} + 5 \, a^{4} b^{2} + 40 \, a^{2} b^{4} - 11 \, b^{6} - 6 \, {\left (a^{6} - 6 \, a^{4} b^{2} + a^{2} b^{4}\right )} \tan \left (e x + d\right )^{2} - 3 \, {\left (a^{5} b - 26 \, a^{3} b^{3} + 5 \, a b^{5}\right )} \tan \left (e x + d\right )}{a^{6} b^{3} + 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} + b^{9} + {\left (a^{9} + 3 \, a^{7} b^{2} + 3 \, a^{5} b^{4} + a^{3} b^{6}\right )} \tan \left (e x + d\right )^{3} + 3 \, {\left (a^{8} b + 3 \, a^{6} b^{3} + 3 \, a^{4} b^{5} + a^{2} b^{7}\right )} \tan \left (e x + d\right )^{2} + 3 \, {\left (a^{7} b^{2} + 3 \, a^{5} b^{4} + 3 \, a^{3} b^{6} + a b^{8}\right )} \tan \left (e x + d\right )}}{6 \, e} \] Input:
integrate((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^2,x, al gorithm="maxima")
Output:
1/6*(6*(a^5 - 10*a^3*b^2 + 5*a*b^4)*(e*x + d)/(a^8 + 4*a^6*b^2 + 6*a^4*b^4 + 4*a^2*b^6 + b^8) - 6*(5*a^4*b - 10*a^2*b^3 + b^5)*log(a*tan(e*x + d) + b)/(a^8 + 4*a^6*b^2 + 6*a^4*b^4 + 4*a^2*b^6 + b^8) + 3*(5*a^4*b - 10*a^2*b ^3 + b^5)*log(tan(e*x + d)^2 + 1)/(a^8 + 4*a^6*b^2 + 6*a^4*b^4 + 4*a^2*b^6 + b^8) - (2*a^6 + 5*a^4*b^2 + 40*a^2*b^4 - 11*b^6 - 6*(a^6 - 6*a^4*b^2 + a^2*b^4)*tan(e*x + d)^2 - 3*(a^5*b - 26*a^3*b^3 + 5*a*b^5)*tan(e*x + d))/( a^6*b^3 + 3*a^4*b^5 + 3*a^2*b^7 + b^9 + (a^9 + 3*a^7*b^2 + 3*a^5*b^4 + a^3 *b^6)*tan(e*x + d)^3 + 3*(a^8*b + 3*a^6*b^3 + 3*a^4*b^5 + a^2*b^7)*tan(e*x + d)^2 + 3*(a^7*b^2 + 3*a^5*b^4 + 3*a^3*b^6 + a*b^8)*tan(e*x + d)))/e
Time = 0.47 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.75 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\frac {{\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} {\left (e x + d\right )}}{a^{8} e + 4 \, a^{6} b^{2} e + 6 \, a^{4} b^{4} e + 4 \, a^{2} b^{6} e + b^{8} e} + \frac {{\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{2 \, {\left (a^{8} e + 4 \, a^{6} b^{2} e + 6 \, a^{4} b^{4} e + 4 \, a^{2} b^{6} e + b^{8} e\right )}} - \frac {{\left (5 \, a^{5} b - 10 \, a^{3} b^{3} + a b^{5}\right )} \log \left ({\left | a \tan \left (e x + d\right ) + b \right |}\right )}{a^{9} e + 4 \, a^{7} b^{2} e + 6 \, a^{5} b^{4} e + 4 \, a^{3} b^{6} e + a b^{8} e} - \frac {2 \, a^{8} + 7 \, a^{6} b^{2} + 45 \, a^{4} b^{4} + 29 \, a^{2} b^{6} - 11 \, b^{8} - 6 \, {\left (a^{8} - 5 \, a^{6} b^{2} - 5 \, a^{4} b^{4} + a^{2} b^{6}\right )} \tan \left (e x + d\right )^{2} - 3 \, {\left (a^{7} b - 25 \, a^{5} b^{3} - 21 \, a^{3} b^{5} + 5 \, a b^{7}\right )} \tan \left (e x + d\right )}{6 \, {\left (a^{2} + b^{2}\right )}^{4} {\left (a \tan \left (e x + d\right ) + b\right )}^{3} e} \] Input:
integrate((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^2,x, al gorithm="giac")
Output:
(a^5 - 10*a^3*b^2 + 5*a*b^4)*(e*x + d)/(a^8*e + 4*a^6*b^2*e + 6*a^4*b^4*e + 4*a^2*b^6*e + b^8*e) + 1/2*(5*a^4*b - 10*a^2*b^3 + b^5)*log(tan(e*x + d) ^2 + 1)/(a^8*e + 4*a^6*b^2*e + 6*a^4*b^4*e + 4*a^2*b^6*e + b^8*e) - (5*a^5 *b - 10*a^3*b^3 + a*b^5)*log(abs(a*tan(e*x + d) + b))/(a^9*e + 4*a^7*b^2*e + 6*a^5*b^4*e + 4*a^3*b^6*e + a*b^8*e) - 1/6*(2*a^8 + 7*a^6*b^2 + 45*a^4* b^4 + 29*a^2*b^6 - 11*b^8 - 6*(a^8 - 5*a^6*b^2 - 5*a^4*b^4 + a^2*b^6)*tan( e*x + d)^2 - 3*(a^7*b - 25*a^5*b^3 - 21*a^3*b^5 + 5*a*b^7)*tan(e*x + d))/( (a^2 + b^2)^4*(a*tan(e*x + d) + b)^3*e)
Time = 16.34 (sec) , antiderivative size = 388, normalized size of antiderivative = 1.97 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx=\frac {\frac {{\mathrm {tan}\left (d+e\,x\right )}^2\,\left (a^6-6\,a^4\,b^2+a^2\,b^4\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}-\frac {2\,a^6+5\,a^4\,b^2+40\,a^2\,b^4-11\,b^6}{6\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {\mathrm {tan}\left (d+e\,x\right )\,\left (a^5\,b-26\,a^3\,b^3+5\,a\,b^5\right )}{2\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}}{e\,\left (a^3\,{\mathrm {tan}\left (d+e\,x\right )}^3+3\,a^2\,b\,{\mathrm {tan}\left (d+e\,x\right )}^2+3\,a\,b^2\,\mathrm {tan}\left (d+e\,x\right )+b^3\right )}-\frac {\ln \left (b+a\,\mathrm {tan}\left (d+e\,x\right )\right )\,\left (\frac {5\,b}{{\left (a^2+b^2\right )}^2}-\frac {20\,b^3}{{\left (a^2+b^2\right )}^3}+\frac {16\,b^5}{{\left (a^2+b^2\right )}^4}\right )}{e}+\frac {\ln \left (\mathrm {tan}\left (d+e\,x\right )-\mathrm {i}\right )\,\left (a+b\,1{}\mathrm {i}\right )}{2\,e\,\left (a^4\,1{}\mathrm {i}+4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}-4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (d+e\,x\right )+1{}\mathrm {i}\right )\,\left (a-b\,1{}\mathrm {i}\right )}{2\,e\,\left (a^4\,1{}\mathrm {i}-4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}+4\,a\,b^3+b^4\,1{}\mathrm {i}\right )} \] Input:
int((a + b*tan(d + e*x))/(b^2 + a^2*tan(d + e*x)^2 + 2*a*b*tan(d + e*x))^2 ,x)
Output:
((tan(d + e*x)^2*(a^6 + a^2*b^4 - 6*a^4*b^2))/(a^6 + b^6 + 3*a^2*b^4 + 3*a ^4*b^2) - (2*a^6 - 11*b^6 + 40*a^2*b^4 + 5*a^4*b^2)/(6*(a^6 + b^6 + 3*a^2* b^4 + 3*a^4*b^2)) + (tan(d + e*x)*(5*a*b^5 + a^5*b - 26*a^3*b^3))/(2*(a^6 + b^6 + 3*a^2*b^4 + 3*a^4*b^2)))/(e*(b^3 + a^3*tan(d + e*x)^3 + 3*a^2*b*ta n(d + e*x)^2 + 3*a*b^2*tan(d + e*x))) - (log(b + a*tan(d + e*x))*((5*b)/(a ^2 + b^2)^2 - (20*b^3)/(a^2 + b^2)^3 + (16*b^5)/(a^2 + b^2)^4))/e + (log(t an(d + e*x) - 1i)*(a + b*1i))/(2*e*(4*a^3*b - 4*a*b^3 + a^4*1i + b^4*1i - a^2*b^2*6i)) - (log(tan(d + e*x) + 1i)*(a - b*1i))/(2*e*(4*a*b^3 - 4*a^3*b + a^4*1i + b^4*1i - a^2*b^2*6i))
Time = 0.15 (sec) , antiderivative size = 1177, normalized size of antiderivative = 5.97 \[ \int \frac {a+b \tan (d+e x)}{\left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right )^2} \, dx =\text {Too large to display} \] Input:
int((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2)^2,x)
Output:
(15*log(tan(d + e*x)**2 + 1)*tan(d + e*x)**3*a**7*b**2 - 30*log(tan(d + e* x)**2 + 1)*tan(d + e*x)**3*a**5*b**4 + 3*log(tan(d + e*x)**2 + 1)*tan(d + e*x)**3*a**3*b**6 + 45*log(tan(d + e*x)**2 + 1)*tan(d + e*x)**2*a**6*b**3 - 90*log(tan(d + e*x)**2 + 1)*tan(d + e*x)**2*a**4*b**5 + 9*log(tan(d + e* x)**2 + 1)*tan(d + e*x)**2*a**2*b**7 + 45*log(tan(d + e*x)**2 + 1)*tan(d + e*x)*a**5*b**4 - 90*log(tan(d + e*x)**2 + 1)*tan(d + e*x)*a**3*b**6 + 9*l og(tan(d + e*x)**2 + 1)*tan(d + e*x)*a*b**8 + 15*log(tan(d + e*x)**2 + 1)* a**4*b**5 - 30*log(tan(d + e*x)**2 + 1)*a**2*b**7 + 3*log(tan(d + e*x)**2 + 1)*b**9 - 30*log(tan(d + e*x)*a + b)*tan(d + e*x)**3*a**7*b**2 + 60*log( tan(d + e*x)*a + b)*tan(d + e*x)**3*a**5*b**4 - 6*log(tan(d + e*x)*a + b)* tan(d + e*x)**3*a**3*b**6 - 90*log(tan(d + e*x)*a + b)*tan(d + e*x)**2*a** 6*b**3 + 180*log(tan(d + e*x)*a + b)*tan(d + e*x)**2*a**4*b**5 - 18*log(ta n(d + e*x)*a + b)*tan(d + e*x)**2*a**2*b**7 - 90*log(tan(d + e*x)*a + b)*t an(d + e*x)*a**5*b**4 + 180*log(tan(d + e*x)*a + b)*tan(d + e*x)*a**3*b**6 - 18*log(tan(d + e*x)*a + b)*tan(d + e*x)*a*b**8 - 30*log(tan(d + e*x)*a + b)*a**4*b**5 + 60*log(tan(d + e*x)*a + b)*a**2*b**7 - 6*log(tan(d + e*x) *a + b)*b**9 - 2*tan(d + e*x)**3*a**9 + 6*tan(d + e*x)**3*a**8*b*e*x + 10* tan(d + e*x)**3*a**7*b**2 - 60*tan(d + e*x)**3*a**6*b**3*e*x + 10*tan(d + e*x)**3*a**5*b**4 + 30*tan(d + e*x)**3*a**4*b**5*e*x - 2*tan(d + e*x)**3*a **3*b**6 + 18*tan(d + e*x)**2*a**7*b**2*e*x - 180*tan(d + e*x)**2*a**5*...