\(\int \sec ^4(c-b x) \sin ^2(a+b x) \, dx\) [276]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F(-1)]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 80 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\frac {\sec ^2(c-b x) \sin (2 (a+c))}{2 b}-\frac {\cos ^2(a+c) \tan (c-b x)}{b}+\frac {\cos (2 (a+c)) \tan (c-b x)}{b}-\frac {\cos ^2(a+c) \tan ^3(c-b x)}{3 b} \] Output:

1/2*sec(b*x-c)^2*sin(2*a+2*c)/b+cos(a+c)^2*tan(b*x-c)/b-cos(2*a+2*c)*tan(b 
*x-c)/b+1/3*cos(a+c)^2*tan(b*x-c)^3/b
 

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.04 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\frac {\sec (c) \sec ^3(c-b x) (3 \sin (b x)-\sin (2 c-3 b x)+\sin (2 a+4 c-3 b x)+3 \sin (2 a+2 c-b x)+3 \sin (2 a+b x)-\sin (2 a+3 b x))}{12 b} \] Input:

Integrate[Sec[c - b*x]^4*Sin[a + b*x]^2,x]
 

Output:

(Sec[c]*Sec[c - b*x]^3*(3*Sin[b*x] - Sin[2*c - 3*b*x] + Sin[2*a + 4*c - 3* 
b*x] + 3*Sin[2*a + 2*c - b*x] + 3*Sin[2*a + b*x] - Sin[2*a + 3*b*x]))/(12* 
b)
 

Rubi [F]

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 \sin ^2(a+b x) \sec ^4(c-b x) \, dx\)

\(\Big \downarrow \) 7299

\(\displaystyle \int \sin ^2(a+b x) \sec ^4(c-b x)dx\)

Input:

Int[Sec[c - b*x]^4*Sin[a + b*x]^2,x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 7299
Int[u_, x_] :> CannotIntegrate[u, x]
 
Maple [A] (verified)

Time = 5.48 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.78

method result size
parallelrisch \(\frac {3 \sin \left (b x -c \right )+\sin \left (3 b x -3 c \right )-2 \sin \left (3 b x +2 a -c \right )}{3 b \left (\cos \left (3 b x -3 c \right )+3 \cos \left (b x -c \right )\right )}\) \(62\)
risch \(-\frac {2 i \left ({\mathrm e}^{8 i \left (a +c \right )}+3 \,{\mathrm e}^{2 i \left (b x +4 a +3 c \right )}-{\mathrm e}^{6 i \left (a +c \right )}+3 \,{\mathrm e}^{4 i \left (b x +2 a +c \right )}-3 \,{\mathrm e}^{2 i \left (b x +3 a +2 c \right )}+{\mathrm e}^{4 i \left (a +c \right )}\right )}{3 \left ({\mathrm e}^{2 i \left (a +c \right )}+{\mathrm e}^{2 i \left (b x +a \right )}\right )^{3} b}\) \(96\)
default \(\frac {-\frac {1}{\left (\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )\right )^{3} \left (\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right )}-\frac {-2 \cos \left (a \right ) \cos \left (c \right )+2 \sin \left (a \right ) \sin \left (c \right )}{2 \left (\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )\right )^{3} \left (\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right )^{2}}-\frac {\left (\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right )^{2}}{3 \left (\sin \left (a \right ) \cos \left (c \right )+\cos \left (a \right ) \sin \left (c \right )\right )^{3} \left (\tan \left (b x +a \right ) \sin \left (a \right ) \cos \left (c \right )+\tan \left (b x +a \right ) \cos \left (a \right ) \sin \left (c \right )+\cos \left (a \right ) \cos \left (c \right )-\sin \left (a \right ) \sin \left (c \right )\right )^{3}}}{b}\) \(186\)

Input:

int(sec(b*x-c)^4*sin(b*x+a)^2,x,method=_RETURNVERBOSE)
 

Output:

1/3*(3*sin(b*x-c)+sin(3*b*x-3*c)-2*sin(3*b*x+2*a-c))/b/(cos(3*b*x-3*c)+3*c 
os(b*x-c))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 222 vs. \(2 (84) = 168\).

Time = 0.09 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.78 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\frac {{\left (4 \, \cos \left (a + c\right )^{5} - {\left (16 \, \cos \left (a + c\right )^{5} - 24 \, \cos \left (a + c\right )^{3} + 9 \, \cos \left (a + c\right )\right )} \cos \left (b x + a\right )^{2} - 9 \, \cos \left (a + c\right )^{3} + 6 \, \cos \left (a + c\right )\right )} \sin \left (b x + a\right ) + {\left ({\left (16 \, \cos \left (a + c\right )^{4} - 16 \, \cos \left (a + c\right )^{2} + 3\right )} \cos \left (b x + a\right )^{3} - 3 \, {\left (4 \, \cos \left (a + c\right )^{4} - 5 \, \cos \left (a + c\right )^{2} + 1\right )} \cos \left (b x + a\right )\right )} \sin \left (a + c\right )}{3 \, {\left ({\left (4 \, b \cos \left (a + c\right )^{3} - 3 \, b \cos \left (a + c\right )\right )} \cos \left (b x + a\right )^{3} + {\left ({\left (4 \, b \cos \left (a + c\right )^{2} - b\right )} \cos \left (b x + a\right )^{2} - b \cos \left (a + c\right )^{2} + b\right )} \sin \left (b x + a\right ) \sin \left (a + c\right ) - 3 \, {\left (b \cos \left (a + c\right )^{3} - b \cos \left (a + c\right )\right )} \cos \left (b x + a\right )\right )}} \] Input:

