Integrand size = 23, antiderivative size = 53 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{3/2} d}+\frac {\tan (c+d x)}{(a+b) d} \] Output:
-a^(1/2)*arctan((a+b)^(1/2)*tan(d*x+c)/a^(1/2))/(a+b)^(3/2)/d+tan(d*x+c)/( a+b)/d
Time = 0.40 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{3/2} d}+\frac {\tan (c+d x)}{(a+b) d} \] Input:
Integrate[Tan[c + d*x]^2/(a + b*Sin[c + d*x]^2),x]
Output:
-((Sqrt[a]*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/((a + b)^(3/2)*d)) + Tan[c + d*x]/((a + b)*d)
Time = 0.24 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3674, 262, 218}
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 {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^2}{a+b \sin (c+d x)^2}dx\) |
\(\Big \downarrow \) 3674 |
\(\displaystyle \frac {\int \frac {\tan ^2(c+d x)}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle \frac {\frac {\tan (c+d x)}{a+b}-\frac {a \int \frac {1}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{a+b}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {\tan (c+d x)}{a+b}-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{3/2}}}{d}\) |
Input:
Int[Tan[c + d*x]^2/(a + b*Sin[c + d*x]^2),x]
Output:
(-((Sqrt[a]*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(a + b)^(3/2)) + T an[c + d*x]/(a + b))/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*((d_.)*tan[(e_.) + (f_.) *(x_)])^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[f f/f Subst[Int[(d*ff*x)^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(p + 1) ), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m}, x] && IntegerQ [p]
Time = 0.98 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (d x +c \right )}{a +b}-\frac {a \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{\left (a +b \right ) \sqrt {a \left (a +b \right )}}}{d}\) | \(51\) |
default | \(\frac {\frac {\tan \left (d x +c \right )}{a +b}-\frac {a \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{\left (a +b \right ) \sqrt {a \left (a +b \right )}}}{d}\) | \(51\) |
risch | \(\frac {2 i}{d \left (a +b \right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 \left (a +b \right )^{2} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 \left (a +b \right )^{2} d}\) | \(127\) |
Input:
int(tan(d*x+c)^2/(a+b*sin(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(1/(a+b)*tan(d*x+c)-a/(a+b)/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a *(a+b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (45) = 90\).
Time = 0.10 (sec) , antiderivative size = 300, normalized size of antiderivative = 5.66 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\left [\frac {\sqrt {-\frac {a}{a + b}} \cos \left (d x + c\right ) \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) + 4 \, \sin \left (d x + c\right )}{4 \, {\left (a + b\right )} d \cos \left (d x + c\right )}, \frac {\sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right )}{2 \, {\left (a + b\right )} d \cos \left (d x + c\right )}\right ] \] Input:
integrate(tan(d*x+c)^2/(a+b*sin(d*x+c)^2),x, algorithm="fricas")
Output:
[1/4*(sqrt(-a/(a + b))*cos(d*x + c)*log(((8*a^2 + 8*a*b + b^2)*cos(d*x + c )^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^2 + 4*((2*a^2 + 3*a*b + b^2)*co s(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-a/(a + b))*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^2)*cos(d*x + c) ^2 + a^2 + 2*a*b + b^2)) + 4*sin(d*x + c))/((a + b)*d*cos(d*x + c)), 1/2*( sqrt(a/(a + b))*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)*sqrt(a/(a + b))/(a*cos(d*x + c)*sin(d*x + c)))*cos(d*x + c) + 2*sin(d*x + c))/((a + b) *d*cos(d*x + c))]
\[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\int \frac {\tan ^{2}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(tan(d*x+c)**2/(a+b*sin(d*x+c)**2),x)
Output:
Integral(tan(c + d*x)**2/(a + b*sin(c + d*x)**2), x)
Time = 0.11 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {a \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} {\left (a + b\right )}} - \frac {\tan \left (d x + c\right )}{a + b}}{d} \] Input:
integrate(tan(d*x+c)^2/(a+b*sin(d*x+c)^2),x, algorithm="maxima")
Output:
-(a*arctan((a + b)*tan(d*x + c)/sqrt((a + b)*a))/(sqrt((a + b)*a)*(a + b)) - tan(d*x + c)/(a + b))/d
Time = 0.59 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.25 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {a \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )}{\sqrt {a^{2} + a b} {\left (a d + b d\right )}} + \frac {\tan \left (d x + c\right )}{a d + b d} \] Input:
integrate(tan(d*x+c)^2/(a+b*sin(d*x+c)^2),x, algorithm="giac")
Output:
-a*arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a^2 + a*b))/(sqrt(a^2 + a *b)*(a*d + b*d)) + tan(d*x + c)/(a*d + b*d)
Time = 34.67 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )}{d\,\left (a+b\right )}-\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (2\,a+2\,b\right )}{2\,\sqrt {a}\,\sqrt {a+b}}\right )}{d\,{\left (a+b\right )}^{3/2}} \] Input:
int(tan(c + d*x)^2/(a + b*sin(c + d*x)^2),x)
Output:
tan(c + d*x)/(d*(a + b)) - (a^(1/2)*atan((tan(c + d*x)*(2*a + 2*b))/(2*a^( 1/2)*(a + b)^(1/2))))/(d*(a + b)^(3/2))
Time = 0.41 (sec) , antiderivative size = 582, normalized size of antiderivative = 10.98 \[ \int \frac {\tan ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx =\text {Too large to display} \] Input:
int(tan(d*x+c)^2/(a+b*sin(d*x+c)^2),x)
Output:
(2*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan( (tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)))*cos( c + d*x) - 2*sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)))*cos(c + d*x)*a - 2*sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)* a)/(sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)))*cos(c + d*x)*b + sqrt( b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)* log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2)) - sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2) ) + sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)*log( - sqrt (2*sqrt(b)*sqrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2))*a + sqrt(a)* sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)*log( - sqrt(2*sqrt(b)*s qrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2))*b - sqrt(a)*sqrt(2*sqrt( b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2))*a - sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*cos(c + d*x)*log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + sqrt(a )*tan((c + d*x)/2))*b + 2*sin(c + d*x)*a**2 + 2*sin(c + d*x)*a*b)/(2*cos(c + d*x)*a*d*(a**2 + 2*a*b + b**2))