Integrand size = 39, antiderivative size = 101 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=-\frac {a \left (a^2-3 b^2\right ) x}{\left (a^2+b^2\right )^2}+\frac {b \left (3 a^2-b^2\right ) \log (b \cos (d+e x)+a \sin (d+e x))}{\left (a^2+b^2\right )^2 e}-\frac {a^2-b^2}{\left (a^2+b^2\right ) e (b+a \tan (d+e x))} \] Output:
-a*(a^2-3*b^2)*x/(a^2+b^2)^2+b*(3*a^2-b^2)*ln(b*cos(e*x+d)+a*sin(e*x+d))/( a^2+b^2)^2/e-(a^2-b^2)/(a^2+b^2)/e/(b+a*tan(e*x+d))
Result contains complex when optimal does not.
Time = 1.74 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.85 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=\frac {\frac {b (-((a+i b) \log (i-\tan (d+e x)))-(a-i b) \log (i+\tan (d+e x))+2 a \log (b+a \tan (d+e x)))}{a^2+b^2}+(a-b) (a+b) \left (\frac {i \log (i-\tan (d+e x))}{(a-i b)^2}-\frac {i \log (i+\tan (d+e x))}{(a+i b)^2}+\frac {2 a \left (2 b \log (b+a \tan (d+e x))-\frac {a^2+b^2}{b+a \tan (d+e x)}\right )}{\left (a^2+b^2\right )^2}\right )}{2 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),x]
Output:
((b*(-((a + I*b)*Log[I - Tan[d + e*x]]) - (a - I*b)*Log[I + Tan[d + e*x]] + 2*a*Log[b + a*Tan[d + e*x]]))/(a^2 + b^2) + (a - b)*(a + b)*((I*Log[I - Tan[d + e*x]])/(a - I*b)^2 - (I*Log[I + Tan[d + e*x]])/(a + I*b)^2 + (2*a* (2*b*Log[b + a*Tan[d + e*x]] - (a^2 + b^2)/(b + a*Tan[d + e*x])))/(a^2 + b ^2)^2))/(2*a*e)
Time = 0.74 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.24, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 4191, 27, 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)}{a^2 \tan ^2(d+e x)+2 a b \tan (d+e x)+b^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (d+e x)}{a^2 \tan (d+e x)^2+2 a b \tan (d+e x)+b^2}dx\) |
\(\Big \downarrow \) 4191 |
\(\displaystyle 4 a^2 \int \frac {a+b \tan (d+e x)}{4 \left (\tan (d+e x) a^2+b a\right )^2}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle a^2 \int \frac {a+b \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 \int \frac {a+b \tan (d+e x)}{\left (\tan (d+e x) a^2+b a\right )^2}dx\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle a^2 \left (\frac {\int \frac {2 a^2 b-a \left (a^2-b^2\right ) \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{e \left (a^2+b^2\right ) \left (a^3 \tan (d+e x)+a^2 b\right )}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 \left (\frac {\int \frac {2 a^2 b-a \left (a^2-b^2\right ) \tan (d+e x)}{\tan (d+e x) a^2+b a}dx}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{e \left (a^2+b^2\right ) \left (a^3 \tan (d+e x)+a^2 b\right )}\right )\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle a^2 \left (\frac {\frac {b \left (3 a^2-b^2\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 x \left (a^2-3 b^2\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{e \left (a^2+b^2\right ) \left (a^3 \tan (d+e x)+a^2 b\right )}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 \left (\frac {\frac {b \left (3 a^2-b^2\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 x \left (a^2-3 b^2\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{e \left (a^2+b^2\right ) \left (a^3 \tan (d+e x)+a^2 b\right )}\right )\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle a^2 \left (\frac {\frac {b \left (3 a^2-b^2\right ) \log (a \sin (d+e x)+b \cos (d+e x))}{e \left (a^2+b^2\right )}-\frac {a x \left (a^2-3 b^2\right )}{a^2+b^2}}{a^2 \left (a^2+b^2\right )}-\frac {a^2-b^2}{e \left (a^2+b^2\right ) \left (a^3 \tan (d+e x)+a^2 b\right )}\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),x ]
Output:
a^2*((-((a*(a^2 - 3*b^2)*x)/(a^2 + b^2)) + (b*(3*a^2 - b^2)*Log[b*Cos[d + e*x] + a*Sin[d + e*x]])/((a^2 + b^2)*e))/(a^2*(a^2 + b^2)) - (a^2 - b^2)/( (a^2 + b^2)*e*(a^2*b + a^3*Tan[d + e*x])))
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.17 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (-3 a^{2} b +b^{3}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2}+\left (-a^{3}+3 a \,b^{2}\right ) \arctan \left (\tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}-\frac {a^{2}-b^{2}}{\left (a^{2}+b^{2}\right ) \left (b +a \tan \left (e x +d \right )\right )}+\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}}{e}\) | \(125\) |
default | \(\frac {\frac {\frac {\left (-3 a^{2} b +b^{3}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2}+\left (-a^{3}+3 a \,b^{2}\right ) \arctan \left (\tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}-\frac {a^{2}-b^{2}}{\left (a^{2}+b^{2}\right ) \left (b +a \tan \left (e x +d \right )\right )}+\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}}{e}\) | \(125\) |
norman | \(\frac {\frac {\left (a^{2}-b^{2}\right ) a \tan \left (e x +d \right )}{b e \left (a^{2}+b^{2}\right )}-\frac {a^{2} \left (a^{2}-3 b^{2}\right ) x \tan \left (e x +d \right )}{\left (a^{2}+b^{2}\right )^{2}}-\frac {\left (a^{2}-3 b^{2}\right ) a b x}{\left (a^{2}+b^{2}\right )^{2}}}{b +a \tan \left (e x +d \right )}+\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (b +a \tan \left (e x +d \right )\right )}{e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (1+\tan \left (e x +d \right )^{2}\right )}{2 e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}\) | \(190\) |
parallelrisch | \(\frac {-2 x \tan \left (e x +d \right ) a^{4} b e +6 x \tan \left (e x +d \right ) a^{2} b^{3} e +6 \ln \left (b +a \tan \left (e x +d \right )\right ) \tan \left (e x +d \right ) a^{3} b^{2}-2 \ln \left (b +a \tan \left (e x +d \right )\right ) \tan \left (e x +d \right ) a \,b^{4}-3 \ln \left (1+\tan \left (e x +d \right )^{2}\right ) \tan \left (e x +d \right ) a^{3} b^{2}+\ln \left (1+\tan \left (e x +d \right )^{2}\right ) \tan \left (e x +d \right ) a \,b^{4}-2 x \,a^{3} b^{2} e +6 x a \,b^{4} e +6 \ln \left (b +a \tan \left (e x +d \right )\right ) a^{2} b^{3}-2 \ln \left (b +a \tan \left (e x +d \right )\right ) b^{5}-3 \ln \left (1+\tan \left (e x +d \right )^{2}\right ) a^{2} b^{3}+\ln \left (1+\tan \left (e x +d \right )^{2}\right ) b^{5}+2 a^{5} \tan \left (e x +d \right )-2 a \,b^{4} \tan \left (e x +d \right )}{2 \left (b +a \tan \left (e x +d \right )\right ) \left (a^{2}+b^{2}\right )^{2} b e}\) | \(266\) |
risch | \(\frac {i x b}{2 i a b +a^{2}-b^{2}}-\frac {x a}{2 i a b +a^{2}-b^{2}}-\frac {6 i b \,a^{2} x}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {2 i b^{3} x}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {6 i b \,a^{2} d}{e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {2 i b^{3} d}{e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {2 i a^{3}}{\left (-i b +a \right ) e \left (i b +a \right )^{2} \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 )}+\frac {2 i a \,b^{2}}{\left (-i b +a \right ) e \left (i b +a \right )^{2} \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 )}+\frac {3 b \ln \left ({\mathrm e}^{2 i \left (e x +d \right )}+\frac {i b -a}{i b +a}\right ) a^{2}}{e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (e x +d \right )}+\frac {i b -a}{i b +a}\right )}{e \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}\) | \(373\) |
Input:
int((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2),x,method=_RET URNVERBOSE)
Output:
1/e*(1/(a^2+b^2)^2*(1/2*(-3*a^2*b+b^3)*ln(1+tan(e*x+d)^2)+(-a^3+3*a*b^2)*a rctan(tan(e*x+d)))-(a^2-b^2)/(a^2+b^2)/(b+a*tan(e*x+d))+b*(3*a^2-b^2)/(a^2 +b^2)^2*ln(b+a*tan(e*x+d)))
Time = 0.08 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.89 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=-\frac {2 \, a^{4} - 2 \, a^{2} b^{2} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} e x - {\left (3 \, a^{2} b^{2} - b^{4} + {\left (3 \, a^{3} b - a b^{3}\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 ) - 2 \, {\left (a^{3} b - a b^{3} - {\left (a^{4} - 3 \, a^{2} b^{2}\right )} e x\right )} \tan \left (e x + d\right )}{2 \, {\left ({\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} e \tan \left (e x + d\right ) + {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\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),x, algo rithm="fricas")
Output:
-1/2*(2*a^4 - 2*a^2*b^2 + 2*(a^3*b - 3*a*b^3)*e*x - (3*a^2*b^2 - b^4 + (3* a^3*b - a*b^3)*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)) - 2*(a^3*b - a*b^3 - (a^4 - 3*a^2*b^2)*e*x)*t an(e*x + d))/((a^5 + 2*a^3*b^2 + a*b^4)*e*tan(e*x + d) + (a^4*b + 2*a^2*b^ 3 + b^5)*e)
Result contains complex when optimal does not.
Time = 0.75 (sec) , antiderivative size = 1360, normalized size of antiderivative = 13.47 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=\text {Too large to display} \] Input:
integrate((a+b*tan(e*x+d))/(b**2+2*a*b*tan(e*x+d)+a**2*tan(e*x+d)**2),x)
Output:
Piecewise((zoo*x*tan(d), Eq(a, 0) & Eq(b, 0) & Eq(e, 0)), (log(tan(d + e*x )**2 + 1)/(2*b*e), Eq(a, 0)), (I/(2*a*e*tan(d + e*x)**2 - 4*I*a*e*tan(d + e*x) - 2*a*e), Eq(b, -I*a)), (-I/(2*a*e*tan(d + e*x)**2 + 4*I*a*e*tan(d + e*x) - 2*a*e), Eq(b, I*a)), (x*(a + b*tan(d))/(a**2*tan(d)**2 + 2*a*b*tan( d) + b**2), Eq(e, 0)), (-2*a**4*e*x*tan(d + e*x)/(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e*tan(d + e*x) + 2*b**5*e) - 2*a**4/(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4*a**3* b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e*tan(d + e*x) + 2*b**5*e) - 2*a**3*b*e*x/(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e*tan(d + e*x) + 2*b**5*e) + 6*a**3*b*log (tan(d + e*x) + b/a)*tan(d + e*x)/(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4* a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e*tan(d + e*x) + 2*b** 5*e) - 3*a**3*b*log(tan(d + e*x)**2 + 1)*tan(d + e*x)/(2*a**5*e*tan(d + e* x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e* tan(d + e*x) + 2*b**5*e) + 6*a**2*b**2*e*x*tan(d + e*x)/(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4* e*tan(d + e*x) + 2*b**5*e) + 6*a**2*b**2*log(tan(d + e*x) + b/a)/(2*a**5*e *tan(d + e*x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a**2*b**3*e + 2*a*b**4*e*tan(d + e*x) + 2*b**5*e) - 3*a**2*b**2*log(tan(d + e*x)**2 + 1) /(2*a**5*e*tan(d + e*x) + 2*a**4*b*e + 4*a**3*b**2*e*tan(d + e*x) + 4*a...
Time = 0.11 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.59 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=-\frac {\frac {2 \, {\left (a^{3} - 3 \, a b^{2}\right )} {\left (e x + d\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, {\left (3 \, a^{2} b - b^{3}\right )} \log \left (a \tan \left (e x + d\right ) + b\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {2 \, {\left (a^{2} - b^{2}\right )}}{a^{2} b + b^{3} + {\left (a^{3} + a b^{2}\right )} \tan \left (e x + d\right )}}{2 \, 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),x, algo rithm="maxima")
Output:
-1/2*(2*(a^3 - 3*a*b^2)*(e*x + d)/(a^4 + 2*a^2*b^2 + b^4) - 2*(3*a^2*b - b ^3)*log(a*tan(e*x + d) + b)/(a^4 + 2*a^2*b^2 + b^4) + (3*a^2*b - b^3)*log( tan(e*x + d)^2 + 1)/(a^4 + 2*a^2*b^2 + b^4) + 2*(a^2 - b^2)/(a^2*b + b^3 + (a^3 + a*b^2)*tan(e*x + d)))/e
Time = 0.44 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.69 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=-\frac {{\left (a^{3} - 3 \, a b^{2}\right )} {\left (e x + d\right )}}{a^{4} e + 2 \, a^{2} b^{2} e + b^{4} e} - \frac {{\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right )}{2 \, {\left (a^{4} e + 2 \, a^{2} b^{2} e + b^{4} e\right )}} + \frac {{\left (3 \, a^{3} b - a b^{3}\right )} \log \left ({\left | a \tan \left (e x + d\right ) + b \right |}\right )}{a^{5} e + 2 \, a^{3} b^{2} e + a b^{4} e} - \frac {a^{4} - b^{4}}{{\left (a^{2} + b^{2}\right )}^{2} {\left (a \tan \left (e x + d\right ) + b\right )} 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),x, algo rithm="giac")
Output:
-(a^3 - 3*a*b^2)*(e*x + d)/(a^4*e + 2*a^2*b^2*e + b^4*e) - 1/2*(3*a^2*b - b^3)*log(tan(e*x + d)^2 + 1)/(a^4*e + 2*a^2*b^2*e + b^4*e) + (3*a^3*b - a* b^3)*log(abs(a*tan(e*x + d) + b))/(a^5*e + 2*a^3*b^2*e + a*b^4*e) - (a^4 - b^4)/((a^2 + b^2)^2*(a*tan(e*x + d) + b)*e)
Time = 15.75 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.50 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=\frac {b\,\ln \left (b+a\,\mathrm {tan}\left (d+e\,x\right )\right )\,\left (3\,a^2-b^2\right )}{e\,{\left (a^2+b^2\right )}^2}-\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^2\,1{}\mathrm {i}+2\,a\,b+b^2\,1{}\mathrm {i}\right )}-\frac {a^2-b^2}{e\,\left (a^2+b^2\right )\,\left (b+a\,\mathrm {tan}\left (d+e\,x\right )\right )}-\frac {\ln \left (\mathrm {tan}\left (d+e\,x\right )-\mathrm {i}\right )\,\left (a+b\,1{}\mathrm {i}\right )}{2\,e\,\left (a^2\,1{}\mathrm {i}+2\,a\,b-b^2\,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)),x )
Output:
(b*log(b + a*tan(d + e*x))*(3*a^2 - b^2))/(e*(a^2 + b^2)^2) - (log(tan(d + e*x) + 1i)*(a - b*1i))/(2*e*(2*a*b - a^2*1i + b^2*1i)) - (a^2 - b^2)/(e*( a^2 + b^2)*(b + a*tan(d + e*x))) - (log(tan(d + e*x) - 1i)*(a + b*1i))/(2* e*(2*a*b + a^2*1i - b^2*1i))
Time = 0.17 (sec) , antiderivative size = 298, normalized size of antiderivative = 2.95 \[ \int \frac {a+b \tan (d+e x)}{b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)} \, dx=\frac {-3 \,\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) \tan \left (e x +d \right ) a^{3} b^{2}+\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) \tan \left (e x +d \right ) a \,b^{4}-3 \,\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) a^{2} b^{3}+\mathrm {log}\left (\tan \left (e x +d \right )^{2}+1\right ) b^{5}+6 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) \tan \left (e x +d \right ) a^{3} b^{2}-2 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) \tan \left (e x +d \right ) a \,b^{4}+6 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) a^{2} b^{3}-2 \,\mathrm {log}\left (\tan \left (e x +d \right ) a +b \right ) b^{5}+2 \tan \left (e x +d \right ) a^{5}-2 \tan \left (e x +d \right ) a^{4} b e x +6 \tan \left (e x +d \right ) a^{2} b^{3} e x -2 \tan \left (e x +d \right ) a \,b^{4}-2 a^{3} b^{2} e x +6 a \,b^{4} e x}{2 b e \left (\tan \left (e x +d \right ) a^{5}+2 \tan \left (e x +d \right ) a^{3} b^{2}+\tan \left (e x +d \right ) a \,b^{4}+a^{4} b +2 a^{2} b^{3}+b^{5}\right )} \] Input:
int((a+b*tan(e*x+d))/(b^2+2*a*b*tan(e*x+d)+a^2*tan(e*x+d)^2),x)
Output:
( - 3*log(tan(d + e*x)**2 + 1)*tan(d + e*x)*a**3*b**2 + log(tan(d + e*x)** 2 + 1)*tan(d + e*x)*a*b**4 - 3*log(tan(d + e*x)**2 + 1)*a**2*b**3 + log(ta n(d + e*x)**2 + 1)*b**5 + 6*log(tan(d + e*x)*a + b)*tan(d + e*x)*a**3*b**2 - 2*log(tan(d + e*x)*a + b)*tan(d + e*x)*a*b**4 + 6*log(tan(d + e*x)*a + b)*a**2*b**3 - 2*log(tan(d + e*x)*a + b)*b**5 + 2*tan(d + e*x)*a**5 - 2*ta n(d + e*x)*a**4*b*e*x + 6*tan(d + e*x)*a**2*b**3*e*x - 2*tan(d + e*x)*a*b* *4 - 2*a**3*b**2*e*x + 6*a*b**4*e*x)/(2*b*e*(tan(d + e*x)*a**5 + 2*tan(d + e*x)*a**3*b**2 + tan(d + e*x)*a*b**4 + a**4*b + 2*a**2*b**3 + b**5))