Integrand size = 19, antiderivative size = 78 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {(a+b)^2 \log (1-\sin (c+d x))}{2 d}-\frac {(a-b)^2 \log (1+\sin (c+d x))}{2 d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d} \] Output:
-1/2*(a+b)^2*ln(1-sin(d*x+c))/d-1/2*(a-b)^2*ln(1+sin(d*x+c))/d-2*a*b*sin(d *x+c)/d-1/2*b^2*sin(d*x+c)^2/d
Time = 0.06 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.86 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {a^2 \log (1-\sin (c+d x))}{2 d}-\frac {a b \log (1-\sin (c+d x))}{d}-\frac {b^2 \log (1-\sin (c+d x))}{2 d}-\frac {a^2 \log (1+\sin (c+d x))}{2 d}+\frac {a b \log (1+\sin (c+d x))}{d}-\frac {b^2 \log (1+\sin (c+d x))}{2 d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d} \] Input:
Integrate[(a + b*Sin[c + d*x])^2*Tan[c + d*x],x]
Output:
-1/2*(a^2*Log[1 - Sin[c + d*x]])/d - (a*b*Log[1 - Sin[c + d*x]])/d - (b^2* Log[1 - Sin[c + d*x]])/(2*d) - (a^2*Log[1 + Sin[c + d*x]])/(2*d) + (a*b*Lo g[1 + Sin[c + d*x]])/d - (b^2*Log[1 + Sin[c + d*x]])/(2*d) - (2*a*b*Sin[c + d*x])/d - (b^2*Sin[c + d*x]^2)/(2*d)
Time = 0.27 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 3200, 525, 25, 523, 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+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x) (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle \frac {\int \frac {b \sin (c+d x) (a+b \sin (c+d x))^2}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 525 |
\(\displaystyle \frac {-\int -\frac {b \sin (c+d x) \left (a^2+2 b \sin (c+d x) a+b^2\right )}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))-\frac {1}{2} b^2 \sin ^2(c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {b \sin (c+d x) \left (a^2+2 b \sin (c+d x) a+b^2\right )}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))-\frac {1}{2} b^2 \sin ^2(c+d x)}{d}\) |
\(\Big \downarrow \) 523 |
\(\displaystyle \frac {\int \left (\frac {2 a b^2+\left (a^2+b^2\right ) \sin (c+d x) b}{b^2-b^2 \sin ^2(c+d x)}-2 a\right )d(b \sin (c+d x))-\frac {1}{2} b^2 \sin ^2(c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {1}{2} \left (a^2+b^2\right ) \log \left (b^2-b^2 \sin ^2(c+d x)\right )+2 a b \text {arctanh}(\sin (c+d x))-2 a b \sin (c+d x)-\frac {1}{2} b^2 \sin ^2(c+d x)}{d}\) |
Input:
Int[(a + b*Sin[c + d*x])^2*Tan[c + d*x],x]
Output:
(2*a*b*ArcTanh[Sin[c + d*x]] - ((a^2 + b^2)*Log[b^2 - b^2*Sin[c + d*x]^2]) /2 - 2*a*b*Sin[c + d*x] - (b^2*Sin[c + d*x]^2)/2)/d
Int[((x_)^(m_.)*((c_) + (d_.)*(x_)))/((a_) + (b_.)*(x_)^2), x_Symbol] :> In t[ExpandIntegrand[x^m*((c + d*x)/(a + b*x^2)), x], x] /; FreeQ[{a, b, c, d} , x] && IntegerQ[m]
Int[((x_)^(m_.)*((c_) + (d_.)*(x_))^(n_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[d^n*(x^(m + n - 1)/(b*(m + n - 1))), x] + Simp[1/b Int[x^m*(Expan dToSum[b*(c + d*x)^n - b*d^n*x^n - a*d^n*x^(n - 2), x]/(a + b*x^2)), x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 1] && IGtQ[m, -2] && NeQ[m + n - 1, 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)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 0.93 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.88
method | result | size |
derivativedivides | \(\frac {-a^{2} \ln \left (\cos \left (d x +c \right )\right )+2 a b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{2} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(69\) |
default | \(\frac {-a^{2} \ln \left (\cos \left (d x +c \right )\right )+2 a b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{2} \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(69\) |
parts | \(\frac {a^{2} \ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2 d}+\frac {b^{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 b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(78\) |
risch | \(i a^{2} x +i b^{2} x +\frac {i a b \,{\mathrm e}^{i \left (d x +c \right )}}{d}-\frac {i a b \,{\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {2 i a^{2} c}{d}+\frac {2 i b^{2} c}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a b}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a b}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}+\frac {b^{2} \cos \left (2 d x +2 c \right )}{4 d}\) | \(211\) |
Input:
int((a+b*sin(d*x+c))^2*tan(d*x+c),x,method=_RETURNVERBOSE)
Output:
1/d*(-a^2*ln(cos(d*x+c))+2*a*b*(-sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+b^2 *(-1/2*sin(d*x+c)^2-ln(cos(d*x+c))))
Time = 0.16 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.95 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=\frac {b^{2} \cos \left (d x + c\right )^{2} - 4 \, a b \sin \left (d x + c\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \] Input:
integrate((a+b*sin(d*x+c))^2*tan(d*x+c),x, algorithm="fricas")
Output:
1/2*(b^2*cos(d*x + c)^2 - 4*a*b*sin(d*x + c) - (a^2 - 2*a*b + b^2)*log(sin (d*x + c) + 1) - (a^2 + 2*a*b + b^2)*log(-sin(d*x + c) + 1))/d
\[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \tan {\left (c + d x \right )}\, dx \] Input:
integrate((a+b*sin(d*x+c))**2*tan(d*x+c),x)
Output:
Integral((a + b*sin(c + d*x))**2*tan(c + d*x), x)
Time = 0.03 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.90 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {b^{2} \sin \left (d x + c\right )^{2} + 4 \, a b \sin \left (d x + c\right ) + {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{2 \, d} \] Input:
integrate((a+b*sin(d*x+c))^2*tan(d*x+c),x, algorithm="maxima")
Output:
-1/2*(b^2*sin(d*x + c)^2 + 4*a*b*sin(d*x + c) + (a^2 - 2*a*b + b^2)*log(si n(d*x + c) + 1) + (a^2 + 2*a*b + b^2)*log(sin(d*x + c) - 1))/d
Time = 0.12 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.06 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=-\frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{2 \, d} - \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{2 \, d} - \frac {b^{2} d \sin \left (d x + c\right )^{2} + 4 \, a b d \sin \left (d x + c\right )}{2 \, d^{2}} \] Input:
integrate((a+b*sin(d*x+c))^2*tan(d*x+c),x, algorithm="giac")
Output:
-1/2*(a^2 - 2*a*b + b^2)*log(abs(sin(d*x + c) + 1))/d - 1/2*(a^2 + 2*a*b + b^2)*log(abs(sin(d*x + c) - 1))/d - 1/2*(b^2*d*sin(d*x + c)^2 + 4*a*b*d*s in(d*x + c))/d^2
Time = 17.28 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.92 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2+b^2\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (a+b\right )}^2}{d}-\frac {2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,{\left (a-b\right )}^2}{d} \] Input:
int(tan(c + d*x)*(a + b*sin(c + d*x))^2,x)
Output:
(log(tan(c/2 + (d*x)/2)^2 + 1)*(a^2 + b^2))/d - (log(tan(c/2 + (d*x)/2) - 1)*(a + b)^2)/d - (2*b^2*tan(c/2 + (d*x)/2)^2 + 4*a*b*tan(c/2 + (d*x)/2)^3 + 4*a*b*tan(c/2 + (d*x)/2))/(d*(2*tan(c/2 + (d*x)/2)^2 + tan(c/2 + (d*x)/ 2)^4 + 1)) - (log(tan(c/2 + (d*x)/2) + 1)*(a - b)^2)/d
Time = 0.17 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.65 \[ \int (a+b \sin (c+d x))^2 \tan (c+d x) \, dx=\frac {\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right ) a^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) b^{2}-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{2}+4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{2}-\sin \left (d x +c \right )^{2} b^{2}-4 \sin \left (d x +c \right ) a b}{2 d} \] Input:
int((a+b*sin(d*x+c))^2*tan(d*x+c),x)
Output:
(log(tan(c + d*x)**2 + 1)*a**2 + 2*log(tan((c + d*x)/2)**2 + 1)*b**2 - 4*l og(tan((c + d*x)/2) - 1)*a*b - 2*log(tan((c + d*x)/2) - 1)*b**2 + 4*log(ta n((c + d*x)/2) + 1)*a*b - 2*log(tan((c + d*x)/2) + 1)*b**2 - sin(c + d*x)* *2*b**2 - 4*sin(c + d*x)*a*b)/(2*d)