Integrand size = 27, antiderivative size = 45 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \sec (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}+\frac {a \tan ^3(c+d x)}{3 d} \] Output:
-a*sec(d*x+c)/d+1/3*a*sec(d*x+c)^3/d+1/3*a*tan(d*x+c)^3/d
Time = 0.03 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \sec (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}+\frac {a \tan ^3(c+d x)}{3 d} \] Input:
Integrate[Sec[c + d*x]^2*(a + a*Sin[c + d*x])*Tan[c + d*x]^2,x]
Output:
-((a*Sec[c + d*x])/d) + (a*Sec[c + d*x]^3)/(3*d) + (a*Tan[c + d*x]^3)/(3*d )
Time = 0.39 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3042, 3317, 3042, 3086, 2009, 3087, 15}
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 ^2(c+d x) \sec ^2(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^2 (a \sin (c+d x)+a)}{\cos (c+d x)^4}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \sec ^2(c+d x) \tan ^2(c+d x)dx+a \int \sec (c+d x) \tan ^3(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sec (c+d x)^2 \tan (c+d x)^2dx+a \int \sec (c+d x) \tan (c+d x)^3dx\) |
\(\Big \downarrow \) 3086 |
\(\displaystyle \frac {a \int \left (\sec ^2(c+d x)-1\right )d\sec (c+d x)}{d}+a \int \sec (c+d x)^2 \tan (c+d x)^2dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a \int \sec (c+d x)^2 \tan (c+d x)^2dx+\frac {a \left (\frac {1}{3} \sec ^3(c+d x)-\sec (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle \frac {a \int \tan ^2(c+d x)d\tan (c+d x)}{d}+\frac {a \left (\frac {1}{3} \sec ^3(c+d x)-\sec (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \frac {a \tan ^3(c+d x)}{3 d}+\frac {a \left (\frac {1}{3} \sec ^3(c+d x)-\sec (c+d x)\right )}{d}\) |
Input:
Int[Sec[c + d*x]^2*(a + a*Sin[c + d*x])*Tan[c + d*x]^2,x]
Output:
(a*(-Sec[c + d*x] + Sec[c + d*x]^3/3))/d + (a*Tan[c + d*x]^3)/(3*d)
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_.), x_Symbol] :> Simp[a/f Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 ), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 ] && !(IntegerQ[m/2] && LtQ[0, m, n + 1])
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> Simp[1/f Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] && !(IntegerQ[(n - 1) /2] && LtQ[0, n, m - 1])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Result contains complex when optimal does not.
Time = 0.54 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.69
method | result | size |
risch | \(-\frac {2 \left (-3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}-a \,{\mathrm e}^{i \left (d x +c \right )}+3 a \,{\mathrm e}^{3 i \left (d x +c \right )}-i a \right )}{3 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) d}\) | \(76\) |
derivativedivides | \(\frac {a \left (\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}\right )+\frac {a \sin \left (d x +c \right )^{3}}{3 \cos \left (d x +c \right )^{3}}}{d}\) | \(82\) |
default | \(\frac {a \left (\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin \left (d x +c \right )^{4}}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}\right )+\frac {a \sin \left (d x +c \right )^{3}}{3 \cos \left (d x +c \right )^{3}}}{d}\) | \(82\) |
Input:
int(sec(d*x+c)^2*(a+a*sin(d*x+c))*tan(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-2/3*(-3*I*a*exp(2*I*(d*x+c))-a*exp(I*(d*x+c))+3*a*exp(3*I*(d*x+c))-I*a)/( exp(I*(d*x+c))-I)^3/(exp(I*(d*x+c))+I)/d
Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.09 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=\frac {a \cos \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right ) + a}{3 \, {\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))*tan(d*x+c)^2,x, algorithm="fricas" )
Output:
1/3*(a*cos(d*x + c)^2 - 2*a*sin(d*x + c) + a)/(d*cos(d*x + c)*sin(d*x + c) - d*cos(d*x + c))
\[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=a \left (\int \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(sec(d*x+c)**2*(a+a*sin(d*x+c))*tan(d*x+c)**2,x)
Output:
a*(Integral(tan(c + d*x)**2*sec(c + d*x)**2, x) + Integral(sin(c + d*x)*ta n(c + d*x)**2*sec(c + d*x)**2, x))
Time = 0.03 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.87 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=\frac {a \tan \left (d x + c\right )^{3} - \frac {{\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a}{\cos \left (d x + c\right )^{3}}}{3 \, d} \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))*tan(d*x+c)^2,x, algorithm="maxima" )
Output:
1/3*(a*tan(d*x + c)^3 - (3*cos(d*x + c)^2 - 1)*a/cos(d*x + c)^3)/d
Time = 0.32 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.49 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {\frac {3 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1} - \frac {3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \] Input:
integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))*tan(d*x+c)^2,x, algorithm="giac")
Output:
-1/6*(3*a/(tan(1/2*d*x + 1/2*c) + 1) - (3*a*tan(1/2*d*x + 1/2*c)^2 - 12*a* tan(1/2*d*x + 1/2*c) + 5*a)/(tan(1/2*d*x + 1/2*c) - 1)^3)/d
Time = 31.46 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.64 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {4\,a\,\left ({\sin \left (c+d\,x\right )}^2+2\,\sin \left (c+d\,x\right )+4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\sin \left (2\,c+2\,d\,x\right )-4\right )}{3\,d\,\left (8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\sin \left (2\,c+2\,d\,x\right )-4\right )} \] Input:
int((tan(c + d*x)^2*(a + a*sin(c + d*x)))/cos(c + d*x)^2,x)
Output:
-(4*a*(2*sin(c + d*x) + sin(2*c + 2*d*x) + 4*sin(c/2 + (d*x)/2)^2 + sin(c + d*x)^2 - 4))/(3*d*(2*sin(2*c + 2*d*x) + 8*sin(c/2 + (d*x)/2)^2 - 4))
Time = 0.19 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.29 \[ \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^2(c+d x) \, dx=\frac {4 a \left (-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{3 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(sec(d*x+c)^2*(a+a*sin(d*x+c))*tan(d*x+c)^2,x)
Output:
(4*a*( - 2*tan((c + d*x)/2) + 1))/(3*d*(tan((c + d*x)/2)**4 - 2*tan((c + d *x)/2)**3 + 2*tan((c + d*x)/2) - 1))