Integrand size = 27, antiderivative size = 86 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=-3 a^2 x+\frac {3 a^2 \cos (c+d x)}{d}-\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {2 a^2 \sec (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{d}+\frac {2 a^2 \tan (c+d x)}{d} \] Output:
-3*a^2*x+3*a^2*cos(d*x+c)/d-1/3*a^2*cos(d*x+c)^3/d+2*a^2*sec(d*x+c)/d+a^2* cos(d*x+c)*sin(d*x+c)/d+2*a^2*tan(d*x+c)/d
Time = 1.31 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.51 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {a^2 \sec (c+d x) (1+\sin (c+d x))^{5/2} \left (-18 \arcsin \left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)}+\sqrt {1+\sin (c+d x)} \left (-14+5 \sin (c+d x)+2 \sin ^2(c+d x)+\sin ^3(c+d x)\right )\right )}{3 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4} \] Input:
Integrate[Sin[c + d*x]*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^2,x]
Output:
-1/3*(a^2*Sec[c + d*x]*(1 + Sin[c + d*x])^(5/2)*(-18*ArcSin[Sqrt[1 - Sin[c + d*x]]/Sqrt[2]]*Sqrt[1 - Sin[c + d*x]] + Sqrt[1 + Sin[c + d*x]]*(-14 + 5 *Sin[c + d*x] + 2*Sin[c + d*x]^2 + Sin[c + d*x]^3)))/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4)
Time = 0.41 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3352, 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)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^3 (a \sin (c+d x)+a)^2}{\cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \int \left (a^2 \sin ^3(c+d x) \tan ^2(c+d x)+2 a^2 \sin ^2(c+d x) \tan ^2(c+d x)+a^2 \sin (c+d x) \tan ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {3 a^2 \cos (c+d x)}{d}+\frac {3 a^2 \tan (c+d x)}{d}+\frac {2 a^2 \sec (c+d x)}{d}-\frac {a^2 \sin ^2(c+d x) \tan (c+d x)}{d}-3 a^2 x\) |
Input:
Int[Sin[c + d*x]*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^2,x]
Output:
-3*a^2*x + (3*a^2*Cos[c + d*x])/d - (a^2*Cos[c + d*x]^3)/(3*d) + (2*a^2*Se c[c + d*x])/d + (3*a^2*Tan[c + d*x])/d - (a^2*Sin[c + d*x]^2*Tan[c + d*x]) /d
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig [(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Result contains complex when optimal does not.
Time = 2.20 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.14
method | result | size |
risch | \(-3 a^{2} x +\frac {11 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {11 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {4 a^{2}}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}-\frac {a^{2} \cos \left (3 d x +3 c \right )}{12 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{2 d}\) | \(98\) |
derivativedivides | \(\frac {a^{2} \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 )+2 a^{2} \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^{2} \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}\) | \(148\) |
default | \(\frac {a^{2} \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 )+2 a^{2} \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^{2} \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}\) | \(148\) |
parts | \(\frac {a^{2} \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^{2} \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}+\frac {2 a^{2} \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}\) | \(153\) |
Input:
int(sin(d*x+c)*(a+a*sin(d*x+c))^2*tan(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-3*a^2*x+11/8*a^2/d*exp(I*(d*x+c))+11/8*a^2/d*exp(-I*(d*x+c))+4*a^2/d/(exp (I*(d*x+c))-I)-1/12*a^2/d*cos(3*d*x+3*c)+1/2*a^2/d*sin(2*d*x+2*c)
Time = 0.09 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.77 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{3} + 9 \, a^{2} d x - 9 \, a^{2} \cos \left (d x + c\right )^{2} - 6 \, a^{2} + 3 \, {\left (3 \, a^{2} d x - 4 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (a^{2} \cos \left (d x + c\right )^{3} + 9 \, a^{2} d x + 3 \, a^{2} \cos \left (d x + c\right )^{2} - 6 \, a^{2} \cos \left (d x + c\right ) + 6 \, a^{2}\right )} \sin \left (d x + c\right )}{3 \, {\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))^2*tan(d*x+c)^2,x, algorithm="fricas" )
Output:
-1/3*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^3 + 9*a^2*d*x - 9*a^2*cos(d* x + c)^2 - 6*a^2 + 3*(3*a^2*d*x - 4*a^2)*cos(d*x + c) - (a^2*cos(d*x + c)^ 3 + 9*a^2*d*x + 3*a^2*cos(d*x + c)^2 - 6*a^2*cos(d*x + c) + 6*a^2)*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))^2 \tan ^2(c+d x) \, dx=a^{2} \left (\int \sin {\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx + \int 2 \sin ^{2}{\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{3}{\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))**2*tan(d*x+c)**2,x)
Output:
a**2*(Integral(sin(c + d*x)*tan(c + d*x)**2, x) + Integral(2*sin(c + d*x)* *2*tan(c + d*x)**2, x) + Integral(sin(c + d*x)**3*tan(c + d*x)**2, x))
Time = 0.11 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.14 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=-\frac {{\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^{2} + 3 \, {\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^{2} - 3 \, a^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )}}{3 \, d} \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))^2*tan(d*x+c)^2,x, algorithm="maxima" )
Output:
-1/3*((cos(d*x + c)^3 - 3/cos(d*x + c) - 6*cos(d*x + c))*a^2 + 3*(3*d*x + 3*c - tan(d*x + c)/(tan(d*x + c)^2 + 1) - 2*tan(d*x + c))*a^2 - 3*a^2*(1/c os(d*x + c) + cos(d*x + c)))/d
Timed out. \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=\text {Timed out} \] Input:
integrate(sin(d*x+c)*(a+a*sin(d*x+c))^2*tan(d*x+c)^2,x, algorithm="giac")
Output:
Timed out
Time = 35.02 (sec) , antiderivative size = 288, normalized size of antiderivative = 3.35 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=-3\,a^2\,x-\frac {3\,a^2\,\left (c+d\,x\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (9\,c+9\,d\,x-10\right )}{3}\right )-\frac {a^2\,\left (9\,c+9\,d\,x-28\right )}{3}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (3\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (9\,c+9\,d\,x-18\right )}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (9\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (27\,c+27\,d\,x-18\right )}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (9\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (27\,c+27\,d\,x-36\right )}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (9\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (27\,c+27\,d\,x-48\right )}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (9\,a^2\,\left (c+d\,x\right )-\frac {a^2\,\left (27\,c+27\,d\,x-66\right )}{3}\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 )}^3} \] Input:
int(sin(c + d*x)*tan(c + d*x)^2*(a + a*sin(c + d*x))^2,x)
Output:
- 3*a^2*x - (3*a^2*(c + d*x) - tan(c/2 + (d*x)/2)*(3*a^2*(c + d*x) - (a^2* (9*c + 9*d*x - 10))/3) - (a^2*(9*c + 9*d*x - 28))/3 + tan(c/2 + (d*x)/2)^6 *(3*a^2*(c + d*x) - (a^2*(9*c + 9*d*x - 18))/3) - tan(c/2 + (d*x)/2)^5*(9* a^2*(c + d*x) - (a^2*(27*c + 27*d*x - 18))/3) - tan(c/2 + (d*x)/2)^3*(9*a^ 2*(c + d*x) - (a^2*(27*c + 27*d*x - 36))/3) + tan(c/2 + (d*x)/2)^4*(9*a^2* (c + d*x) - (a^2*(27*c + 27*d*x - 48))/3) + tan(c/2 + (d*x)/2)^2*(9*a^2*(c + d*x) - (a^2*(27*c + 27*d*x - 66))/3))/(d*(tan(c/2 + (d*x)/2) - 1)*(tan( c/2 + (d*x)/2)^2 + 1)^3)
Time = 0.18 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.64 \[ \int \sin (c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx=\frac {a^{2} \left (\cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+5 \cos \left (d x +c \right ) \sin \left (d x +c \right )-9 \cos \left (d x +c \right ) d x -18 \cos \left (d x +c \right )-\sin \left (d x +c \right )^{4}-3 \sin \left (d x +c \right )^{3}-7 \sin \left (d x +c \right )^{2}-9 \sin \left (d x +c \right ) d x +5 \sin \left (d x +c \right )+9 d x +18\right )}{3 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))^2*tan(d*x+c)^2,x)
Output:
(a**2*(cos(c + d*x)*sin(c + d*x)**3 + 2*cos(c + d*x)*sin(c + d*x)**2 + 5*c os(c + d*x)*sin(c + d*x) - 9*cos(c + d*x)*d*x - 18*cos(c + d*x) - sin(c + d*x)**4 - 3*sin(c + d*x)**3 - 7*sin(c + d*x)**2 - 9*sin(c + d*x)*d*x + 5*s in(c + d*x) + 9*d*x + 18))/(3*d*(cos(c + d*x) + sin(c + d*x) - 1))