Integrand size = 27, antiderivative size = 111 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=-\frac {51 a^3 x}{8}+\frac {7 a^3 \cos (c+d x)}{d}-\frac {a^3 \cos ^3(c+d x)}{d}+\frac {4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}+\frac {19 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d} \] Output:
-51/8*a^3*x+7*a^3*cos(d*x+c)/d-a^3*cos(d*x+c)^3/d+4*a^3*cos(d*x+c)/d/(1-si n(d*x+c))+19/8*a^3*cos(d*x+c)*sin(d*x+c)/d+1/4*a^3*cos(d*x+c)*sin(d*x+c)^3 /d
Time = 6.44 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.13 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=\frac {(a+a \sin (c+d x))^3 \left (-204 (c+d x)+200 \cos (c+d x)-8 \cos (3 (c+d x))+\frac {256 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+40 \sin (2 (c+d x))-\sin (4 (c+d x))\right )}{32 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6} \] Input:
Integrate[Sin[c + d*x]*(a + a*Sin[c + d*x])^3*Tan[c + d*x]^2,x]
Output:
((a + a*Sin[c + d*x])^3*(-204*(c + d*x) + 200*Cos[c + d*x] - 8*Cos[3*(c + d*x)] + (256*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2]) + 40* Sin[2*(c + d*x)] - Sin[4*(c + d*x)]))/(32*d*(Cos[(c + d*x)/2] + Sin[(c + d *x)/2])^6)
Time = 0.39 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.93, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3351, 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 \sin (c+d x) \tan ^2(c+d x) (a \sin (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^3 (a \sin (c+d x)+a)^3}{\cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3351 |
\(\displaystyle a^2 \int \left (-a \sin ^4(c+d x)-3 a \sin ^3(c+d x)-4 a \sin ^2(c+d x)-4 a \sin (c+d x)-4 a+\frac {4 a}{1-\sin (c+d x)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 \left (-\frac {a \cos ^3(c+d x)}{d}+\frac {7 a \cos (c+d x)}{d}+\frac {a \sin ^3(c+d x) \cos (c+d x)}{4 d}+\frac {19 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {4 a \cos (c+d x)}{d (1-\sin (c+d x))}-\frac {51 a x}{8}\right )\) |
Input:
Int[Sin[c + d*x]*(a + a*Sin[c + d*x])^3*Tan[c + d*x]^2,x]
Output:
a^2*((-51*a*x)/8 + (7*a*Cos[c + d*x])/d - (a*Cos[c + d*x]^3)/d + (4*a*Cos[ c + d*x])/(d*(1 - Sin[c + d*x])) + (19*a*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*Cos[c + d*x]*Sin[c + d*x]^3)/(4*d))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/a^p Int[Expan dTrig[(d*sin[e + f*x])^n*(a - b*sin[e + f*x])^(p/2)*(a + b*sin[e + f*x])^(m + p/2), x], x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && In tegersQ[m, n, p/2] && ((GtQ[m, 0] && GtQ[p, 0] && LtQ[-m - p, n, -1]) || (G tQ[m, 2] && LtQ[p, 0] && GtQ[m + p/2, 0]))
Result contains complex when optimal does not.
Time = 6.15 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.04
method | result | size |
risch | \(-\frac {51 a^{3} x}{8}+\frac {25 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {25 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {8 a^{3}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}-\frac {a^{3} \sin \left (4 d x +4 c \right )}{32 d}-\frac {a^{3} \cos \left (3 d x +3 c \right )}{4 d}+\frac {5 a^{3} \sin \left (2 d x +2 c \right )}{4 d}\) | \(115\) |
derivativedivides | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{6}}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )\right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+a^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )}{d}\) | \(212\) |
default | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{6}}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )\right )+3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+a^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )}{d}\) | \(212\) |
parts | \(\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )}{d}+\frac {a^{3} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}+\frac {3 a^{3} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )}{d}+\frac {3 a^{3} \left (\frac {\sin \left (d x +c \right )^{6}}{\cos \left (d x +c \right )}+\left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )\right )}{d}\) | \(220\) |
Input:
int(sin(d*x+c)*(a+a*sin(d*x+c))^3*tan(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-51/8*a^3*x+25/8*a^3/d*exp(I*(d*x+c))+25/8*a^3/d*exp(-I*(d*x+c))+8*a^3/d/( exp(I*(d*x+c))-I)-1/32*a^3/d*sin(4*d*x+4*c)-1/4*a^3/d*cos(3*d*x+3*c)+5/4*a ^3/d*sin(2*d*x+2*c)
Time = 0.08 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.60 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=-\frac {2 \, a^{3} \cos \left (d x + c\right )^{5} + 8 \, a^{3} \cos \left (d x + c\right )^{4} - 15 \, a^{3} \cos \left (d x + c\right )^{3} + 51 \, a^{3} d x - 56 \, a^{3} \cos \left (d x + c\right )^{2} - 32 \, a^{3} + {\left (51 \, a^{3} d x - 67 \, a^{3}\right )} \cos \left (d x + c\right ) + {\left (2 \, a^{3} \cos \left (d x + c\right )^{4} - 6 \, a^{3} \cos \left (d x + c\right )^{3} - 51 \, a^{3} d x - 21 \, a^{3} \cos \left (d x + c\right )^{2} + 35 \, a^{3} \cos \left (d x + c\right ) - 32 \, a^{3}\right )} \sin \left (d x + c\right )}{8 \, {\left (d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d\right )}} \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))^3*tan(d*x+c)^2,x, algorithm="fricas" )
Output:
-1/8*(2*a^3*cos(d*x + c)^5 + 8*a^3*cos(d*x + c)^4 - 15*a^3*cos(d*x + c)^3 + 51*a^3*d*x - 56*a^3*cos(d*x + c)^2 - 32*a^3 + (51*a^3*d*x - 67*a^3)*cos( d*x + c) + (2*a^3*cos(d*x + c)^4 - 6*a^3*cos(d*x + c)^3 - 51*a^3*d*x - 21* a^3*cos(d*x + c)^2 + 35*a^3*cos(d*x + c) - 32*a^3)*sin(d*x + c))/(d*cos(d* x + c) - d*sin(d*x + c) + d)
\[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=a^{3} \left (\int \sin {\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx + \int 3 \sin ^{2}{\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx + \int 3 \sin ^{3}{\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{4}{\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))**3*tan(d*x+c)**2,x)
Output:
a**3*(Integral(sin(c + d*x)*tan(c + d*x)**2, x) + Integral(3*sin(c + d*x)* *2*tan(c + d*x)**2, x) + Integral(3*sin(c + d*x)**3*tan(c + d*x)**2, x) + Integral(sin(c + d*x)**4*tan(c + d*x)**2, x))
Time = 0.11 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.46 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=-\frac {8 \, {\left (\cos \left (d x + c\right )^{3} - \frac {3}{\cos \left (d x + c\right )} - 6 \, \cos \left (d x + c\right )\right )} a^{3} + {\left (15 \, d x + 15 \, c - \frac {9 \, \tan \left (d x + c\right )^{3} + 7 \, \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1} - 8 \, \tan \left (d x + c\right )\right )} a^{3} + 12 \, {\left (3 \, d x + 3 \, c - \frac {\tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1} - 2 \, \tan \left (d x + c\right )\right )} a^{3} - 8 \, a^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )}}{8 \, d} \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))^3*tan(d*x+c)^2,x, algorithm="maxima" )
Output:
-1/8*(8*(cos(d*x + c)^3 - 3/cos(d*x + c) - 6*cos(d*x + c))*a^3 + (15*d*x + 15*c - (9*tan(d*x + c)^3 + 7*tan(d*x + c))/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1) - 8*tan(d*x + c))*a^3 + 12*(3*d*x + 3*c - tan(d*x + c)/(tan(d*x + c)^2 + 1) - 2*tan(d*x + c))*a^3 - 8*a^3*(1/cos(d*x + c) + cos(d*x + c))) /d
Timed out. \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=\text {Timed out} \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))^3*tan(d*x+c)^2,x, algorithm="giac")
Output:
Timed out
Time = 35.53 (sec) , antiderivative size = 363, normalized size of antiderivative = 3.27 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=-\frac {51\,a^3\,x}{8}-\frac {\frac {51\,a^3\,\left (c+d\,x\right )}{8}-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{8}-\frac {a^3\,\left (51\,c+51\,d\,x-58\right )}{8}\right )-\frac {a^3\,\left (51\,c+51\,d\,x-160\right )}{8}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{8}-\frac {a^3\,\left (51\,c+51\,d\,x-102\right )}{8}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{2}-\frac {a^3\,\left (204\,c+204\,d\,x-102\right )}{8}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{2}-\frac {a^3\,\left (204\,c+204\,d\,x-266\right )}{8}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{2}-\frac {a^3\,\left (204\,c+204\,d\,x-374\right )}{8}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {51\,a^3\,\left (c+d\,x\right )}{2}-\frac {a^3\,\left (204\,c+204\,d\,x-538\right )}{8}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {153\,a^3\,\left (c+d\,x\right )}{4}-\frac {a^3\,\left (306\,c+306\,d\,x-342\right )}{8}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {153\,a^3\,\left (c+d\,x\right )}{4}-\frac {a^3\,\left (306\,c+306\,d\,x-618\right )}{8}\right )}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \] Input:
int(sin(c + d*x)*tan(c + d*x)^2*(a + a*sin(c + d*x))^3,x)
Output:
- (51*a^3*x)/8 - ((51*a^3*(c + d*x))/8 - tan(c/2 + (d*x)/2)*((51*a^3*(c + d*x))/8 - (a^3*(51*c + 51*d*x - 58))/8) - (a^3*(51*c + 51*d*x - 160))/8 + tan(c/2 + (d*x)/2)^8*((51*a^3*(c + d*x))/8 - (a^3*(51*c + 51*d*x - 102))/8 ) - tan(c/2 + (d*x)/2)^7*((51*a^3*(c + d*x))/2 - (a^3*(204*c + 204*d*x - 1 02))/8) - tan(c/2 + (d*x)/2)^3*((51*a^3*(c + d*x))/2 - (a^3*(204*c + 204*d *x - 266))/8) + tan(c/2 + (d*x)/2)^6*((51*a^3*(c + d*x))/2 - (a^3*(204*c + 204*d*x - 374))/8) + tan(c/2 + (d*x)/2)^2*((51*a^3*(c + d*x))/2 - (a^3*(2 04*c + 204*d*x - 538))/8) - tan(c/2 + (d*x)/2)^5*((153*a^3*(c + d*x))/4 - (a^3*(306*c + 306*d*x - 342))/8) + tan(c/2 + (d*x)/2)^4*((153*a^3*(c + d*x ))/4 - (a^3*(306*c + 306*d*x - 618))/8))/(d*(tan(c/2 + (d*x)/2) - 1)*(tan( c/2 + (d*x)/2)^2 + 1)^4)
Time = 0.17 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.51 \[ \int \sin (c+d x) (a+a \sin (c+d x))^3 \tan ^2(c+d x) \, dx=\frac {a^{3} \left (2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+11 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+29 \cos \left (d x +c \right ) \sin \left (d x +c \right )-51 \cos \left (d x +c \right ) d x -102 \cos \left (d x +c \right )-2 \sin \left (d x +c \right )^{5}-8 \sin \left (d x +c \right )^{4}-17 \sin \left (d x +c \right )^{3}-40 \sin \left (d x +c \right )^{2}-51 \sin \left (d x +c \right ) d x +29 \sin \left (d x +c \right )+51 d x +102\right )}{8 d \left (\cos \left (d x +c \right )+\sin \left (d x +c \right )-1\right )} \] Input:
int(sin(d*x+c)*(a+a*sin(d*x+c))^3*tan(d*x+c)^2,x)
Output:
(a**3*(2*cos(c + d*x)*sin(c + d*x)**4 + 6*cos(c + d*x)*sin(c + d*x)**3 + 1 1*cos(c + d*x)*sin(c + d*x)**2 + 29*cos(c + d*x)*sin(c + d*x) - 51*cos(c + d*x)*d*x - 102*cos(c + d*x) - 2*sin(c + d*x)**5 - 8*sin(c + d*x)**4 - 17* sin(c + d*x)**3 - 40*sin(c + d*x)**2 - 51*sin(c + d*x)*d*x + 29*sin(c + d* x) + 51*d*x + 102))/(8*d*(cos(c + d*x) + sin(c + d*x) - 1))