Integrand size = 21, antiderivative size = 72 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {3 a^2 \log (1-\sin (c+d x))}{d}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin ^2(c+d x)}{2 d}+\frac {a^3}{d (a-a \sin (c+d x))} \] Output:
3*a^2*ln(1-sin(d*x+c))/d+2*a^2*sin(d*x+c)/d+1/2*a^2*sin(d*x+c)^2/d+a^3/d/( a-a*sin(d*x+c))
Time = 0.12 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.75 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^2 \left (6 \log (1-\sin (c+d x))+\frac {2}{1-\sin (c+d x)}+4 \sin (c+d x)+\sin ^2(c+d x)\right )}{2 d} \] Input:
Integrate[(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]
Output:
(a^2*(6*Log[1 - Sin[c + d*x]] + 2/(1 - Sin[c + d*x]) + 4*Sin[c + d*x] + Si n[c + d*x]^2))/(2*d)
Time = 0.25 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3186, 49, 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 \tan ^3(c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^3 (a \sin (c+d x)+a)^2dx\) |
\(\Big \downarrow \) 3186 |
\(\displaystyle \frac {\int \frac {a^3 \sin ^3(c+d x)}{(a-a \sin (c+d x))^2}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {\int \left (\frac {a^3}{(a-a \sin (c+d x))^2}-\frac {3 a^2}{a-a \sin (c+d x)}+\sin (c+d x) a+2 a\right )d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {a^3}{a-a \sin (c+d x)}+\frac {1}{2} a^2 \sin ^2(c+d x)+2 a^2 \sin (c+d x)+3 a^2 \log (a-a \sin (c+d x))}{d}\) |
Input:
Int[(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]
Output:
(3*a^2*Log[a - a*Sin[c + d*x]] + 2*a^2*Sin[c + d*x] + (a^2*Sin[c + d*x]^2) /2 + a^3/(a - a*Sin[c + d*x]))/d
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x) ^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && E qQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]
Time = 1.66 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.69
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{2}}{2}+2 \sin \left (d x +c \right )-\frac {1}{\sin \left (d x +c \right )-1}+3 \ln \left (\sin \left (d x +c \right )-1\right )\right )}{d}\) | \(50\) |
default | \(\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{2}}{2}+2 \sin \left (d x +c \right )-\frac {1}{\sin \left (d x +c \right )-1}+3 \ln \left (\sin \left (d x +c \right )-1\right )\right )}{d}\) | \(50\) |
risch | \(-3 i a^{2} x -\frac {i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {i a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{d}-\frac {6 i a^{2} c}{d}-\frac {2 i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{\left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{2} d}+\frac {6 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {a^{2} \cos \left (2 d x +2 c \right )}{4 d}\) | \(125\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {a^{2} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}+\frac {2 a^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{3}}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(147\) |
Input:
int((a+a*sin(d*x+c))^2*tan(d*x+c)^3,x,method=_RETURNVERBOSE)
Output:
a^2/d*(1/2*sin(d*x+c)^2+2*sin(d*x+c)-1/(sin(d*x+c)-1)+3*ln(sin(d*x+c)-1))
Time = 0.09 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.25 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=-\frac {6 \, a^{2} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - 12 \, {\left (a^{2} \sin \left (d x + c\right ) - a^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, a^{2} \cos \left (d x + c\right )^{2} + 7 \, a^{2}\right )} \sin \left (d x + c\right )}{4 \, {\left (d \sin \left (d x + c\right ) - d\right )}} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c)^3,x, algorithm="fricas")
Output:
-1/4*(6*a^2*cos(d*x + c)^2 - 3*a^2 - 12*(a^2*sin(d*x + c) - a^2)*log(-sin( d*x + c) + 1) + (2*a^2*cos(d*x + c)^2 + 7*a^2)*sin(d*x + c))/(d*sin(d*x + c) - d)
\[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=a^{2} \left (\int 2 \sin {\left (c + d x \right )} \tan ^{3}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \tan ^{3}{\left (c + d x \right )}\, dx + \int \tan ^{3}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate((a+a*sin(d*x+c))**2*tan(d*x+c)**3,x)
Output:
a**2*(Integral(2*sin(c + d*x)*tan(c + d*x)**3, x) + Integral(sin(c + d*x)* *2*tan(c + d*x)**3, x) + Integral(tan(c + d*x)**3, x))
Time = 0.03 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.81 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^{2} \sin \left (d x + c\right )^{2} + 6 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + 4 \, a^{2} \sin \left (d x + c\right ) - \frac {2 \, a^{2}}{\sin \left (d x + c\right ) - 1}}{2 \, d} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c)^3,x, algorithm="maxima")
Output:
1/2*(a^2*sin(d*x + c)^2 + 6*a^2*log(sin(d*x + c) - 1) + 4*a^2*sin(d*x + c) - 2*a^2/(sin(d*x + c) - 1))/d
Time = 0.19 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.83 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {1}{2} \, a^{2} {\left (\frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{d} + \frac {d \sin \left (d x + c\right )^{2} + 4 \, d \sin \left (d x + c\right )}{d^{2}} - \frac {2}{d {\left (\sin \left (d x + c\right ) - 1\right )}}\right )} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c)^3,x, algorithm="giac")
Output:
1/2*a^2*(6*log(abs(sin(d*x + c) - 1))/d + (d*sin(d*x + c)^2 + 4*d*sin(d*x + c))/d^2 - 2/(d*(sin(d*x + c) - 1)))
Time = 17.61 (sec) , antiderivative size = 204, normalized size of antiderivative = 2.83 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+6\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}+\frac {6\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{d}-\frac {3\,a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \] Input:
int(tan(c + d*x)^3*(a + a*sin(c + d*x))^2,x)
Output:
(8*a^2*tan(c/2 + (d*x)/2)^3 - 6*a^2*tan(c/2 + (d*x)/2)^2 - 6*a^2*tan(c/2 + (d*x)/2)^4 + 6*a^2*tan(c/2 + (d*x)/2)^5 + 6*a^2*tan(c/2 + (d*x)/2))/(d*(3 *tan(c/2 + (d*x)/2)^2 - 2*tan(c/2 + (d*x)/2) - 4*tan(c/2 + (d*x)/2)^3 + 3* tan(c/2 + (d*x)/2)^4 - 2*tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2)^6 + 1)) + (6*a^2*log(tan(c/2 + (d*x)/2) - 1))/d - (3*a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d
Time = 0.18 (sec) , antiderivative size = 228, normalized size of antiderivative = 3.17 \[ \int (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^{2} \left (-\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) \sin \left (d x +c \right )^{2}+\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )+10 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}-10 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\sin \left (d x +c \right )^{4}+4 \sin \left (d x +c \right )^{3}+\sin \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}-2 \sin \left (d x +c \right )^{2}-6 \sin \left (d x +c \right )-\tan \left (d x +c \right )^{2}\right )}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int((a+a*sin(d*x+c))^2*tan(d*x+c)^3,x)
Output:
(a**2*( - log(tan(c + d*x)**2 + 1)*sin(c + d*x)**2 + log(tan(c + d*x)**2 + 1) - 4*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2 + 4*log(tan((c + d*x) /2)**2 + 1) + 10*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 - 10*log(tan((c + d*x)/2) - 1) - 2*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 + 2*log(tan( (c + d*x)/2) + 1) + sin(c + d*x)**4 + 4*sin(c + d*x)**3 + sin(c + d*x)**2* tan(c + d*x)**2 - 2*sin(c + d*x)**2 - 6*sin(c + d*x) - tan(c + d*x)**2))/( 2*d*(sin(c + d*x)**2 - 1))