integrate(sec(b*x-c)^4*sin(b*x+a)^2,x, algorithm="fricas")
 

Output:

1/3*((4*cos(a + c)^5 - (16*cos(a + c)^5 - 24*cos(a + c)^3 + 9*cos(a + c))* 
cos(b*x + a)^2 - 9*cos(a + c)^3 + 6*cos(a + c))*sin(b*x + a) + ((16*cos(a 
+ c)^4 - 16*cos(a + c)^2 + 3)*cos(b*x + a)^3 - 3*(4*cos(a + c)^4 - 5*cos(a 
 + c)^2 + 1)*cos(b*x + a))*sin(a + c))/((4*b*cos(a + c)^3 - 3*b*cos(a + c) 
)*cos(b*x + a)^3 + ((4*b*cos(a + c)^2 - b)*cos(b*x + a)^2 - b*cos(a + c)^2 
 + b)*sin(b*x + a)*sin(a + c) - 3*(b*cos(a + c)^3 - b*cos(a + c))*cos(b*x 
+ a))
 

Sympy [F(-1)]

Timed out. \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\text {Timed out} \] Input:

integrate(sec(b*x-c)**4*sin(b*x+a)**2,x)
 

Output:

Timed out
                                                                                    
                                                                                    
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 927 vs. \(2 (84) = 168\).

Time = 0.05 (sec) , antiderivative size = 927, normalized size of antiderivative = 11.59 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\text {Too large to display} \] Input:

integrate(sec(b*x-c)^4*sin(b*x+a)^2,x, algorithm="maxima")
 

Output:

2/3*((3*sin(4*b*x + 4*a + 4*c) + 3*sin(2*b*x + 4*a + 6*c) - 3*sin(2*b*x + 
2*a + 4*c) + sin(4*a + 8*c) - sin(2*a + 6*c) + sin(4*c))*cos(6*b*x + 2*a) 
- 3*(3*sin(4*b*x + 2*a + 2*c) + 3*sin(2*b*x + 2*a + 4*c) + sin(2*a + 6*c)) 
*cos(4*b*x + 4*a + 4*c) + 3*(3*sin(2*b*x + 4*a + 6*c) - 3*sin(2*b*x + 2*a 
+ 4*c) + sin(4*a + 8*c) - sin(2*a + 6*c) + sin(4*c))*cos(4*b*x + 2*a + 2*c 
) - 3*(3*sin(2*b*x + 2*a + 4*c) + sin(2*a + 6*c))*cos(2*b*x + 4*a + 6*c) + 
 3*(sin(4*a + 8*c) + sin(4*c))*cos(2*b*x + 2*a + 4*c) - (3*cos(4*b*x + 4*a 
 + 4*c) + 3*cos(2*b*x + 4*a + 6*c) - 3*cos(2*b*x + 2*a + 4*c) + cos(4*a + 
8*c) - cos(2*a + 6*c) + cos(4*c))*sin(6*b*x + 2*a) + 3*(3*cos(4*b*x + 2*a 
+ 2*c) + 3*cos(2*b*x + 2*a + 4*c) + cos(2*a + 6*c))*sin(4*b*x + 4*a + 4*c) 
 - 3*(3*cos(2*b*x + 4*a + 6*c) - 3*cos(2*b*x + 2*a + 4*c) + cos(4*a + 8*c) 
 - cos(2*a + 6*c) + cos(4*c))*sin(4*b*x + 2*a + 2*c) + 3*(3*cos(2*b*x + 2* 
a + 4*c) + cos(2*a + 6*c))*sin(2*b*x + 4*a + 6*c) - 3*(cos(4*a + 8*c) + co 
s(4*c))*sin(2*b*x + 2*a + 4*c) + cos(2*a + 6*c)*sin(4*a + 8*c) - cos(4*a + 
 8*c)*sin(2*a + 6*c) - cos(4*c)*sin(2*a + 6*c) + cos(2*a + 6*c)*sin(4*c))/ 
