Integrand size = 19, antiderivative size = 46 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a x}{2}-\frac {b \log (\cos (c+d x))}{d}+\frac {\cos ^2(c+d x) (b-a \tan (c+d x))}{2 d} \] Output:
1/2*a*x-b*ln(cos(d*x+c))/d+1/2*cos(d*x+c)^2*(b-a*tan(d*x+c))/d
Time = 0.06 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.22 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a (c+d x)}{2 d}-\frac {b \left (-\frac {1}{2} \cos ^2(c+d x)+\log (\cos (c+d x))\right )}{d}-\frac {a \sin (2 (c+d x))}{4 d} \] Input:
Integrate[Sin[c + d*x]^2*(a + b*Tan[c + d*x]),x]
Output:
(a*(c + d*x))/(2*d) - (b*(-1/2*Cos[c + d*x]^2 + Log[Cos[c + d*x]]))/d - (a *Sin[2*(c + d*x)])/(4*d)
Time = 0.27 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.28, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 4889, 530, 25, 452, 216, 240}
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 ^2(c+d x) (a+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x)^2 (a+b \tan (c+d x))dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \frac {\int \frac {\tan ^2(c+d x) (a+b \tan (c+d x))}{\left (\tan ^2(c+d x)+1\right )^2}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 530 |
\(\displaystyle \frac {\frac {b-a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}-\frac {1}{2} \int -\frac {a+2 b \tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{2} \int \frac {a+2 b \tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)+\frac {b-a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}}{d}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle \frac {\frac {1}{2} \left (a \int \frac {1}{\tan ^2(c+d x)+1}d\tan (c+d x)+2 b \int \frac {\tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)\right )+\frac {b-a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {1}{2} \left (2 b \int \frac {\tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)+a \arctan (\tan (c+d x))\right )+\frac {b-a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}}{d}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle \frac {\frac {1}{2} \left (a \arctan (\tan (c+d x))+b \log \left (\tan ^2(c+d x)+1\right )\right )+\frac {b-a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}}{d}\) |
Input:
Int[Sin[c + d*x]^2*(a + b*Tan[c + d*x]),x]
Output:
((a*ArcTan[Tan[c + d*x]] + b*Log[1 + Tan[c + d*x]^2])/2 + (b - a*Tan[c + d *x])/(2*(1 + Tan[c + d*x]^2)))/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb ol] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Co eff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Po lynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x )*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Qx + e*(2*p + 3), x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && EqQ[n, 1] && IntegerQ[2*p]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Time = 0.91 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.13
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(52\) |
default | \(\frac {a \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(52\) |
risch | \(i b x +\frac {a x}{2}+\frac {{\mathrm e}^{2 i \left (d x +c \right )} b}{8 d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a}{8 d}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} b}{8 d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a}{8 d}+\frac {2 i b c}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(99\) |
Input:
int(sin(d*x+c)^2*(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*(-1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+b*(-1/2*sin(d*x+c)^2-ln( cos(d*x+c))))
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.02 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a d x + b \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, b \log \left (-\cos \left (d x + c\right )\right )}{2 \, d} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="fricas")
Output:
1/2*(a*d*x + b*cos(d*x + c)^2 - a*cos(d*x + c)*sin(d*x + c) - 2*b*log(-cos (d*x + c)))/d
\[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right ) \sin ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(sin(d*x+c)**2*(a+b*tan(d*x+c)),x)
Output:
Integral((a + b*tan(c + d*x))*sin(c + d*x)**2, x)
Time = 0.13 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.13 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {{\left (d x + c\right )} a + b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {a \tan \left (d x + c\right ) - b}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="maxima")
Output:
1/2*((d*x + c)*a + b*log(tan(d*x + c)^2 + 1) - (a*tan(d*x + c) - b)/(tan(d *x + c)^2 + 1))/d
Time = 0.14 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.26 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {{\left (d x + c\right )} a}{2 \, d} + \frac {b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} - \frac {a \tan \left (d x + c\right ) - b}{2 \, {\left (\tan \left (d x + c\right )^{2} + 1\right )} d} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c)),x, algorithm="giac")
Output:
1/2*(d*x + c)*a/d + 1/2*b*log(tan(d*x + c)^2 + 1)/d - 1/2*(a*tan(d*x + c) - b)/((tan(d*x + c)^2 + 1)*d)
Time = 0.81 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.09 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {\frac {b\,{\cos \left (c+d\,x\right )}^2}{2}-\frac {a\,\sin \left (c+d\,x\right )\,\cos \left (c+d\,x\right )}{2}+\frac {b\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2}+\frac {a\,d\,x}{2}}{d} \] Input:
int(sin(c + d*x)^2*(a + b*tan(c + d*x)),x)
Output:
((b*log(tan(c + d*x)^2 + 1))/2 + (b*cos(c + d*x)^2)/2 - (a*cos(c + d*x)*si n(c + d*x))/2 + (a*d*x)/2)/d
Time = 0.20 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.87 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x)) \, dx=\frac {-\cos \left (d x +c \right ) \sin \left (d x +c \right ) a +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) b -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b -\sin \left (d x +c \right )^{2} b +a c +a d x}{2 d} \] Input:
int(sin(d*x+c)^2*(a+b*tan(d*x+c)),x)
Output:
( - cos(c + d*x)*sin(c + d*x)*a + 2*log(tan((c + d*x)/2)**2 + 1)*b - 2*log (tan((c + d*x)/2) - 1)*b - 2*log(tan((c + d*x)/2) + 1)*b - sin(c + d*x)**2 *b + a*c + a*d*x)/(2*d)