Integrand size = 23, antiderivative size = 50 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b)^2 \cot (e+f x)}{f}+\frac {2 b (a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \] Output:
-(a+b)^2*cot(f*x+e)/f+2*b*(a+b)*tan(f*x+e)/f+1/3*b^2*tan(f*x+e)^3/f
Leaf count is larger than twice the leaf count of optimal. \(109\) vs. \(2(50)=100\).
Time = 1.35 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.18 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {4 \left (b+a \cos ^2(e+f x)\right )^2 \sec ^3(e+f x) \left (b^2 \sec (e) \sin (f x)+\cos ^2(e+f x) \left (3 (a+b)^2 \cot (e+f x) \csc (e)+b (6 a+5 b) \sec (e)\right ) \sin (f x)+b^2 \cos (e+f x) \tan (e)\right )}{3 f (a+2 b+a \cos (2 (e+f x)))^2} \] Input:
Integrate[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]
Output:
(4*(b + a*Cos[e + f*x]^2)^2*Sec[e + f*x]^3*(b^2*Sec[e]*Sin[f*x] + Cos[e + f*x]^2*(3*(a + b)^2*Cot[e + f*x]*Csc[e] + b*(6*a + 5*b)*Sec[e])*Sin[f*x] + b^2*Cos[e + f*x]*Tan[e]))/(3*f*(a + 2*b + a*Cos[2*(e + f*x)])^2)
Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4620, 244, 2009}
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 \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sec (e+f x)^2\right )^2}{\sin (e+f x)^2}dx\) |
\(\Big \downarrow \) 4620 |
\(\displaystyle \frac {\int \cot ^2(e+f x) \left (b \tan ^2(e+f x)+a+b\right )^2d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 244 |
\(\displaystyle \frac {\int \left ((a+b)^2 \cot ^2(e+f x)+b^2 \tan ^2(e+f x)+2 b (a+b)\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 b (a+b) \tan (e+f x)-(a+b)^2 \cot (e+f x)+\frac {1}{3} b^2 \tan ^3(e+f x)}{f}\) |
Input:
Int[Csc[e + f*x]^2*(a + b*Sec[e + f*x]^2)^2,x]
Output:
(-((a + b)^2*Cot[e + f*x]) + 2*b*(a + b)*Tan[e + f*x] + (b^2*Tan[e + f*x]^ 3)/3)/f
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && IGtQ[p , 0]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1)/f Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1 + f f^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]
Time = 0.96 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.92
method | result | size |
derivativedivides | \(\frac {-a^{2} \cot \left (f x +e \right )+2 a b \left (\frac {1}{\sin \left (f x +e \right ) \cos \left (f x +e \right )}-2 \cot \left (f x +e \right )\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )^{3}}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )}{f}\) | \(96\) |
default | \(\frac {-a^{2} \cot \left (f x +e \right )+2 a b \left (\frac {1}{\sin \left (f x +e \right ) \cos \left (f x +e \right )}-2 \cot \left (f x +e \right )\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )^{3}}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )}{f}\) | \(96\) |
risch | \(-\frac {2 i \left (3 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+9 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+12 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+9 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+24 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+16 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 a^{2}+12 a b +8 b^{2}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}\) | \(130\) |
parallelrisch | \(\frac {\left (\left (a +b \right )^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}-4 \left (a +3 b \right ) \left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\left (6 a^{2}+28 a b +\frac {50}{3} b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-4 \left (a +3 b \right ) \left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (a +b \right )^{2}\right ) \cot \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(133\) |
norman | \(\frac {\frac {a^{2}+2 a b +b^{2}}{2 f}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{2 f}-\frac {2 \left (a^{2}+4 a b +3 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{f}-\frac {2 \left (a^{2}+4 a b +3 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{f}+\frac {\left (9 a^{2}+42 a b +25 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{3 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}\) | \(161\) |
Input:
int(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
Output:
1/f*(-a^2*cot(f*x+e)+2*a*b*(1/sin(f*x+e)/cos(f*x+e)-2*cot(f*x+e))+b^2*(1/3 /sin(f*x+e)/cos(f*x+e)^3+4/3/sin(f*x+e)/cos(f*x+e)-8/3*cot(f*x+e)))
Time = 0.07 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.42 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \] Input:
integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")
Output:
-1/3*((3*a^2 + 12*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 2*b^2)*cos(f*x + e)^2 - b^2)/(f*cos(f*x + e)^3*sin(f*x + e))
\[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \csc ^{2}{\left (e + f x \right )}\, dx \] Input:
integrate(csc(f*x+e)**2*(a+b*sec(f*x+e)**2)**2,x)
Output:
Integral((a + b*sec(e + f*x)**2)**2*csc(e + f*x)**2, x)
Time = 0.03 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.08 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, {\left (a b + b^{2}\right )} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \] Input:
integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")
Output:
1/3*(b^2*tan(f*x + e)^3 + 6*(a*b + b^2)*tan(f*x + e) - 3*(a^2 + 2*a*b + b^ 2)/tan(f*x + e))/f
Time = 0.19 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.20 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 6 \, b^{2} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \] Input:
integrate(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")
Output:
1/3*(b^2*tan(f*x + e)^3 + 6*a*b*tan(f*x + e) + 6*b^2*tan(f*x + e) - 3*(a^2 + 2*a*b + b^2)/tan(f*x + e))/f
Time = 12.48 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.12 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {a^2+2\,a\,b+b^2}{f\,\mathrm {tan}\left (e+f\,x\right )}+\frac {2\,b\,\mathrm {tan}\left (e+f\,x\right )\,\left (a+b\right )}{f} \] Input:
int((a + b/cos(e + f*x)^2)^2/sin(e + f*x)^2,x)
Output:
(b^2*tan(e + f*x)^3)/(3*f) - (2*a*b + a^2 + b^2)/(f*tan(e + f*x)) + (2*b*t an(e + f*x)*(a + b))/f
Time = 0.16 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.48 \[ \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 \sin \left (f x +e \right )^{4} a^{2}+12 \sin \left (f x +e \right )^{4} a b +8 \sin \left (f x +e \right )^{4} b^{2}-6 \sin \left (f x +e \right )^{2} a^{2}-18 \sin \left (f x +e \right )^{2} a b -12 \sin \left (f x +e \right )^{2} b^{2}+3 a^{2}+6 a b +3 b^{2}}{3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) f \left (\sin \left (f x +e \right )^{2}-1\right )} \] Input:
int(csc(f*x+e)^2*(a+b*sec(f*x+e)^2)^2,x)
Output:
(3*sin(e + f*x)**4*a**2 + 12*sin(e + f*x)**4*a*b + 8*sin(e + f*x)**4*b**2 - 6*sin(e + f*x)**2*a**2 - 18*sin(e + f*x)**2*a*b - 12*sin(e + f*x)**2*b** 2 + 3*a**2 + 6*a*b + 3*b**2)/(3*cos(e + f*x)*sin(e + f*x)*f*(sin(e + f*x)* *2 - 1))