Integrand size = 26, antiderivative size = 62 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\text {arctanh}(\sin (e+f x)) \cos (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}}+\frac {\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}} \] Output:
-1/2*arctanh(sin(f*x+e))*cos(f*x+e)/f/(a*cos(f*x+e)^2)^(1/2)+1/2*tan(f*x+e )/f/(a*cos(f*x+e)^2)^(1/2)
Time = 0.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.69 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {-\text {arctanh}(\sin (e+f x)) \cos (e+f x)+\tan (e+f x)}{2 f \sqrt {a \cos ^2(e+f x)}} \] Input:
Integrate[Tan[e + f*x]^2/Sqrt[a - a*Sin[e + f*x]^2],x]
Output:
(-(ArcTanh[Sin[e + f*x]]*Cos[e + f*x]) + Tan[e + f*x])/(2*f*Sqrt[a*Cos[e + f*x]^2])
Time = 0.45 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.89, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 3655, 3042, 3686, 3042, 3091, 3042, 4257}
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(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^2}{\sqrt {a-a \sin (e+f x)^2}}dx\) |
\(\Big \downarrow \) 3655 |
\(\displaystyle \int \frac {\tan ^2(e+f x)}{\sqrt {a \cos ^2(e+f x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan \left (e+f x+\frac {\pi }{2}\right )^2 \sqrt {a \sin \left (e+f x+\frac {\pi }{2}\right )^2}}dx\) |
\(\Big \downarrow \) 3686 |
\(\displaystyle \frac {\cos (e+f x) \int \sec (e+f x) \tan ^2(e+f x)dx}{\sqrt {a \cos ^2(e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) \int \sec (e+f x) \tan (e+f x)^2dx}{\sqrt {a \cos ^2(e+f x)}}\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle \frac {\cos (e+f x) \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {1}{2} \int \sec (e+f x)dx\right )}{\sqrt {a \cos ^2(e+f x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {1}{2} \int \csc \left (e+f x+\frac {\pi }{2}\right )dx\right )}{\sqrt {a \cos ^2(e+f x)}}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\cos (e+f x) \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {\text {arctanh}(\sin (e+f x))}{2 f}\right )}{\sqrt {a \cos ^2(e+f x)}}\) |
Input:
Int[Tan[e + f*x]^2/Sqrt[a - a*Sin[e + f*x]^2],x]
Output:
(Cos[e + f*x]*(-1/2*ArcTanh[Sin[e + f*x]]/f + (Sec[e + f*x]*Tan[e + f*x])/ (2*f)))/Sqrt[a*Cos[e + f*x]^2]
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[A ctivateTrig[u*(a*cos[e + f*x]^2)^p], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ [a + b, 0]
Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^ n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])) Int[ActivateTrig[u]*(Si n[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] && !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] || MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) / ; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.52 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.71
method | result | size |
default | \(\frac {\sqrt {a \sin \left (f x +e \right )^{2}}\, \left (-\ln \left (\frac {2 \sqrt {a}\, \sqrt {a \sin \left (f x +e \right )^{2}}+2 a}{\cos \left (f x +e \right )}\right ) \cos \left (f x +e \right )^{2} a +\sqrt {a}\, \sqrt {a \sin \left (f x +e \right )^{2}}\right )}{2 \cos \left (f x +e \right ) a^{\frac {3}{2}} \sin \left (f x +e \right ) \sqrt {a \cos \left (f x +e \right )^{2}}\, f}\) | \(106\) |
risch | \(-\frac {i \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{\sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) f}+\frac {\ln \left ({\mathrm e}^{i f x}-i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}-\frac {\ln \left ({\mathrm e}^{i f x}+i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}}\) | \(163\) |
Input:
int(tan(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
1/2/cos(f*x+e)*(a*sin(f*x+e)^2)^(1/2)*(-ln(2/cos(f*x+e)*(a^(1/2)*(a*sin(f* x+e)^2)^(1/2)+a))*cos(f*x+e)^2*a+a^(1/2)*(a*sin(f*x+e)^2)^(1/2))/a^(3/2)/s in(f*x+e)/(a*cos(f*x+e)^2)^(1/2)/f
Time = 0.09 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.08 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (\cos \left (f x + e\right )^{2} \log \left (-\frac {\sin \left (f x + e\right ) + 1}{\sin \left (f x + e\right ) - 1}\right ) - 2 \, \sin \left (f x + e\right )\right )}}{4 \, a f \cos \left (f x + e\right )^{3}} \] Input:
integrate(tan(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")
Output:
-1/4*sqrt(a*cos(f*x + e)^2)*(cos(f*x + e)^2*log(-(sin(f*x + e) + 1)/(sin(f *x + e) - 1)) - 2*sin(f*x + e))/(a*f*cos(f*x + e)^3)
\[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\int \frac {\tan ^{2}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \] Input:
integrate(tan(f*x+e)**2/(a-a*sin(f*x+e)**2)**(1/2),x)
Output:
Integral(tan(e + f*x)**2/sqrt(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1)), x )
Leaf count of result is larger than twice the leaf count of optimal. 527 vs. \(2 (54) = 108\).
Time = 0.17 (sec) , antiderivative size = 527, normalized size of antiderivative = 8.50 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx =\text {Too large to display} \] Input:
integrate(tan(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")
Output:
1/4*(4*(sin(3*f*x + 3*e) - sin(f*x + e))*cos(4*f*x + 4*e) - (2*(2*cos(2*f* x + 2*e) + 1)*cos(4*f*x + 4*e) + cos(4*f*x + 4*e)^2 + 4*cos(2*f*x + 2*e)^2 + sin(4*f*x + 4*e)^2 + 4*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + 4*sin(2*f*x + 2*e)^2 + 4*cos(2*f*x + 2*e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2 *sin(f*x + e) + 1) + (2*(2*cos(2*f*x + 2*e) + 1)*cos(4*f*x + 4*e) + cos(4* f*x + 4*e)^2 + 4*cos(2*f*x + 2*e)^2 + sin(4*f*x + 4*e)^2 + 4*sin(4*f*x + 4 *e)*sin(2*f*x + 2*e) + 4*sin(2*f*x + 2*e)^2 + 4*cos(2*f*x + 2*e) + 1)*log( cos(f*x + e)^2 + sin(f*x + e)^2 - 2*sin(f*x + e) + 1) - 4*(cos(3*f*x + 3*e ) - cos(f*x + e))*sin(4*f*x + 4*e) + 4*(2*cos(2*f*x + 2*e) + 1)*sin(3*f*x + 3*e) - 8*cos(3*f*x + 3*e)*sin(2*f*x + 2*e) + 8*cos(f*x + e)*sin(2*f*x + 2*e) - 8*cos(2*f*x + 2*e)*sin(f*x + e) - 4*sin(f*x + e))/((2*(2*cos(2*f*x + 2*e) + 1)*cos(4*f*x + 4*e) + cos(4*f*x + 4*e)^2 + 4*cos(2*f*x + 2*e)^2 + sin(4*f*x + 4*e)^2 + 4*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + 4*sin(2*f*x + 2*e)^2 + 4*cos(2*f*x + 2*e) + 1)*sqrt(a)*f)
Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (54) = 108\).
Time = 0.52 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.55 \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\frac {\frac {\log \left ({\left | \frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \right |}\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} - \frac {\log \left ({\left | \frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \right |}\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} - \frac {4 \, {\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left ({\left (\frac {1}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}^{2} - 4\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )}}{4 \, \sqrt {a} f} \] Input:
integrate(tan(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="giac")
Output:
1/4*(log(abs(1/tan(1/2*f*x + 1/2*e) + tan(1/2*f*x + 1/2*e) + 2))/sgn(tan(1 /2*f*x + 1/2*e)^4 - 1) - log(abs(1/tan(1/2*f*x + 1/2*e) + tan(1/2*f*x + 1/ 2*e) - 2))/sgn(tan(1/2*f*x + 1/2*e)^4 - 1) - 4*(1/tan(1/2*f*x + 1/2*e) + t an(1/2*f*x + 1/2*e))/(((1/tan(1/2*f*x + 1/2*e) + tan(1/2*f*x + 1/2*e))^2 - 4)*sgn(tan(1/2*f*x + 1/2*e)^4 - 1)))/(sqrt(a)*f)
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{\sqrt {a-a\,{\sin \left (e+f\,x\right )}^2}} \,d x \] Input:
int(tan(e + f*x)^2/(a - a*sin(e + f*x)^2)^(1/2),x)
Output:
int(tan(e + f*x)^2/(a - a*sin(e + f*x)^2)^(1/2), x)
\[ \int \frac {\tan ^2(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\sqrt {a}\, \left (\int \frac {\sqrt {-\sin \left (f x +e \right )^{2}+1}\, \tan \left (f x +e \right )^{2}}{\sin \left (f x +e \right )^{2}-1}d x \right )}{a} \] Input:
int(tan(f*x+e)^2/(a-a*sin(f*x+e)^2)^(1/2),x)
Output:
( - sqrt(a)*int((sqrt( - sin(e + f*x)**2 + 1)*tan(e + f*x)**2)/(sin(e + f* x)**2 - 1),x))/a