Integrand size = 23, antiderivative size = 134 \[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{32 \sqrt {2} a^{3/2} f}+\frac {\cos (e+f x)}{32 f (a+a \sin (e+f x))^{3/2}}-\frac {\sec (e+f x)}{4 f (a+a \sin (e+f x))^{3/2}}+\frac {5 \sec (e+f x)}{8 a f \sqrt {a+a \sin (e+f x)}} \] Output:
1/64*arctanh(1/2*a^(1/2)*cos(f*x+e)*2^(1/2)/(a+a*sin(f*x+e))^(1/2))*2^(1/2 )/a^(3/2)/f+1/32*cos(f*x+e)/f/(a+a*sin(f*x+e))^(3/2)-1/4*sec(f*x+e)/f/(a+a *sin(f*x+e))^(3/2)+5/8*sec(f*x+e)/a/f/(a+a*sin(f*x+e))^(1/2)
Result contains complex when optimal does not.
Time = 1.11 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.96 \[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=-\frac {\sec (e+f x) \left (-25-\cos (2 (e+f x))+(2+2 i) (-1)^{3/4} \text {arctanh}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4-40 \sin (e+f x)\right )}{64 f (a (1+\sin (e+f x)))^{3/2}} \] Input:
Integrate[Tan[e + f*x]^2/(a + a*Sin[e + f*x])^(3/2),x]
Output:
-1/64*(Sec[e + f*x]*(-25 - Cos[2*(e + f*x)] + (2 + 2*I)*(-1)^(3/4)*ArcTanh [(1/2 + I/2)*(-1)^(3/4)*(-1 + Tan[(e + f*x)/4])]*(Cos[(e + f*x)/2] - Sin[( e + f*x)/2])*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^4 - 40*Sin[e + f*x]))/( f*(a*(1 + Sin[e + f*x]))^(3/2))
Time = 0.64 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.09, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 3191, 27, 3042, 3334, 3042, 3129, 3042, 3128, 219}
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)}{(a \sin (e+f x)+a)^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^2}{(a \sin (e+f x)+a)^{3/2}}dx\) |
\(\Big \downarrow \) 3191 |
\(\displaystyle \frac {\int -\frac {\sec ^2(e+f x) (3 a-8 a \sin (e+f x))}{2 \sqrt {\sin (e+f x) a+a}}dx}{4 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {\sec ^2(e+f x) (3 a-8 a \sin (e+f x))}{\sqrt {\sin (e+f x) a+a}}dx}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {3 a-8 a \sin (e+f x)}{\cos (e+f x)^2 \sqrt {\sin (e+f x) a+a}}dx}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3334 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \int \frac {1}{(\sin (e+f x) a+a)^{3/2}}dx-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \int \frac {1}{(\sin (e+f x) a+a)^{3/2}}dx-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3129 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \left (\frac {\int \frac {1}{\sqrt {\sin (e+f x) a+a}}dx}{4 a}-\frac {\cos (e+f x)}{2 f (a \sin (e+f x)+a)^{3/2}}\right )-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \left (\frac {\int \frac {1}{\sqrt {\sin (e+f x) a+a}}dx}{4 a}-\frac {\cos (e+f x)}{2 f (a \sin (e+f x)+a)^{3/2}}\right )-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3128 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \left (-\frac {\int \frac {1}{2 a-\frac {a^2 \cos ^2(e+f x)}{\sin (e+f x) a+a}}d\frac {a \cos (e+f x)}{\sqrt {\sin (e+f x) a+a}}}{2 a f}-\frac {\cos (e+f x)}{2 f (a \sin (e+f x)+a)^{3/2}}\right )-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\frac {1}{2} a^2 \left (-\frac {\text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {\cos (e+f x)}{2 f (a \sin (e+f x)+a)^{3/2}}\right )-\frac {5 a \sec (e+f x)}{f \sqrt {a \sin (e+f x)+a}}}{8 a^2}-\frac {\sec (e+f x)}{4 f (a \sin (e+f x)+a)^{3/2}}\) |
Input:
Int[Tan[e + f*x]^2/(a + a*Sin[e + f*x])^(3/2),x]
Output:
-1/4*Sec[e + f*x]/(f*(a + a*Sin[e + f*x])^(3/2)) - ((-5*a*Sec[e + f*x])/(f *Sqrt[a + a*Sin[e + f*x]]) + (a^2*(-1/2*ArcTanh[(Sqrt[a]*Cos[e + f*x])/(Sq rt[2]*Sqrt[a + a*Sin[e + f*x]])]/(Sqrt[2]*a^(3/2)*f) - Cos[e + f*x]/(2*f*( a + a*Sin[e + f*x])^(3/2))))/2)/(8*a^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_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2/d Subst[Int[1/(2*a - x^2), x], x, b*(Cos[c + d*x]/Sqrt[a + b*Sin[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*Cos[c + d*x]*((a + b*Sin[c + d*x])^n/(a*d*(2*n + 1))), x] + Simp[(n + 1)/(a*(2*n + 1)) Int[(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, -1] && IntegerQ[2*n]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[b*((a + b*Sin[e + f*x])^m/(a*f*(2*m - 1)*Cos[e + f*x])), x] - Simp[1/(a^2*(2*m - 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*((a*m - b*(2 *m - 1)*Sin[e + f*x])/Cos[e + f*x]^2), x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && LtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b* c + a*d))*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(p + 1))) , x] + Simp[b*((a*d*m + b*c*(m + p + 1))/(a*g^2*(p + 1))) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, -1] && LtQ[p, -1]
Time = 0.30 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.58
method | result | size |
default | \(\frac {-\operatorname {arctanh}\left (\frac {\sqrt {a -\sin \left (f x +e \right ) a}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sqrt {a -\sin \left (f x +e \right ) a}\, \sqrt {2}\, a^{2} \cos \left (f x +e \right )^{2}+2 a^{\frac {5}{2}} \cos \left (f x +e \right )^{2}+2 \sqrt {2}\, \sqrt {a -\sin \left (f x +e \right ) a}\, \operatorname {arctanh}\left (\frac {\sqrt {a -\sin \left (f x +e \right ) a}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sin \left (f x +e \right ) a^{2}+40 a^{\frac {5}{2}} \sin \left (f x +e \right )+2 \sqrt {2}\, \sqrt {a -\sin \left (f x +e \right ) a}\, \operatorname {arctanh}\left (\frac {\sqrt {a -\sin \left (f x +e \right ) a}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2}+24 a^{\frac {5}{2}}}{64 a^{\frac {7}{2}} \left (1+\sin \left (f x +e \right )\right ) \cos \left (f x +e \right ) \sqrt {a +\sin \left (f x +e \right ) a}\, f}\) | \(212\) |
Input:
int(tan(f*x+e)^2/(a+sin(f*x+e)*a)^(3/2),x,method=_RETURNVERBOSE)
Output:
1/64/a^(7/2)*(-arctanh(1/2*(a-sin(f*x+e)*a)^(1/2)*2^(1/2)/a^(1/2))*(a-sin( f*x+e)*a)^(1/2)*2^(1/2)*a^2*cos(f*x+e)^2+2*a^(5/2)*cos(f*x+e)^2+2*2^(1/2)* (a-sin(f*x+e)*a)^(1/2)*arctanh(1/2*(a-sin(f*x+e)*a)^(1/2)*2^(1/2)/a^(1/2)) *sin(f*x+e)*a^2+40*a^(5/2)*sin(f*x+e)+2*2^(1/2)*(a-sin(f*x+e)*a)^(1/2)*arc tanh(1/2*(a-sin(f*x+e)*a)^(1/2)*2^(1/2)/a^(1/2))*a^2+24*a^(5/2))/(1+sin(f* x+e))/cos(f*x+e)/(a+sin(f*x+e)*a)^(1/2)/f
Leaf count of result is larger than twice the leaf count of optimal. 237 vs. \(2 (111) = 222\).
Time = 0.12 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.77 \[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\sqrt {2} {\left (\cos \left (f x + e\right )^{3} - 2 \, \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (\cos \left (f x + e\right )^{2} + 20 \, \sin \left (f x + e\right ) + 12\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{128 \, {\left (a^{2} f \cos \left (f x + e\right )^{3} - 2 \, a^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a^{2} f \cos \left (f x + e\right )\right )}} \] Input:
integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="fricas")
Output:
1/128*(sqrt(2)*(cos(f*x + e)^3 - 2*cos(f*x + e)*sin(f*x + e) - 2*cos(f*x + e))*sqrt(a)*log(-(a*cos(f*x + e)^2 + 2*sqrt(2)*sqrt(a*sin(f*x + e) + a)*s qrt(a)*(cos(f*x + e) - sin(f*x + e) + 1) + 3*a*cos(f*x + e) - (a*cos(f*x + e) - 2*a)*sin(f*x + e) + 2*a)/(cos(f*x + e)^2 - (cos(f*x + e) + 2)*sin(f* x + e) - cos(f*x + e) - 2)) - 4*(cos(f*x + e)^2 + 20*sin(f*x + e) + 12)*sq rt(a*sin(f*x + e) + a))/(a^2*f*cos(f*x + e)^3 - 2*a^2*f*cos(f*x + e)*sin(f *x + e) - 2*a^2*f*cos(f*x + e))
\[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int \frac {\tan ^{2}{\left (e + f x \right )}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \] Input:
integrate(tan(f*x+e)**2/(a+a*sin(f*x+e))**(3/2),x)
Output:
Integral(tan(e + f*x)**2/(a*(sin(e + f*x) + 1))**(3/2), x)
\[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int { \frac {\tan \left (f x + e\right )^{2}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="maxima")
Output:
integrate(tan(f*x + e)^2/(a*sin(f*x + e) + a)^(3/2), x)
Time = 0.23 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.90 \[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\frac {8 \, \sqrt {2}}{a^{\frac {3}{2}} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (\frac {3}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )} - \frac {\sqrt {2} {\left (9 \, \sqrt {a} \sin \left (\frac {3}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 7 \, \sqrt {a} \sin \left (\frac {3}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\sin \left (\frac {3}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{64 \, f} \] Input:
integrate(tan(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="giac")
Output:
1/64*(8*sqrt(2)/(a^(3/2)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sin(3/4*pi + 1/2*f*x + 1/2*e)) - sqrt(2)*(9*sqrt(a)*sin(3/4*pi + 1/2*f*x + 1/2*e)^3 - 7 *sqrt(a)*sin(3/4*pi + 1/2*f*x + 1/2*e))/((sin(3/4*pi + 1/2*f*x + 1/2*e)^2 - 1)^2*a^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))))/f
Timed out. \[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \] Input:
int(tan(e + f*x)^2/(a + a*sin(e + f*x))^(3/2),x)
Output:
int(tan(e + f*x)^2/(a + a*sin(e + f*x))^(3/2), x)
\[ \int \frac {\tan ^2(e+f x)}{(a+a \sin (e+f x))^{3/2}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\sin \left (f x +e \right )+1}\, \tan \left (f x +e \right )^{2}}{\sin \left (f x +e \right )^{2}+2 \sin \left (f x +e \right )+1}d x \right )}{a^{2}} \] Input:
int(tan(f*x+e)^2/(a+a*sin(f*x+e))^(3/2),x)
Output:
(sqrt(a)*int((sqrt(sin(e + f*x) + 1)*tan(e + f*x)**2)/(sin(e + f*x)**2 + 2 *sin(e + f*x) + 1),x))/a**2