(b*cos(6*b*x + 2*a)^2 + 9*b*cos(4*b*x + 2*a + 2*c)^2 + 9*b*cos(2*b*x + 2*a 
 + 4*c)^2 + 6*b*cos(2*b*x + 2*a + 4*c)*cos(2*a + 6*c) + b*cos(2*a + 6*c)^2 
 + b*sin(6*b*x + 2*a)^2 + 9*b*sin(4*b*x + 2*a + 2*c)^2 + 9*b*sin(2*b*x + 2 
*a + 4*c)^2 + 6*b*sin(2*b*x + 2*a + 4*c)*sin(2*a + 6*c) + b*sin(2*a + 6*c) 
^2 + 2*(3*b*cos(4*b*x + 2*a + 2*c) + 3*b*cos(2*b*x + 2*a + 4*c) + b*cos...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 786 vs. \(2 (84) = 168\).

Time = 0.15 (sec) , antiderivative size = 786, normalized size of antiderivative = 9.82 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\text {Too large to display} \] Input:

integrate(sec(b*x-c)^4*sin(b*x+a)^2,x, algorithm="giac")
 

Output:

1/3*(tan(b*x - c)^3*tan(1/2*a)^4*tan(1/2*c)^4 - 2*tan(b*x - c)^3*tan(1/2*a 
)^4*tan(1/2*c)^2 - 8*tan(b*x - c)^3*tan(1/2*a)^3*tan(1/2*c)^3 - 6*tan(b*x 
- c)^2*tan(1/2*a)^4*tan(1/2*c)^3 - 2*tan(b*x - c)^3*tan(1/2*a)^2*tan(1/2*c 
)^4 - 6*tan(b*x - c)^2*tan(1/2*a)^3*tan(1/2*c)^4 + tan(b*x - c)^3*tan(1/2* 
a)^4 + 8*tan(b*x - c)^3*tan(1/2*a)^3*tan(1/2*c) + 6*tan(b*x - c)^2*tan(1/2 
*a)^4*tan(1/2*c) + 20*tan(b*x - c)^3*tan(1/2*a)^2*tan(1/2*c)^2 + 36*tan(b* 
x - c)^2*tan(1/2*a)^3*tan(1/2*c)^2 + 12*tan(b*x - c)*tan(1/2*a)^4*tan(1/2* 
c)^2 + 8*tan(b*x - c)^3*tan(1/2*a)*tan(1/2*c)^3 + 36*tan(b*x - c)^2*tan(1/ 
2*a)^2*tan(1/2*c)^3 + 24*tan(b*x - c)*tan(1/2*a)^3*tan(1/2*c)^3 + tan(b*x 
- c)^3*tan(1/2*c)^4 + 6*tan(b*x - c)^2*tan(1/2*a)*tan(1/2*c)^4 + 12*tan(b* 
x - c)*tan(1/2*a)^2*tan(1/2*c)^4 - 2*tan(b*x - c)^3*tan(1/2*a)^2 - 6*tan(b 
*x - c)^2*tan(1/2*a)^3 - 8*tan(b*x - c)^3*tan(1/2*a)*tan(1/2*c) - 36*tan(b 
*x - c)^2*tan(1/2*a)^2*tan(1/2*c) - 24*tan(b*x - c)*tan(1/2*a)^3*tan(1/2*c 
) - 2*tan(b*x - c)^3*tan(1/2*c)^2 - 36*tan(b*x - c)^2*tan(1/2*a)*tan(1/2*c 
)^2 - 48*tan(b*x - c)*tan(1/2*a)^2*tan(1/2*c)^2 - 6*tan(b*x - c)^2*tan(1/2 
*c)^3 - 24*tan(b*x - c)*tan(1/2*a)*tan(1/2*c)^3 + tan(b*x - c)^3 + 6*tan(b 
*x - c)^2*tan(1/2*a) + 12*tan(b*x - c)*tan(1/2*a)^2 + 6*tan(b*x - c)^2*tan 
(1/2*c) + 24*tan(b*x - c)*tan(1/2*a)*tan(1/2*c) + 12*tan(b*x - c)*tan(1/2* 
c)^2)/((tan(1/2*a)^4*tan(1/2*c)^4 + 2*tan(1/2*a)^4*tan(1/2*c)^2 + 2*tan(1/ 
2*a)^2*tan(1/2*c)^4 + tan(1/2*a)^4 + 4*tan(1/2*a)^2*tan(1/2*c)^2 + tan(...
 

Mupad [F(-1)]

Timed out. \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\text {Hanged} \] Input:

int(sin(a + b*x)^2/cos(c - b*x)^4,x)
 

Output:

\text{Hanged}
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.11 \[ \int \sec ^4(c-b x) \sin ^2(a+b x) \, dx=\frac {\cos \left (b x -c \right ) \cos \left (b x +a \right ) \sin \left (b x +a \right )+\sin \left (b x -c \right )^{3}-\sin \left (b x -c \right ) \sin \left (b x +a \right )^{2}-\sin \left (b x -c \right )}{3 \cos \left (b x -c \right ) b \left (\sin \left (b x -c \right )^{2}-1\right )} \] Input:

int(sec(b*x-c)^4*sin(b*x+a)^2,x)
 

Output:

(cos(b*x - c)*cos(a + b*x)*sin(a + b*x) + sin(b*x - c)**3 - sin(b*x - c)*s 
in(a + b*x)**2 - sin(b*x - c))/(3*cos(b*x - c)*b*(sin(b*x - c)**2 - 1))