Integrand size = 32, antiderivative size = 100 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {15 c^3 \text {arctanh}(\sin (e+f x))}{2 a f}+\frac {10 c^3 \tan (e+f x)}{a f}-\frac {5 c^3 \sec (e+f x) \tan (e+f x)}{2 a f}+\frac {2 c (c-c \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))} \] Output:
-15/2*c^3*arctanh(sin(f*x+e))/a/f+10*c^3*tan(f*x+e)/a/f-5/2*c^3*sec(f*x+e) *tan(f*x+e)/a/f+2*c*(c-c*sec(f*x+e))^2*tan(f*x+e)/f/(a+a*sec(f*x+e))
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.43 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.53 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {8 c^3 \cot (e+f x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},-\frac {1}{2},\frac {1}{2},\frac {1}{2} (1+\sec (e+f x))\right ) \sqrt {2-2 \sec (e+f x)}}{a f} \] Input:
Integrate[(Sec[e + f*x]*(c - c*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]
Output:
(-8*c^3*Cot[e + f*x]*Hypergeometric2F1[-5/2, -1/2, 1/2, (1 + Sec[e + f*x]) /2]*Sqrt[2 - 2*Sec[e + f*x]])/(a*f)
Time = 0.64 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.98, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3042, 4445, 3042, 4275, 3042, 4254, 24, 4534, 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 {\sec (e+f x) (c-c \sec (e+f x))^3}{a \sec (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4445 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \int \sec (e+f x) (c-c \sec (e+f x))^2dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2dx}{a}\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\int \sec (e+f x) \left (\sec ^2(e+f x) c^2+c^2\right )dx-2 c^2 \int \sec ^2(e+f x)dx\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right )^2 c^2+c^2\right )dx-2 c^2 \int \csc \left (e+f x+\frac {\pi }{2}\right )^2dx\right )}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\frac {2 c^2 \int 1d(-\tan (e+f x))}{f}+\int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right )^2 c^2+c^2\right )dx\right )}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (\csc \left (e+f x+\frac {\pi }{2}\right )^2 c^2+c^2\right )dx-\frac {2 c^2 \tan (e+f x)}{f}\right )}{a}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\frac {3}{2} c^2 \int \sec (e+f x)dx-\frac {2 c^2 \tan (e+f x)}{f}+\frac {c^2 \tan (e+f x) \sec (e+f x)}{2 f}\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\frac {3}{2} c^2 \int \csc \left (e+f x+\frac {\pi }{2}\right )dx-\frac {2 c^2 \tan (e+f x)}{f}+\frac {c^2 \tan (e+f x) \sec (e+f x)}{2 f}\right )}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {2 c \tan (e+f x) (c-c \sec (e+f x))^2}{f (a \sec (e+f x)+a)}-\frac {5 c \left (\frac {3 c^2 \text {arctanh}(\sin (e+f x))}{2 f}-\frac {2 c^2 \tan (e+f x)}{f}+\frac {c^2 \tan (e+f x) \sec (e+f x)}{2 f}\right )}{a}\) |
Input:
Int[(Sec[e + f*x]*(c - c*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]
Output:
(2*c*(c - c*Sec[e + f*x])^2*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])) - (5*c* ((3*c^2*ArcTanh[Sin[e + f*x]])/(2*f) - (2*c^2*Tan[e + f*x])/f + (c^2*Sec[e + f*x]*Tan[e + f*x])/(2*f)))/a
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[2*a*c*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^(n - 1)/(b*f*(2*m + 1))), x] - Simp[d*((2*n - 1)/(b*(2*m + 1))) Int[Csc[e + f*x]*(a + b*Csc[e + f* x])^(m + 1)*(c + d*Csc[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0] && LtQ[m, -2^ (-1)] && IntegerQ[2*m]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 0.30 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.06
method | result | size |
parallelrisch | \(-\frac {15 \left (\left (-1-\cos \left (2 f x +2 e \right )\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+\left (1+\cos \left (2 f x +2 e \right )\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {14 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\cos \left (f x +e \right )+\frac {12 \cos \left (2 f x +2 e \right )}{7}+\frac {11}{7}\right )}{15}\right ) c^{3}}{2 a f \left (1+\cos \left (2 f x +2 e \right )\right )}\) | \(106\) |
derivativedivides | \(\frac {8 c^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {1}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {9}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {15 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16}-\frac {1}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {9}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {15 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16}\right )}{f a}\) | \(110\) |
default | \(\frac {8 c^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {1}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {9}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {15 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16}-\frac {1}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {9}{16 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {15 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16}\right )}{f a}\) | \(110\) |
risch | \(\frac {i c^{3} \left (17 \,{\mathrm e}^{4 i \left (f x +e \right )}+9 \,{\mathrm e}^{3 i \left (f x +e \right )}+39 \,{\mathrm e}^{2 i \left (f x +e \right )}+7 \,{\mathrm e}^{i \left (f x +e \right )}+24\right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {15 c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 a f}+\frac {15 c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 a f}\) | \(134\) |
norman | \(\frac {-\frac {15 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {40 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}-\frac {33 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}+\frac {8 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}+\frac {15 c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 a f}-\frac {15 c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 a f}\) | \(151\) |
Input:
int(sec(f*x+e)*(c-c*sec(f*x+e))^3/(a+a*sec(f*x+e)),x,method=_RETURNVERBOSE )
Output:
-15/2*((-1-cos(2*f*x+2*e))*ln(tan(1/2*f*x+1/2*e)-1)+(1+cos(2*f*x+2*e))*ln( tan(1/2*f*x+1/2*e)+1)-14/15*tan(1/2*f*x+1/2*e)*(cos(f*x+e)+12/7*cos(2*f*x+ 2*e)+11/7))*c^3/a/f/(1+cos(2*f*x+2*e))
Time = 0.11 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.40 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (24 \, c^{3} \cos \left (f x + e\right )^{2} + 7 \, c^{3} \cos \left (f x + e\right ) - c^{3}\right )} \sin \left (f x + e\right )}{4 \, {\left (a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )^{2}\right )}} \] Input:
integrate(sec(f*x+e)*(c-c*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="fri cas")
Output:
-1/4*(15*(c^3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*log(sin(f*x + e) + 1) - 15*(c^3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*log(-sin(f*x + e) + 1) - 2*( 24*c^3*cos(f*x + e)^2 + 7*c^3*cos(f*x + e) - c^3)*sin(f*x + e))/(a*f*cos(f *x + e)^3 + a*f*cos(f*x + e)^2)
\[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=- \frac {c^{3} \left (\int \left (- \frac {\sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {3 \sec ^{3}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{4}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx\right )}{a} \] Input:
integrate(sec(f*x+e)*(c-c*sec(f*x+e))**3/(a+a*sec(f*x+e)),x)
Output:
-c**3*(Integral(-sec(e + f*x)/(sec(e + f*x) + 1), x) + Integral(3*sec(e + f*x)**2/(sec(e + f*x) + 1), x) + Integral(-3*sec(e + f*x)**3/(sec(e + f*x) + 1), x) + Integral(sec(e + f*x)**4/(sec(e + f*x) + 1), x))/a
Leaf count of result is larger than twice the leaf count of optimal. 386 vs. \(2 (97) = 194\).
Time = 0.04 (sec) , antiderivative size = 386, normalized size of antiderivative = 3.86 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {c^{3} {\left (\frac {2 \, {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 6 \, c^{3} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (f x + e\right )}{{\left (a - \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 6 \, c^{3} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + \frac {2 \, c^{3} \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{2 \, f} \] Input:
integrate(sec(f*x+e)*(c-c*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="max ima")
Output:
1/2*(c^3*(2*(sin(f*x + e)/(cos(f*x + e) + 1) - 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a - 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^ 4/(cos(f*x + e) + 1)^4) - 3*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a + 3 *log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a + 2*sin(f*x + e)/(a*(cos(f*x + e) + 1))) - 6*c^3*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(f *x + e)/(cos(f*x + e) + 1) - 1)/a - 2*sin(f*x + e)/((a - a*sin(f*x + e)^2/ (cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)) - sin(f*x + e)/(a*(cos(f*x + e) + 1))) - 6*c^3*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a - sin(f*x + e)/(a*(cos(f*x + e) + 1))) + 2*c ^3*sin(f*x + e)/(a*(cos(f*x + e) + 1)))/f
Time = 0.18 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.16 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {\frac {15 \, c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac {15 \, c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a} - \frac {16 \, c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a} + \frac {2 \, {\left (9 \, c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 7 \, c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a}}{2 \, f} \] Input:
integrate(sec(f*x+e)*(c-c*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="gia c")
Output:
-1/2*(15*c^3*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a - 15*c^3*log(abs(tan(1/2 *f*x + 1/2*e) - 1))/a - 16*c^3*tan(1/2*f*x + 1/2*e)/a + 2*(9*c^3*tan(1/2*f *x + 1/2*e)^3 - 7*c^3*tan(1/2*f*x + 1/2*e))/((tan(1/2*f*x + 1/2*e)^2 - 1)^ 2*a))/f
Time = 10.96 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.96 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {8\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{a\,f}-\frac {9\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3-7\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{a\,f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )}^2}-\frac {15\,c^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{a\,f} \] Input:
int((c - c/cos(e + f*x))^3/(cos(e + f*x)*(a + a/cos(e + f*x))),x)
Output:
(8*c^3*tan(e/2 + (f*x)/2))/(a*f) - (9*c^3*tan(e/2 + (f*x)/2)^3 - 7*c^3*tan (e/2 + (f*x)/2))/(a*f*(tan(e/2 + (f*x)/2)^2 - 1)^2) - (15*c^3*atanh(tan(e/ 2 + (f*x)/2)))/(a*f)
Time = 0.17 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.51 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {c^{3} \left (-24 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2}+16 \cos \left (f x +e \right )+15 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \sin \left (f x +e \right )^{3}-15 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \sin \left (f x +e \right )-15 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \sin \left (f x +e \right )^{3}+15 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \sin \left (f x +e \right )+17 \sin \left (f x +e \right )^{2}-16\right )}{2 \sin \left (f x +e \right ) a f \left (\sin \left (f x +e \right )^{2}-1\right )} \] Input:
int(sec(f*x+e)*(c-c*sec(f*x+e))^3/(a+a*sec(f*x+e)),x)
Output:
(c**3*( - 24*cos(e + f*x)*sin(e + f*x)**2 + 16*cos(e + f*x) + 15*log(tan(( e + f*x)/2) - 1)*sin(e + f*x)**3 - 15*log(tan((e + f*x)/2) - 1)*sin(e + f* x) - 15*log(tan((e + f*x)/2) + 1)*sin(e + f*x)**3 + 15*log(tan((e + f*x)/2 ) + 1)*sin(e + f*x) + 17*sin(e + f*x)**2 - 16))/(2*sin(e + f*x)*a*f*(sin(e + f*x)**2 - 1))