Integrand size = 28, antiderivative size = 25 \[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=-\frac {A \sec ^{1+m}(c+d x) \sin (c+d x)}{d m} \] Output:
-A*sec(d*x+c)^(1+m)*sin(d*x+c)/d/m
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.21 (sec) , antiderivative size = 111, normalized size of antiderivative = 4.44 \[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=\frac {A \csc (c+d x) \sec ^{-1+m}(c+d x) \left ((2+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right )-(1+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\sec ^2(c+d x)\right ) \sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}}{d m (2+m)} \] Input:
Integrate[Sec[c + d*x]^m*(A - (A*(1 + m)*Sec[c + d*x]^2)/m),x]
Output:
(A*Csc[c + d*x]*Sec[c + d*x]^(-1 + m)*((2 + m)*Hypergeometric2F1[1/2, m/2, (2 + m)/2, Sec[c + d*x]^2] - (1 + m)*Hypergeometric2F1[1/2, (2 + m)/2, (4 + m)/2, Sec[c + d*x]^2]*Sec[c + d*x]^2)*Sqrt[-Tan[c + d*x]^2])/(d*m*(2 + m))
Time = 0.22 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3042, 4531}
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 \sec ^m(c+d x) \left (A-\frac {A (m+1) \sec ^2(c+d x)}{m}\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^m \left (A-\frac {A (m+1) \csc \left (c+d x+\frac {\pi }{2}\right )^2}{m}\right )dx\) |
\(\Big \downarrow \) 4531 |
\(\displaystyle -\frac {A \sin (c+d x) \sec ^{m+1}(c+d x)}{d m}\) |
Input:
Int[Sec[c + d*x]^m*(A - (A*(1 + m)*Sec[c + d*x]^2)/m),x]
Output:
-((A*Sec[c + d*x]^(1 + m)*Sin[c + d*x])/(d*m))
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] /; FreeQ[{b, e, f, A, C, m}, x] && EqQ[C*m + A*(m + 1), 0]
Time = 0.56 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.28
method | result | size |
parallelrisch | \(-\frac {\sin \left (d x +c \right ) A \sec \left (d x +c \right )^{m}}{\cos \left (d x +c \right ) m d}\) | \(32\) |
risch | \(\frac {i A 2^{m} \left ({\mathrm e}^{i \left (d x +c \right )}\right )^{m} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{-m} \left ({\mathrm e}^{-\frac {i \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{3} \pi m}{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) \pi m}{2}} {\mathrm e}^{\frac {i \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) m}{2}} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \operatorname {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) m}{2}} {\mathrm e}^{2 i d x} {\mathrm e}^{2 i c}-{\mathrm e}^{-\frac {i \operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \pi m \left (-\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )+\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )\right ) \left (-\operatorname {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )+\operatorname {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )\right )}{2}}\right )}{d m \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) | \(382\) |
Input:
int(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x,method=_RETURNVERBOSE)
Output:
-sin(d*x+c)/cos(d*x+c)/m/d*A*sec(d*x+c)^m
Time = 0.08 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.32 \[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=-\frac {A \frac {1}{\cos \left (d x + c\right )}^{m} \sin \left (d x + c\right )}{d m \cos \left (d x + c\right )} \] Input:
integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="fricas")
Output:
-A*(1/cos(d*x + c))^m*sin(d*x + c)/(d*m*cos(d*x + c))
\[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=- \frac {A \left (\int \left (- m \sec ^{m}{\left (c + d x \right )}\right )\, dx + \int \sec ^{2}{\left (c + d x \right )} \sec ^{m}{\left (c + d x \right )}\, dx + \int m \sec ^{2}{\left (c + d x \right )} \sec ^{m}{\left (c + d x \right )}\, dx\right )}{m} \] Input:
integrate(sec(d*x+c)**m*(A-A*(1+m)*sec(d*x+c)**2/m),x)
Output:
-A*(Integral(-m*sec(c + d*x)**m, x) + Integral(sec(c + d*x)**2*sec(c + d*x )**m, x) + Integral(m*sec(c + d*x)**2*sec(c + d*x)**m, x))/m
Leaf count of result is larger than twice the leaf count of optimal. 296 vs. \(2 (25) = 50\).
Time = 0.23 (sec) , antiderivative size = 296, normalized size of antiderivative = 11.84 \[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=\frac {2^{m} A \cos \left (-{\left (d x + c\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) - 2^{m} A \cos \left (-{\left (d x + c\right )} m + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) + {\left (2^{m} A \cos \left (2 \, d x + 2 \, c\right ) + 2^{m} A\right )} \sin \left (-{\left (d x + c\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - {\left (2^{m} A \cos \left (2 \, d x + 2 \, c\right ) + 2^{m} A\right )} \sin \left (-{\left (d x + c\right )} m + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )}{{\left (m \cos \left (2 \, d x + 2 \, c\right )^{2} + m \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, m \cos \left (2 \, d x + 2 \, c\right ) + m\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{2} \, m} d} \] Input:
integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="maxima")
Output:
(2^m*A*cos(-(d*x + c)*(m + 2) + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2* c) + 1))*sin(2*d*x + 2*c) - 2^m*A*cos(-(d*x + c)*m + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(2*d*x + 2*c) + (2^m*A*cos(2*d*x + 2*c) + 2^m*A)*sin(-(d*x + c)*(m + 2) + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2 *c) + 1)) - (2^m*A*cos(2*d*x + 2*c) + 2^m*A)*sin(-(d*x + c)*m + m*arctan2( sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/((m*cos(2*d*x + 2*c)^2 + m*sin(2 *d*x + 2*c)^2 + 2*m*cos(2*d*x + 2*c) + m)*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/2*m)*d)
\[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=\int { -{\left (\frac {A {\left (m + 1\right )} \sec \left (d x + c\right )^{2}}{m} - A\right )} \sec \left (d x + c\right )^{m} \,d x } \] Input:
integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="giac")
Output:
integrate(-(A*(m + 1)*sec(d*x + c)^2/m - A)*sec(d*x + c)^m, x)
Time = 0.34 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.64 \[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=-\frac {A\,\sin \left (2\,c+2\,d\,x\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m}{d\,m\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \] Input:
int((A - (A*(m + 1))/(m*cos(c + d*x)^2))*(1/cos(c + d*x))^m,x)
Output:
-(A*sin(2*c + 2*d*x)*(1/cos(c + d*x))^m)/(d*m*(cos(2*c + 2*d*x) + 1))
\[ \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx=\frac {a \left (\left (\int \sec \left (d x +c \right )^{m}d x \right ) m -\left (\int \sec \left (d x +c \right )^{m} \sec \left (d x +c \right )^{2}d x \right ) m -\left (\int \sec \left (d x +c \right )^{m} \sec \left (d x +c \right )^{2}d x \right )\right )}{m} \] Input:
int(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x)
Output:
(a*(int(sec(c + d*x)**m,x)*m - int(sec(c + d*x)**m*sec(c + d*x)**2,x)*m - int(sec(c + d*x)**m*sec(c + d*x)**2,x)))/m