Integrand size = 32, antiderivative size = 70 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=-\frac {c \text {arctanh}(\sin (e+f x))}{a^2 f}+\frac {7 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {2 c \tan (e+f x)}{3 f (a+a \sec (e+f x))^2} \] Output:
-c*arctanh(sin(f*x+e))/a^2/f+7/3*c*tan(f*x+e)/a^2/f/(1+sec(f*x+e))-2/3*c*t an(f*x+e)/f/(a+a*sec(f*x+e))^2
Time = 0.29 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.10 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=-\frac {c \left (\coth ^{-1}(\sin (e+f x)) (1+\sec (e+f x))^2+2 \text {arctanh}(\sin (e+f x)) (1+\sec (e+f x))^2-(5+7 \sec (e+f x)) \tan (e+f x)\right )}{3 a^2 f (1+\sec (e+f x))^2} \] Input:
Integrate[(Sec[e + f*x]^2*(c - c*Sec[e + f*x]))/(a + a*Sec[e + f*x])^2,x]
Output:
-1/3*(c*(ArcCoth[Sin[e + f*x]]*(1 + Sec[e + f*x])^2 + 2*ArcTanh[Sin[e + f* x]]*(1 + Sec[e + f*x])^2 - (5 + 7*Sec[e + f*x])*Tan[e + f*x]))/(a^2*f*(1 + Sec[e + f*x])^2)
Time = 0.57 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 4496, 25, 3042, 4486, 3042, 4257, 4281}
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 ^2(e+f x) (c-c \sec (e+f x))}{(a \sec (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )^2 \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4496 |
\(\displaystyle -\frac {\int -\frac {\sec (e+f x) (4 a c-3 a c \sec (e+f x))}{\sec (e+f x) a+a}dx}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\sec (e+f x) (4 a c-3 a c \sec (e+f x))}{\sec (e+f x) a+a}dx}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (4 a c-3 a c \csc \left (e+f x+\frac {\pi }{2}\right )\right )}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 4486 |
\(\displaystyle \frac {7 a c \int \frac {\sec (e+f x)}{\sec (e+f x) a+a}dx-3 c \int \sec (e+f x)dx}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {7 a c \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx-3 c \int \csc \left (e+f x+\frac {\pi }{2}\right )dx}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {7 a c \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx-\frac {3 c \text {arctanh}(\sin (e+f x))}{f}}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
\(\Big \downarrow \) 4281 |
\(\displaystyle \frac {\frac {7 a c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac {3 c \text {arctanh}(\sin (e+f x))}{f}}{3 a^2}-\frac {2 c \tan (e+f x)}{3 f (a \sec (e+f x)+a)^2}\) |
Input:
Int[(Sec[e + f*x]^2*(c - c*Sec[e + f*x]))/(a + a*Sec[e + f*x])^2,x]
Output:
(-2*c*Tan[e + f*x])/(3*f*(a + a*Sec[e + f*x])^2) + ((-3*c*ArcTanh[Sin[e + f*x]])/f + (7*a*c*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])))/(3*a^2)
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[-Cot[e + f*x]/(f*(b + a*Csc[e + f*x])), x] /; FreeQ[{a, b, e, f} , x] && EqQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b Int[Csc[e + f*x], x], x] + Simp[(A*b - a*B)/b Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x ] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot [e + f*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1))), x] + Simp[1/(b^2*(2*m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[A*b*m - a*B*m + b *B*(2*m + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && Ne Q[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Time = 0.20 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.86
method | result | size |
derivativedivides | \(\frac {c \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )\right )}{f \,a^{2}}\) | \(60\) |
default | \(\frac {c \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )\right )}{f \,a^{2}}\) | \(60\) |
parallelrisch | \(\frac {c \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f \,a^{2}}\) | \(61\) |
risch | \(\frac {2 i c \left (3 \,{\mathrm e}^{2 i \left (f x +e \right )}+12 \,{\mathrm e}^{i \left (f x +e \right )}+5\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}-\frac {c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{f \,a^{2}}+\frac {c \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{f \,a^{2}}\) | \(92\) |
norman | \(\frac {\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f a}-\frac {11 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 f a}+\frac {4 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{3 f a}+\frac {c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{3 f a}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{2} a}+\frac {c \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{f \,a^{2}}-\frac {c \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{f \,a^{2}}\) | \(141\) |
Input:
int(sec(f*x+e)^2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x,method=_RETURNVERBO SE)
Output:
1/f*c/a^2*(1/3*tan(1/2*f*x+1/2*e)^3+2*tan(1/2*f*x+1/2*e)+ln(tan(1/2*f*x+1/ 2*e)-1)-ln(tan(1/2*f*x+1/2*e)+1))
Time = 0.12 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.76 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=-\frac {3 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (5 \, c \cos \left (f x + e\right ) + 7 \, c\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \] Input:
integrate(sec(f*x+e)^2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="f ricas")
Output:
-1/6*(3*(c*cos(f*x + e)^2 + 2*c*cos(f*x + e) + c)*log(sin(f*x + e) + 1) - 3*(c*cos(f*x + e)^2 + 2*c*cos(f*x + e) + c)*log(-sin(f*x + e) + 1) - 2*(5* c*cos(f*x + e) + 7*c)*sin(f*x + e))/(a^2*f*cos(f*x + e)^2 + 2*a^2*f*cos(f* x + e) + a^2*f)
\[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=- \frac {c \left (\int \left (- \frac {\sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx\right )}{a^{2}} \] Input:
integrate(sec(f*x+e)**2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))**2,x)
Output:
-c*(Integral(-sec(e + f*x)**2/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + Integral(sec(e + f*x)**3/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x))/a**2
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (66) = 132\).
Time = 0.04 (sec) , antiderivative size = 144, normalized size of antiderivative = 2.06 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=\frac {c {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} + \frac {c {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \] Input:
integrate(sec(f*x+e)^2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="m axima")
Output:
1/6*(c*((9*sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - 6*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^2 + 6*log(sin(f *x + e)/(cos(f*x + e) + 1) - 1)/a^2) + c*(3*sin(f*x + e)/(cos(f*x + e) + 1 ) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2)/f
Time = 0.16 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.16 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=-\frac {\frac {3 \, c \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} - \frac {3 \, c \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}} - \frac {a^{4} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 6 \, a^{4} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{6}}}{3 \, f} \] Input:
integrate(sec(f*x+e)^2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="g iac")
Output:
-1/3*(3*c*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a^2 - 3*c*log(abs(tan(1/2*f*x + 1/2*e) - 1))/a^2 - (a^4*c*tan(1/2*f*x + 1/2*e)^3 + 6*a^4*c*tan(1/2*f*x + 1/2*e))/a^6)/f
Time = 10.92 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.63 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=\frac {c\,\left (6\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-6\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\right )}{3\,a^2\,f} \] Input:
int((c - c/cos(e + f*x))/(cos(e + f*x)^2*(a + a/cos(e + f*x))^2),x)
Output:
(c*(6*tan(e/2 + (f*x)/2) - 6*atanh(tan(e/2 + (f*x)/2)) + tan(e/2 + (f*x)/2 )^3))/(3*a^2*f)
Time = 0.17 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.86 \[ \int \frac {\sec ^2(e+f x) (c-c \sec (e+f x))}{(a+a \sec (e+f x))^2} \, dx=\frac {c \left (3 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-3 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a^{2} f} \] Input:
int(sec(f*x+e)^2*(c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x)
Output:
(c*(3*log(tan((e + f*x)/2) - 1) - 3*log(tan((e + f*x)/2) + 1) + tan((e + f *x)/2)**3 + 6*tan((e + f*x)/2)))/(3*a**2*f)