Integrand size = 19, antiderivative size = 52 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {2 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} \] Output:
-2*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
Time = 0.04 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.77 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {a^2 \left (4 \log (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],x]
Output:
-1/2*(a^2*(4*Log[1 - Sin[c + d*x]] + 4*Sin[c + d*x] + Sin[c + d*x]^2))/d
Time = 0.23 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3042, 3186, 86, 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 (c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (a \sin (c+d x)+a)^2dx\) |
\(\Big \downarrow \) 3186 |
\(\displaystyle \frac {\int \frac {a \sin (c+d x) (\sin (c+d x) a+a)}{a-a \sin (c+d x)}d(a \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {\int \left (\frac {2 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 {1}{2} a^2 \sin ^2(c+d x)-2 a^2 \sin (c+d x)-2 a^2 \log (a-a \sin (c+d x))}{d}\) |
Input:
Int[(a + a*Sin[c + d*x])^2*Tan[c + d*x],x]
Output:
(-2*a^2*Log[a - a*Sin[c + d*x]] - 2*a^2*Sin[c + d*x] - (a^2*Sin[c + d*x]^2 )/2)/d
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
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 = 0.87 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.35
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+2 a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(70\) |
default | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+2 a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-a^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(70\) |
parts | \(\frac {a^{2} \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d}+\frac {a^{2} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}+\frac {2 a^{2} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(79\) |
risch | \(2 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 {4 i a^{2} c}{d}-\frac {4 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}\) | \(93\) |
Input:
int((a+a*sin(d*x+c))^2*tan(d*x+c),x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/2*sin(d*x+c)^2-ln(cos(d*x+c)))+2*a^2*(-sin(d*x+c)+ln(sec(d*x+ c)+tan(d*x+c)))-a^2*ln(cos(d*x+c)))
Time = 0.13 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.87 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=\frac {a^{2} \cos \left (d x + c\right )^{2} - 4 \, a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 4 \, a^{2} \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c),x, algorithm="fricas")
Output:
1/2*(a^2*cos(d*x + c)^2 - 4*a^2*log(-sin(d*x + c) + 1) - 4*a^2*sin(d*x + c ))/d
\[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=a^{2} \left (\int 2 \sin {\left (c + d x \right )} \tan {\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \tan {\left (c + d x \right )}\, dx + \int \tan {\left (c + d x \right )}\, dx\right ) \] Input:
integrate((a+a*sin(d*x+c))**2*tan(d*x+c),x)
Output:
a**2*(Integral(2*sin(c + d*x)*tan(c + d*x), x) + Integral(sin(c + d*x)**2* tan(c + d*x), x) + Integral(tan(c + d*x), x))
Time = 0.03 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.83 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {a^{2} \sin \left (d x + c\right )^{2} + 4 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + 4 \, a^{2} \sin \left (d x + c\right )}{2 \, d} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c),x, algorithm="maxima")
Output:
-1/2*(a^2*sin(d*x + c)^2 + 4*a^2*log(sin(d*x + c) - 1) + 4*a^2*sin(d*x + c ))/d
Time = 0.13 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.96 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{d} - \frac {a^{2} d \sin \left (d x + c\right )^{2} + 4 \, a^{2} d \sin \left (d x + c\right )}{2 \, d^{2}} \] Input:
integrate((a+a*sin(d*x+c))^2*tan(d*x+c),x, algorithm="giac")
Output:
-2*a^2*log(abs(sin(d*x + c) - 1))/d - 1/2*(a^2*d*sin(d*x + c)^2 + 4*a^2*d* sin(d*x + c))/d^2
Time = 17.19 (sec) , antiderivative size = 178, normalized size of antiderivative = 3.42 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (4\,a^2\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )-2\,a^2\,\left (4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )+1\right )\right )+4\,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 )}^2+1\right )}^2}-\frac {2\,a^2\,\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{d} \] Input:
int(tan(c + d*x)*(a + a*sin(c + d*x))^2,x)
Output:
- (4*a^2*tan(c/2 + (d*x)/2)^3 - tan(c/2 + (d*x)/2)^2*(4*a^2*(2*log(tan(c/2 + (d*x)/2) - 1) - log(tan(c/2 + (d*x)/2)^2 + 1)) - 2*a^2*(4*log(tan(c/2 + (d*x)/2) - 1) - 2*log(tan(c/2 + (d*x)/2)^2 + 1) + 1)) + 4*a^2*tan(c/2 + ( d*x)/2))/(d*(tan(c/2 + (d*x)/2)^2 + 1)^2) - (2*a^2*(2*log(tan(c/2 + (d*x)/ 2) - 1) - log(tan(c/2 + (d*x)/2)^2 + 1)))/d
Time = 0.17 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.58 \[ \int (a+a \sin (c+d x))^2 \tan (c+d x) \, dx=\frac {a^{2} \left (\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )-6 \,\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}-4 \sin \left (d x +c \right )\right )}{2 d} \] Input:
int((a+a*sin(d*x+c))^2*tan(d*x+c),x)
Output:
(a**2*(log(tan(c + d*x)**2 + 1) + 2*log(tan((c + d*x)/2)**2 + 1) - 6*log(t an((c + d*x)/2) - 1) + 2*log(tan((c + d*x)/2) + 1) - sin(c + d*x)**2 - 4*s in(c + d*x)))/(2*d)