Integrand size = 20, antiderivative size = 526 \[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\frac {(c+d x)^4}{4 a d}+\frac {i b (c+d x)^3 \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f}-\frac {i b (c+d x)^3 \log \left (1+\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f}+\frac {3 b d (c+d x)^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^2}-\frac {3 b d (c+d x)^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^2}+\frac {6 i b d^2 (c+d x) \operatorname {PolyLog}\left (3,-\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^3}-\frac {6 i b d^2 (c+d x) \operatorname {PolyLog}\left (3,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^3}-\frac {6 b d^3 \operatorname {PolyLog}\left (4,-\frac {a e^{i (e+f x)}}{b-\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^4}+\frac {6 b d^3 \operatorname {PolyLog}\left (4,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )}{a \sqrt {-a^2+b^2} f^4} \] Output:
1/4*(d*x+c)^4/a/d+I*b*(d*x+c)^3*ln(1+a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)) )/a/(-a^2+b^2)^(1/2)/f-I*b*(d*x+c)^3*ln(1+a*exp(I*(f*x+e))/(b+(-a^2+b^2)^( 1/2)))/a/(-a^2+b^2)^(1/2)/f+3*b*d*(d*x+c)^2*polylog(2,-a*exp(I*(f*x+e))/(b -(-a^2+b^2)^(1/2)))/a/(-a^2+b^2)^(1/2)/f^2-3*b*d*(d*x+c)^2*polylog(2,-a*ex p(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/a/(-a^2+b^2)^(1/2)/f^2+6*I*b*d^2*(d*x+c )*polylog(3,-a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)))/a/(-a^2+b^2)^(1/2)/f^3 -6*I*b*d^2*(d*x+c)*polylog(3,-a*exp(I*(f*x+e))/(b+(-a^2+b^2)^(1/2)))/a/(-a ^2+b^2)^(1/2)/f^3-6*b*d^3*polylog(4,-a*exp(I*(f*x+e))/(b-(-a^2+b^2)^(1/2)) )/a/(-a^2+b^2)^(1/2)/f^4+6*b*d^3*polylog(4,-a*exp(I*(f*x+e))/(b+(-a^2+b^2) ^(1/2)))/a/(-a^2+b^2)^(1/2)/f^4
Time = 0.99 (sec) , antiderivative size = 449, normalized size of antiderivative = 0.85 \[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\frac {(b+a \cos (e+f x)) \left (x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )+\frac {4 i b \left ((c+d x)^3 \log \left (1-\frac {a e^{i (e+f x)}}{-b+\sqrt {-a^2+b^2}}\right )-(c+d x)^3 \log \left (1+\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )+\frac {3 d \left (-i f^2 (c+d x)^2 \operatorname {PolyLog}\left (2,\frac {a e^{i (e+f x)}}{-b+\sqrt {-a^2+b^2}}\right )+2 d \left (f (c+d x) \operatorname {PolyLog}\left (3,\frac {a e^{i (e+f x)}}{-b+\sqrt {-a^2+b^2}}\right )+i d \operatorname {PolyLog}\left (4,\frac {a e^{i (e+f x)}}{-b+\sqrt {-a^2+b^2}}\right )\right )\right )}{f^3}+\frac {3 i d \left (f^2 (c+d x)^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )+2 i d f (c+d x) \operatorname {PolyLog}\left (3,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )-2 d^2 \operatorname {PolyLog}\left (4,-\frac {a e^{i (e+f x)}}{b+\sqrt {-a^2+b^2}}\right )\right )}{f^3}\right )}{\sqrt {-a^2+b^2} f}\right ) \sec (e+f x)}{4 a (a+b \sec (e+f x))} \] Input:
Integrate[(c + d*x)^3/(a + b*Sec[e + f*x]),x]
Output:
((b + a*Cos[e + f*x])*(x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) + ((4 *I)*b*((c + d*x)^3*Log[1 - (a*E^(I*(e + f*x)))/(-b + Sqrt[-a^2 + b^2])] - (c + d*x)^3*Log[1 + (a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2])] + (3*d*((- I)*f^2*(c + d*x)^2*PolyLog[2, (a*E^(I*(e + f*x)))/(-b + Sqrt[-a^2 + b^2])] + 2*d*(f*(c + d*x)*PolyLog[3, (a*E^(I*(e + f*x)))/(-b + Sqrt[-a^2 + b^2]) ] + I*d*PolyLog[4, (a*E^(I*(e + f*x)))/(-b + Sqrt[-a^2 + b^2])])))/f^3 + ( (3*I)*d*(f^2*(c + d*x)^2*PolyLog[2, -((a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2]))] + (2*I)*d*f*(c + d*x)*PolyLog[3, -((a*E^(I*(e + f*x)))/(b + Sqrt[ -a^2 + b^2]))] - 2*d^2*PolyLog[4, -((a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b ^2]))]))/f^3))/(Sqrt[-a^2 + b^2]*f))*Sec[e + f*x])/(4*a*(a + b*Sec[e + f*x ]))
Time = 1.32 (sec) , antiderivative size = 526, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4679, 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 \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d x)^3}{a+b \csc \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4679 |
\(\displaystyle \int \left (\frac {(c+d x)^3}{a}-\frac {b (c+d x)^3}{a (a \cos (e+f x)+b)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {6 i b d^2 (c+d x) \operatorname {PolyLog}\left (3,-\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a f^3 \sqrt {b^2-a^2}}-\frac {6 i b d^2 (c+d x) \operatorname {PolyLog}\left (3,-\frac {a e^{i (e+f x)}}{b+\sqrt {b^2-a^2}}\right )}{a f^3 \sqrt {b^2-a^2}}+\frac {3 b d (c+d x)^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a f^2 \sqrt {b^2-a^2}}-\frac {3 b d (c+d x)^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i (e+f x)}}{b+\sqrt {b^2-a^2}}\right )}{a f^2 \sqrt {b^2-a^2}}+\frac {i b (c+d x)^3 \log \left (1+\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a f \sqrt {b^2-a^2}}-\frac {i b (c+d x)^3 \log \left (1+\frac {a e^{i (e+f x)}}{\sqrt {b^2-a^2}+b}\right )}{a f \sqrt {b^2-a^2}}-\frac {6 b d^3 \operatorname {PolyLog}\left (4,-\frac {a e^{i (e+f x)}}{b-\sqrt {b^2-a^2}}\right )}{a f^4 \sqrt {b^2-a^2}}+\frac {6 b d^3 \operatorname {PolyLog}\left (4,-\frac {a e^{i (e+f x)}}{b+\sqrt {b^2-a^2}}\right )}{a f^4 \sqrt {b^2-a^2}}+\frac {(c+d x)^4}{4 a d}\) |
Input:
Int[(c + d*x)^3/(a + b*Sec[e + f*x]),x]
Output:
(c + d*x)^4/(4*a*d) + (I*b*(c + d*x)^3*Log[1 + (a*E^(I*(e + f*x)))/(b - Sq rt[-a^2 + b^2])])/(a*Sqrt[-a^2 + b^2]*f) - (I*b*(c + d*x)^3*Log[1 + (a*E^( I*(e + f*x)))/(b + Sqrt[-a^2 + b^2])])/(a*Sqrt[-a^2 + b^2]*f) + (3*b*d*(c + d*x)^2*PolyLog[2, -((a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2]))])/(a*Sqr t[-a^2 + b^2]*f^2) - (3*b*d*(c + d*x)^2*PolyLog[2, -((a*E^(I*(e + f*x)))/( b + Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*f^2) + ((6*I)*b*d^2*(c + d*x) *PolyLog[3, -((a*E^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*f^3) - ((6*I)*b*d^2*(c + d*x)*PolyLog[3, -((a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*f^3) - (6*b*d^3*PolyLog[4, -((a*E ^(I*(e + f*x)))/(b - Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^2 + b^2]*f^4) + (6*b* d^3*PolyLog[4, -((a*E^(I*(e + f*x)))/(b + Sqrt[-a^2 + b^2]))])/(a*Sqrt[-a^ 2 + b^2]*f^4)
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt Q[m, 0]
\[\int \frac {\left (d x +c \right )^{3}}{a +b \sec \left (f x +e \right )}d x\]
Input:
int((d*x+c)^3/(a+b*sec(f*x+e)),x)
Output:
int((d*x+c)^3/(a+b*sec(f*x+e)),x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2309 vs. \(2 (466) = 932\).
Time = 0.29 (sec) , antiderivative size = 2309, normalized size of antiderivative = 4.39 \[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^3/(a+b*sec(f*x+e)),x, algorithm="fricas")
Output:
1/4*((a^2 - b^2)*d^3*f^4*x^4 + 4*(a^2 - b^2)*c*d^2*f^4*x^3 + 6*(a^2 - b^2) *c^2*d*f^4*x^2 + 4*(a^2 - b^2)*c^3*f^4*x + 12*a*b*d^3*sqrt(-(a^2 - b^2)/a^ 2)*polylog(4, -(b*cos(f*x + e) + I*b*sin(f*x + e) + (a*cos(f*x + e) + I*a* sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2))/a) - 12*a*b*d^3*sqrt(-(a^2 - b^2)/a^ 2)*polylog(4, -(b*cos(f*x + e) + I*b*sin(f*x + e) - (a*cos(f*x + e) + I*a* sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2))/a) + 12*a*b*d^3*sqrt(-(a^2 - b^2)/a^ 2)*polylog(4, -(b*cos(f*x + e) - I*b*sin(f*x + e) + (a*cos(f*x + e) - I*a* sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2))/a) - 12*a*b*d^3*sqrt(-(a^2 - b^2)/a^ 2)*polylog(4, -(b*cos(f*x + e) - I*b*sin(f*x + e) - (a*cos(f*x + e) - I*a* sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2))/a) - 6*(a*b*d^3*f^2*x^2 + 2*a*b*c*d^ 2*f^2*x + a*b*c^2*d*f^2)*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) + I *b*sin(f*x + e) + (a*cos(f*x + e) + I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^ 2) + a)/a + 1) + 6*(a*b*d^3*f^2*x^2 + 2*a*b*c*d^2*f^2*x + a*b*c^2*d*f^2)*s qrt(-(a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) + I*b*sin(f*x + e) - (a*cos(f *x + e) + I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2) + a)/a + 1) - 6*(a*b*d^ 3*f^2*x^2 + 2*a*b*c*d^2*f^2*x + a*b*c^2*d*f^2)*sqrt(-(a^2 - b^2)/a^2)*dilo g(-(b*cos(f*x + e) - I*b*sin(f*x + e) + (a*cos(f*x + e) - I*a*sin(f*x + e) )*sqrt(-(a^2 - b^2)/a^2) + a)/a + 1) + 6*(a*b*d^3*f^2*x^2 + 2*a*b*c*d^2*f^ 2*x + a*b*c^2*d*f^2)*sqrt(-(a^2 - b^2)/a^2)*dilog(-(b*cos(f*x + e) - I*b*s in(f*x + e) - (a*cos(f*x + e) - I*a*sin(f*x + e))*sqrt(-(a^2 - b^2)/a^2...
\[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\int \frac {\left (c + d x\right )^{3}}{a + b \sec {\left (e + f x \right )}}\, dx \] Input:
integrate((d*x+c)**3/(a+b*sec(f*x+e)),x)
Output:
Integral((c + d*x)**3/(a + b*sec(e + f*x)), x)
Exception generated. \[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((d*x+c)^3/(a+b*sec(f*x+e)),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
\[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\int { \frac {{\left (d x + c\right )}^{3}}{b \sec \left (f x + e\right ) + a} \,d x } \] Input:
integrate((d*x+c)^3/(a+b*sec(f*x+e)),x, algorithm="giac")
Output:
integrate((d*x + c)^3/(b*sec(f*x + e) + a), x)
Timed out. \[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\int \frac {{\left (c+d\,x\right )}^3}{a+\frac {b}{\cos \left (e+f\,x\right )}} \,d x \] Input:
int((c + d*x)^3/(a + b/cos(e + f*x)),x)
Output:
int((c + d*x)^3/(a + b/cos(e + f*x)), x)
\[ \int \frac {(c+d x)^3}{a+b \sec (e+f x)} \, dx=\frac {-8 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) a -\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) b \,c^{3}+8 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a^{3} b \,d^{3} f -8 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a \,b^{3} d^{3} f +24 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x^{2}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a^{3} b c \,d^{2} f -24 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x^{2}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a \,b^{3} c \,d^{2} f +24 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a^{3} b \,c^{2} d f -24 \left (\int \frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} x}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b^{2}-a^{2}-2 a b -b^{2}}d x \right ) a \,b^{3} c^{2} d f +4 a^{2} c^{3} f x +6 a^{2} c^{2} d f \,x^{2}+4 a^{2} c \,d^{2} f \,x^{3}+a^{2} d^{3} f \,x^{4}-6 a b \,c^{2} d f \,x^{2}-4 a b c \,d^{2} f \,x^{3}-a b \,d^{3} f \,x^{4}-4 b^{2} c^{3} f x}{4 a f \left (a^{2}-b^{2}\right )} \] Input:
int((d*x+c)^3/(a+b*sec(f*x+e)),x)
Output:
( - 8*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/ sqrt( - a**2 + b**2))*b*c**3 + 8*int((tan((e + f*x)/2)**2*x**3)/(tan((e + f*x)/2)**2*a**2 - tan((e + f*x)/2)**2*b**2 - a**2 - 2*a*b - b**2),x)*a**3* b*d**3*f - 8*int((tan((e + f*x)/2)**2*x**3)/(tan((e + f*x)/2)**2*a**2 - ta n((e + f*x)/2)**2*b**2 - a**2 - 2*a*b - b**2),x)*a*b**3*d**3*f + 24*int((t an((e + f*x)/2)**2*x**2)/(tan((e + f*x)/2)**2*a**2 - tan((e + f*x)/2)**2*b **2 - a**2 - 2*a*b - b**2),x)*a**3*b*c*d**2*f - 24*int((tan((e + f*x)/2)** 2*x**2)/(tan((e + f*x)/2)**2*a**2 - tan((e + f*x)/2)**2*b**2 - a**2 - 2*a* b - b**2),x)*a*b**3*c*d**2*f + 24*int((tan((e + f*x)/2)**2*x)/(tan((e + f* x)/2)**2*a**2 - tan((e + f*x)/2)**2*b**2 - a**2 - 2*a*b - b**2),x)*a**3*b* c**2*d*f - 24*int((tan((e + f*x)/2)**2*x)/(tan((e + f*x)/2)**2*a**2 - tan( (e + f*x)/2)**2*b**2 - a**2 - 2*a*b - b**2),x)*a*b**3*c**2*d*f + 4*a**2*c* *3*f*x + 6*a**2*c**2*d*f*x**2 + 4*a**2*c*d**2*f*x**3 + a**2*d**3*f*x**4 - 6*a*b*c**2*d*f*x**2 - 4*a*b*c*d**2*f*x**3 - a*b*d**3*f*x**4 - 4*b**2*c**3* f*x)/(4*a*f*(a**2 - b**2))