Integrand size = 32, antiderivative size = 80 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=-\frac {(a+a \sec (e+f x))^2 \tan (e+f x)}{7 f (c-c \sec (e+f x))^4}-\frac {(a+a \sec (e+f x))^2 \tan (e+f x)}{35 c f (c-c \sec (e+f x))^3} \] Output:
-1/7*(a+a*sec(f*x+e))^2*tan(f*x+e)/f/(c-c*sec(f*x+e))^4-1/35*(a+a*sec(f*x+ e))^2*tan(f*x+e)/c/f/(c-c*sec(f*x+e))^3
Time = 0.29 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.59 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {a^2 (-6+\sec (e+f x)) (1+\sec (e+f x))^2 \tan (e+f x)}{35 c^4 f (-1+\sec (e+f x))^4} \] Input:
Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c - c*Sec[e + f*x])^4,x]
Output:
(a^2*(-6 + Sec[e + f*x])*(1 + Sec[e + f*x])^2*Tan[e + f*x])/(35*c^4*f*(-1 + Sec[e + f*x])^4)
Time = 0.43 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3042, 4439, 3042, 4438}
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 {\sec (e+f x) (a \sec (e+f x)+a)^2}{(c-c \sec (e+f x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2}{\left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 4439 |
\(\displaystyle \frac {\int \frac {\sec (e+f x) (\sec (e+f x) a+a)^2}{(c-c \sec (e+f x))^3}dx}{7 c}-\frac {\tan (e+f x) (a \sec (e+f x)+a)^2}{7 f (c-c \sec (e+f x))^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^2}{\left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}dx}{7 c}-\frac {\tan (e+f x) (a \sec (e+f x)+a)^2}{7 f (c-c \sec (e+f x))^4}\) |
\(\Big \downarrow \) 4438 |
\(\displaystyle -\frac {\tan (e+f x) (a \sec (e+f x)+a)^2}{35 c f (c-c \sec (e+f x))^3}-\frac {\tan (e+f x) (a \sec (e+f x)+a)^2}{7 f (c-c \sec (e+f x))^4}\) |
Input:
Int[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c - c*Sec[e + f*x])^4,x]
Output:
-1/7*((a + a*Sec[e + f*x])^2*Tan[e + f*x])/(f*(c - c*Sec[e + f*x])^4) - (( a + a*Sec[e + f*x])^2*Tan[e + f*x])/(35*c*f*(c - c*Sec[e + f*x])^3)
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[b*Cot[e + f*x] *(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^n/(a*f*(2*m + 1))), x] /; Fre eQ[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] & & EqQ[m + n + 1, 0] && NeQ[2*m + 1, 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[b*Cot[e + f*x] *(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^n/(a*f*(2*m + 1))), x] + Simp [(m + n + 1)/(a*(2*m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)* (c + d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ [b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && ILtQ[m + n + 1, 0] && NeQ[2*m + 1, 0 ] && !LtQ[n, 0] && !(IGtQ[n + 1/2, 0] && LtQ[n + 1/2, -(m + n)])
Time = 0.16 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.48
method | result | size |
parallelrisch | \(-\frac {a^{2} \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} \left (5 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-7\right )}{70 c^{4} f}\) | \(38\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {1}{7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\right )}{2 f \,c^{4}}\) | \(39\) |
default | \(\frac {a^{2} \left (-\frac {1}{7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\right )}{2 f \,c^{4}}\) | \(39\) |
risch | \(\frac {2 i a^{2} \left (35 \,{\mathrm e}^{6 i \left (f x +e \right )}-35 \,{\mathrm e}^{5 i \left (f x +e \right )}+140 \,{\mathrm e}^{4 i \left (f x +e \right )}-70 \,{\mathrm e}^{3 i \left (f x +e \right )}+91 \,{\mathrm e}^{2 i \left (f x +e \right )}-7 \,{\mathrm e}^{i \left (f x +e \right )}+6\right )}{35 f \,c^{4} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{7}}\) | \(94\) |
norman | \(\frac {-\frac {a^{2}}{14 c f}+\frac {17 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{70 c f}-\frac {19 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{70 c f}+\frac {a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{10 c f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}\) | \(109\) |
Input:
int(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^4,x,method=_RETURNVERBO SE)
Output:
-1/70*a^2*cot(1/2*f*x+1/2*e)^5*(5*cot(1/2*f*x+1/2*e)^2-7)/c^4/f
Time = 0.09 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.42 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {6 \, a^{2} \cos \left (f x + e\right )^{4} + 17 \, a^{2} \cos \left (f x + e\right )^{3} + 15 \, a^{2} \cos \left (f x + e\right )^{2} + 3 \, a^{2} \cos \left (f x + e\right ) - a^{2}}{35 \, {\left (c^{4} f \cos \left (f x + e\right )^{3} - 3 \, c^{4} f \cos \left (f x + e\right )^{2} + 3 \, c^{4} f \cos \left (f x + e\right ) - c^{4} f\right )} \sin \left (f x + e\right )} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^4,x, algorithm="f ricas")
Output:
1/35*(6*a^2*cos(f*x + e)^4 + 17*a^2*cos(f*x + e)^3 + 15*a^2*cos(f*x + e)^2 + 3*a^2*cos(f*x + e) - a^2)/((c^4*f*cos(f*x + e)^3 - 3*c^4*f*cos(f*x + e) ^2 + 3*c^4*f*cos(f*x + e) - c^4*f)*sin(f*x + e))
\[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {a^{2} \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{4}{\left (e + f x \right )} - 4 \sec ^{3}{\left (e + f x \right )} + 6 \sec ^{2}{\left (e + f x \right )} - 4 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {2 \sec ^{2}{\left (e + f x \right )}}{\sec ^{4}{\left (e + f x \right )} - 4 \sec ^{3}{\left (e + f x \right )} + 6 \sec ^{2}{\left (e + f x \right )} - 4 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{4}{\left (e + f x \right )} - 4 \sec ^{3}{\left (e + f x \right )} + 6 \sec ^{2}{\left (e + f x \right )} - 4 \sec {\left (e + f x \right )} + 1}\, dx\right )}{c^{4}} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))**2/(c-c*sec(f*x+e))**4,x)
Output:
a**2*(Integral(sec(e + f*x)/(sec(e + f*x)**4 - 4*sec(e + f*x)**3 + 6*sec(e + f*x)**2 - 4*sec(e + f*x) + 1), x) + Integral(2*sec(e + f*x)**2/(sec(e + f*x)**4 - 4*sec(e + f*x)**3 + 6*sec(e + f*x)**2 - 4*sec(e + f*x) + 1), x) + Integral(sec(e + f*x)**3/(sec(e + f*x)**4 - 4*sec(e + f*x)**3 + 6*sec(e + f*x)**2 - 4*sec(e + f*x) + 1), x))/c**4
Leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (78) = 156\).
Time = 0.04 (sec) , antiderivative size = 270, normalized size of antiderivative = 3.38 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {\frac {2 \, a^{2} {\left (\frac {21 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {35 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {105 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - 15\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{7}}{c^{4} \sin \left (f x + e\right )^{7}} + \frac {3 \, a^{2} {\left (\frac {21 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {35 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {35 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - 5\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{7}}{c^{4} \sin \left (f x + e\right )^{7}} - \frac {a^{2} {\left (\frac {21 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {35 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {105 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} + 15\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{7}}{c^{4} \sin \left (f x + e\right )^{7}}}{840 \, f} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^4,x, algorithm="m axima")
Output:
1/840*(2*a^2*(21*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 35*sin(f*x + e)^4/( cos(f*x + e) + 1)^4 - 105*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 - 15)*(cos(f *x + e) + 1)^7/(c^4*sin(f*x + e)^7) + 3*a^2*(21*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 35*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 35*sin(f*x + e)^6/(co s(f*x + e) + 1)^6 - 5)*(cos(f*x + e) + 1)^7/(c^4*sin(f*x + e)^7) - a^2*(21 *sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 35*sin(f*x + e)^4/(cos(f*x + e) + 1 )^4 - 105*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 15)*(cos(f*x + e) + 1)^7/( c^4*sin(f*x + e)^7))/f
Time = 0.17 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.51 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {7 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 5 \, a^{2}}{70 \, c^{4} f \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7}} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^4,x, algorithm="g iac")
Output:
1/70*(7*a^2*tan(1/2*f*x + 1/2*e)^2 - 5*a^2)/(c^4*f*tan(1/2*f*x + 1/2*e)^7)
Time = 11.08 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.46 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=-\frac {a^2\,{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (5\,{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-7\right )}{70\,c^4\,f} \] Input:
int((a + a/cos(e + f*x))^2/(cos(e + f*x)*(c - c/cos(e + f*x))^4),x)
Output:
-(a^2*cot(e/2 + (f*x)/2)^5*(5*cot(e/2 + (f*x)/2)^2 - 7))/(70*c^4*f)
Time = 0.16 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.46 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^4} \, dx=\frac {a^{2} \left (7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-5\right )}{70 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7} c^{4} f} \] Input:
int(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^4,x)
Output:
(a**2*(7*tan((e + f*x)/2)**2 - 5))/(70*tan((e + f*x)/2)**7*c**4*f)