Integrand size = 27, antiderivative size = 64 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=a^3 x+\frac {\sec ^3(c+d x) (a+a \sin (c+d x))^3}{3 d}-\frac {2 a^5 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )} \] Output:
a^3*x+1/3*sec(d*x+c)^3*(a+a*sin(d*x+c))^3/d-2*a^5*cos(d*x+c)/d/(a^2-a^2*si n(d*x+c))
Time = 6.36 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.67 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {a^3 \left (-9 (2+c+d x) \cos \left (\frac {1}{2} (c+d x)\right )+(14+3 c+3 d x) \cos \left (\frac {3}{2} (c+d x)\right )+6 (2 (2+c+d x)+(c+d x) \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{6 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3} \] Input:
Integrate[Sec[c + d*x]^3*(a + a*Sin[c + d*x])^3*Tan[c + d*x],x]
Output:
-1/6*(a^3*(-9*(2 + c + d*x)*Cos[(c + d*x)/2] + (14 + 3*c + 3*d*x)*Cos[(3*( c + d*x))/2] + 6*(2*(2 + c + d*x) + (c + d*x)*Cos[c + d*x])*Sin[(c + d*x)/ 2]))/(d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^3)
Time = 0.44 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.06, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3042, 3334, 3042, 3149, 3042, 3159, 24}
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 \tan (c+d x) \sec ^3(c+d x) (a \sin (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x) (a \sin (c+d x)+a)^3}{\cos (c+d x)^4}dx\) |
\(\Big \downarrow \) 3334 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a \int \sec ^2(c+d x) (\sin (c+d x) a+a)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a \int \frac {(\sin (c+d x) a+a)^2}{\cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3149 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a^5 \int \frac {\cos ^2(c+d x)}{(a-a \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a^5 \int \frac {\cos (c+d x)^2}{(a-a \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3159 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a^5 \left (\frac {2 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-\frac {\int 1dx}{a^2}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^3}{3 d}-a^5 \left (\frac {2 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-\frac {x}{a^2}\right )\) |
Input:
Int[Sec[c + d*x]^3*(a + a*Sin[c + d*x])^3*Tan[c + d*x],x]
Output:
(Sec[c + d*x]^3*(a + a*Sin[c + d*x])^3)/(3*d) - a^5*(-(x/a^2) + (2*Cos[c + d*x])/(d*(a^2 - a^2*Sin[c + d*x])))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(a/g)^(2*m) Int[(g*Cos[e + f*x])^(2*m + p)/( a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2 , 0] && IntegerQ[m] && LtQ[p, -1] && GeQ[2*m + p, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[2*g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f *x])^(m + 1)/(b*f*(2*m + p + 1))), x] + Simp[g^2*((p - 1)/(b^2*(2*m + p + 1 ))) Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] & & NeQ[2*m + p + 1, 0] && !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*p]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b* c + a*d))*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(p + 1))) , x] + Simp[b*((a*d*m + b*c*(m + p + 1))/(a*g^2*(p + 1))) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, -1] && LtQ[p, -1]
Result contains complex when optimal does not.
Time = 0.73 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.84
method | result | size |
risch | \(a^{3} x -\frac {2 a^{3} \left (-12 i {\mathrm e}^{i \left (d x +c \right )}+9 \,{\mathrm e}^{2 i \left (d x +c \right )}-7\right )}{3 d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3}}\) | \(54\) |
derivativedivides | \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}\right )+\frac {a^{3} \sin \left (d x +c \right )^{3}}{\cos \left (d x +c \right )^{3}}+\frac {a^{3}}{3 \cos \left (d x +c \right )^{3}}}{d}\) | \(126\) |
default | \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}\right )+\frac {a^{3} \sin \left (d x +c \right )^{3}}{\cos \left (d x +c \right )^{3}}+\frac {a^{3}}{3 \cos \left (d x +c \right )^{3}}}{d}\) | \(126\) |
Input:
int(sec(d*x+c)^3*(a+a*sin(d*x+c))^3*tan(d*x+c),x,method=_RETURNVERBOSE)
Output:
a^3*x-2/3*a^3*(-12*I*exp(I*(d*x+c))+9*exp(2*I*(d*x+c))-7)/d/(exp(I*(d*x+c) )-I)^3
Leaf count of result is larger than twice the leaf count of optimal. 143 vs. \(2 (63) = 126\).
Time = 0.08 (sec) , antiderivative size = 143, normalized size of antiderivative = 2.23 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=-\frac {6 \, a^{3} d x + 2 \, a^{3} - {\left (3 \, a^{3} d x + 7 \, a^{3}\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, a^{3} d x - 5 \, a^{3}\right )} \cos \left (d x + c\right ) - {\left (6 \, a^{3} d x - 2 \, a^{3} + {\left (3 \, a^{3} d x - 7 \, a^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) + {\left (d \cos \left (d x + c\right ) + 2 \, d\right )} \sin \left (d x + c\right ) - 2 \, d\right )}} \] Input:
integrate(sec(d*x+c)^3*(a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="fricas" )
Output:
-1/3*(6*a^3*d*x + 2*a^3 - (3*a^3*d*x + 7*a^3)*cos(d*x + c)^2 + (3*a^3*d*x - 5*a^3)*cos(d*x + c) - (6*a^3*d*x - 2*a^3 + (3*a^3*d*x - 7*a^3)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^2 - d*cos(d*x + c) + (d*cos(d*x + c) + 2*d)*sin(d*x + c) - 2*d)
\[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=a^{3} \left (\int \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 \sin {\left (c + d x \right )} \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 3 \sin ^{2}{\left (c + d x \right )} \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(sec(d*x+c)**3*(a+a*sin(d*x+c))**3*tan(d*x+c),x)
Output:
a**3*(Integral(tan(c + d*x)*sec(c + d*x)**3, x) + Integral(3*sin(c + d*x)* tan(c + d*x)*sec(c + d*x)**3, x) + Integral(3*sin(c + d*x)**2*tan(c + d*x) *sec(c + d*x)**3, x) + Integral(sin(c + d*x)**3*tan(c + d*x)*sec(c + d*x)* *3, x))
Time = 0.11 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.31 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=\frac {3 \, a^{3} \tan \left (d x + c\right )^{3} + {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3} - \frac {3 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{3}}{\cos \left (d x + c\right )^{3}} + \frac {a^{3}}{\cos \left (d x + c\right )^{3}}}{3 \, d} \] Input:
integrate(sec(d*x+c)^3*(a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="maxima" )
Output:
1/3*(3*a^3*tan(d*x + c)^3 + (tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c) )*a^3 - 3*(3*cos(d*x + c)^2 - 1)*a^3/cos(d*x + c)^3 + a^3/cos(d*x + c)^3)/ d
Time = 0.28 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.05 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=\frac {3 \, {\left (d x + c\right )} a^{3} + \frac {2 \, {\left (3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{3 \, d} \] Input:
integrate(sec(d*x+c)^3*(a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="giac")
Output:
1/3*(3*(d*x + c)*a^3 + 2*(3*a^3*tan(1/2*d*x + 1/2*c)^2 - 12*a^3*tan(1/2*d* x + 1/2*c) + 5*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^3)/d
Time = 31.56 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.88 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=a^3\,x+\frac {a^3\,\left (c+d\,x\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,a^3\,\left (c+d\,x\right )-\frac {a^3\,\left (9\,c+9\,d\,x-24\right )}{3}\right )-\frac {a^3\,\left (3\,c+3\,d\,x-10\right )}{3}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (3\,a^3\,\left (c+d\,x\right )-\frac {a^3\,\left (9\,c+9\,d\,x-6\right )}{3}\right )}{d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3} \] Input:
int((tan(c + d*x)*(a + a*sin(c + d*x))^3)/cos(c + d*x)^3,x)
Output:
a^3*x + (a^3*(c + d*x) - tan(c/2 + (d*x)/2)*(3*a^3*(c + d*x) - (a^3*(9*c + 9*d*x - 24))/3) - (a^3*(3*c + 3*d*x - 10))/3 + tan(c/2 + (d*x)/2)^2*(3*a^ 3*(c + d*x) - (a^3*(9*c + 9*d*x - 6))/3))/(d*(tan(c/2 + (d*x)/2) - 1)^3)
Time = 0.21 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.88 \[ \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 \tan (c+d x) \, dx=\frac {a^{3} \left (3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} d x +2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} d x +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d x -18 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-3 d x +8\right )}{3 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(sec(d*x+c)^3*(a+a*sin(d*x+c))^3*tan(d*x+c),x)
Output:
(a**3*(3*tan((c + d*x)/2)**3*d*x + 2*tan((c + d*x)/2)**3 - 9*tan((c + d*x) /2)**2*d*x + 9*tan((c + d*x)/2)*d*x - 18*tan((c + d*x)/2) - 3*d*x + 8))/(3 *d*(tan((c + d*x)/2)**3 - 3*tan((c + d*x)/2)**2 + 3*tan((c + d*x)/2) - 1))