Integrand size = 21, antiderivative size = 70 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {(4 a-b) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {(4 a-b) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec ^3(c+d x) \tan (c+d x)}{4 d} \] Output:
1/8*(4*a-b)*arctanh(sin(d*x+c))/d+1/8*(4*a-b)*sec(d*x+c)*tan(d*x+c)/d+1/4* b*sec(d*x+c)^3*tan(d*x+c)/d
Time = 0.03 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.33 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {a \text {arctanh}(\sin (c+d x))}{2 d}-\frac {b \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d}-\frac {b \sec (c+d x) \tan (c+d x)}{8 d}+\frac {b \sec ^3(c+d x) \tan (c+d x)}{4 d} \] Input:
Integrate[Sec[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]
Output:
(a*ArcTanh[Sin[c + d*x]])/(2*d) - (b*ArcTanh[Sin[c + d*x]])/(8*d) + (a*Sec [c + d*x]*Tan[c + d*x])/(2*d) - (b*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*S ec[c + d*x]^3*Tan[c + d*x])/(4*d)
Time = 0.24 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4159, 298, 215, 219}
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 \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sec (c+d x)^3 \left (a+b \tan (c+d x)^2\right )dx\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \frac {\int \frac {a-(a-b) \sin ^2(c+d x)}{\left (1-\sin ^2(c+d x)\right )^3}d\sin (c+d x)}{d}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \frac {\frac {1}{4} (4 a-b) \int \frac {1}{\left (1-\sin ^2(c+d x)\right )^2}d\sin (c+d x)+\frac {b \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}}{d}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {1}{4} (4 a-b) \left (\frac {1}{2} \int \frac {1}{1-\sin ^2(c+d x)}d\sin (c+d x)+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {b \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {1}{4} (4 a-b) \left (\frac {1}{2} \text {arctanh}(\sin (c+d x))+\frac {\sin (c+d x)}{2 \left (1-\sin ^2(c+d x)\right )}\right )+\frac {b \sin (c+d x)}{4 \left (1-\sin ^2(c+d x)\right )^2}}{d}\) |
Input:
Int[Sec[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]
Output:
((b*Sin[c + d*x])/(4*(1 - Sin[c + d*x]^2)^2) + ((4*a - b)*(ArcTanh[Sin[c + d*x]]/2 + Sin[c + d*x]/(2*(1 - Sin[c + d*x]^2))))/4)/d
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 *x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 3.02 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.46
method | result | size |
derivativedivides | \(\frac {b \left (\frac {\sin \left (d x +c \right )^{3}}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin \left (d x +c \right )^{3}}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(102\) |
default | \(\frac {b \left (\frac {\sin \left (d x +c \right )^{3}}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin \left (d x +c \right )^{3}}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(102\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (4 a \,{\mathrm e}^{6 i \left (d x +c \right )}-b \,{\mathrm e}^{6 i \left (d x +c \right )}+4 a \,{\mathrm e}^{4 i \left (d x +c \right )}+7 b \,{\mathrm e}^{4 i \left (d x +c \right )}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}-7 b \,{\mathrm e}^{2 i \left (d x +c \right )}-4 a +b \right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a}{2 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}\) | \(197\) |
Input:
int(sec(d*x+c)^3*(a+b*tan(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
1/d*(b*(1/4*sin(d*x+c)^3/cos(d*x+c)^4+1/8*sin(d*x+c)^3/cos(d*x+c)^2+1/8*si n(d*x+c)-1/8*ln(sec(d*x+c)+tan(d*x+c)))+a*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*l n(sec(d*x+c)+tan(d*x+c))))
Time = 0.12 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.36 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {{\left (4 \, a - b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (4 \, a - b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left ({\left (4 \, a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, b\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \] Input:
integrate(sec(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="fricas")
Output:
1/16*((4*a - b)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - (4*a - b)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*((4*a - b)*cos(d*x + c)^2 + 2*b)*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\int \left (a + b \tan ^{2}{\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \] Input:
integrate(sec(d*x+c)**3*(a+b*tan(d*x+c)**2),x)
Output:
Integral((a + b*tan(c + d*x)**2)*sec(c + d*x)**3, x)
Time = 0.03 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.36 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {{\left (4 \, a - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (4 \, a - b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left ({\left (4 \, a - b\right )} \sin \left (d x + c\right )^{3} - {\left (4 \, a + b\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \] Input:
integrate(sec(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="maxima")
Output:
1/16*((4*a - b)*log(sin(d*x + c) + 1) - (4*a - b)*log(sin(d*x + c) - 1) - 2*((4*a - b)*sin(d*x + c)^3 - (4*a + b)*sin(d*x + c))/(sin(d*x + c)^4 - 2* sin(d*x + c)^2 + 1))/d
Time = 0.28 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.40 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {{\left (4 \, a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (4 \, a - b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (4 \, a \sin \left (d x + c\right )^{3} - b \sin \left (d x + c\right )^{3} - 4 \, a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \] Input:
integrate(sec(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="giac")
Output:
1/16*((4*a - b)*log(abs(sin(d*x + c) + 1)) - (4*a - b)*log(abs(sin(d*x + c ) - 1)) - 2*(4*a*sin(d*x + c)^3 - b*sin(d*x + c)^3 - 4*a*sin(d*x + c) - b* sin(d*x + c))/(sin(d*x + c)^2 - 1)^2)/d
Time = 10.83 (sec) , antiderivative size = 147, normalized size of antiderivative = 2.10 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {\left (a+\frac {b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {7\,b}{4}-a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {7\,b}{4}-a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (a+\frac {b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a-\frac {b}{4}\right )}{d} \] Input:
int((a + b*tan(c + d*x)^2)/cos(c + d*x)^3,x)
Output:
(tan(c/2 + (d*x)/2)^7*(a + b/4) - tan(c/2 + (d*x)/2)^3*(a - (7*b)/4) - tan (c/2 + (d*x)/2)^5*(a - (7*b)/4) + tan(c/2 + (d*x)/2)*(a + b/4))/(d*(6*tan( c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c /2 + (d*x)/2)^8 + 1)) + (atanh(tan(c/2 + (d*x)/2))*(a - b/4))/d
Time = 0.21 (sec) , antiderivative size = 308, normalized size of antiderivative = 4.40 \[ \int \sec ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx=\frac {-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4} a +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4} b +8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b -4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4} a -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4} b -8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a -\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b -4 \sin \left (d x +c \right )^{3} a +\sin \left (d x +c \right )^{3} b +4 \sin \left (d x +c \right ) a +\sin \left (d x +c \right ) b}{8 d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{2}+1\right )} \] Input:
int(sec(d*x+c)^3*(a+b*tan(d*x+c)^2),x)
Output:
( - 4*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a + log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*b + 8*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a - 2* log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b - 4*log(tan((c + d*x)/2) - 1)* a + log(tan((c + d*x)/2) - 1)*b + 4*log(tan((c + d*x)/2) + 1)*sin(c + d*x) **4*a - log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4*b - 8*log(tan((c + d*x)/ 2) + 1)*sin(c + d*x)**2*a + 2*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b + 4*log(tan((c + d*x)/2) + 1)*a - log(tan((c + d*x)/2) + 1)*b - 4*sin(c + d*x)**3*a + sin(c + d*x)**3*b + 4*sin(c + d*x)*a + sin(c + d*x)*b)/(8*d*(s in(c + d*x)**4 - 2*sin(c + d*x)**2 + 1))