Integrand size = 23, antiderivative size = 80 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {(a-b)^2 \cos ^3(e+f x)}{3 f}+\frac {(2 a-3 b) b \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \] Output:
-(a-3*b)*(a-b)*cos(f*x+e)/f+1/3*(a-b)^2*cos(f*x+e)^3/f+(2*a-3*b)*b*sec(f*x +e)/f+1/3*b^2*sec(f*x+e)^3/f
Time = 0.65 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.90 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {\left (-9 a^2+42 a b-33 b^2\right ) \cos (e+f x)+(a-b)^2 \cos (3 (e+f x))+4 b \sec (e+f x) \left (6 a-9 b+b \sec ^2(e+f x)\right )}{12 f} \] Input:
Integrate[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]
Output:
((-9*a^2 + 42*a*b - 33*b^2)*Cos[e + f*x] + (a - b)^2*Cos[3*(e + f*x)] + 4* b*Sec[e + f*x]*(6*a - 9*b + b*Sec[e + f*x]^2))/(12*f)
Time = 0.46 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4147, 25, 355, 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 \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^3 \left (a+b \tan (e+f x)^2\right )^2dx\) |
\(\Big \downarrow \) 4147 |
\(\displaystyle \frac {\int -\cos ^4(e+f x) \left (1-\sec ^2(e+f x)\right ) \left (b \sec ^2(e+f x)+a-b\right )^2d\sec (e+f x)}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \cos ^4(e+f x) \left (1-\sec ^2(e+f x)\right ) \left (b \sec ^2(e+f x)+a-b\right )^2d\sec (e+f x)}{f}\) |
\(\Big \downarrow \) 355 |
\(\displaystyle -\frac {\int \left ((a-b)^2 \cos ^4(e+f x)+(a-3 b) (b-a) \cos ^2(e+f x)-b^2 \sec ^2(e+f x)+b (3 b-2 a)\right )d\sec (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{3} (a-b)^2 \cos ^3(e+f x)-(a-3 b) (a-b) \cos (e+f x)+b (2 a-3 b) \sec (e+f x)+\frac {1}{3} b^2 \sec ^3(e+f x)}{f}\) |
Input:
Int[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]
Output:
(-((a - 3*b)*(a - b)*Cos[e + f*x]) + ((a - b)^2*Cos[e + f*x]^3)/3 + (2*a - 3*b)*b*Sec[e + f*x] + (b^2*Sec[e + f*x]^3)/3)/f
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q _.), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] & & IGtQ[q, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ m) Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 )), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( m - 1)/2]
Leaf count of result is larger than twice the leaf count of optimal. \(154\) vs. \(2(76)=152\).
Time = 6.75 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.94
method | result | size |
derivativedivides | \(\frac {b^{2} \left (\frac {\sin \left (f x +e \right )^{8}}{3 \cos \left (f x +e \right )^{3}}-\frac {5 \sin \left (f x +e \right )^{8}}{3 \cos \left (f x +e \right )}-\frac {5 \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{3}\right )+2 a b \left (\frac {\sin \left (f x +e \right )^{6}}{\cos \left (f x +e \right )}+\left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )\right )-\frac {a^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(155\) |
default | \(\frac {b^{2} \left (\frac {\sin \left (f x +e \right )^{8}}{3 \cos \left (f x +e \right )^{3}}-\frac {5 \sin \left (f x +e \right )^{8}}{3 \cos \left (f x +e \right )}-\frac {5 \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{3}\right )+2 a b \left (\frac {\sin \left (f x +e \right )^{6}}{\cos \left (f x +e \right )}+\left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )\right )-\frac {a^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}}{f}\) | \(155\) |
risch | \(\frac {{\mathrm e}^{3 i \left (f x +e \right )} a^{2}}{24 f}-\frac {{\mathrm e}^{3 i \left (f x +e \right )} a b}{12 f}+\frac {{\mathrm e}^{3 i \left (f x +e \right )} b^{2}}{24 f}-\frac {3 \,{\mathrm e}^{i \left (f x +e \right )} a^{2}}{8 f}+\frac {7 \,{\mathrm e}^{i \left (f x +e \right )} a b}{4 f}-\frac {11 \,{\mathrm e}^{i \left (f x +e \right )} b^{2}}{8 f}-\frac {3 \,{\mathrm e}^{-i \left (f x +e \right )} a^{2}}{8 f}+\frac {7 \,{\mathrm e}^{-i \left (f x +e \right )} a b}{4 f}-\frac {11 \,{\mathrm e}^{-i \left (f x +e \right )} b^{2}}{8 f}+\frac {{\mathrm e}^{-3 i \left (f x +e \right )} a^{2}}{24 f}-\frac {{\mathrm e}^{-3 i \left (f x +e \right )} a b}{12 f}+\frac {{\mathrm e}^{-3 i \left (f x +e \right )} b^{2}}{24 f}-\frac {2 b \,{\mathrm e}^{i \left (f x +e \right )} \left (-6 a \,{\mathrm e}^{4 i \left (f x +e \right )}+9 b \,{\mathrm e}^{4 i \left (f x +e \right )}-12 a \,{\mathrm e}^{2 i \left (f x +e \right )}+14 b \,{\mathrm e}^{2 i \left (f x +e \right )}-6 a +9 b \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}\) | \(313\) |
Input:
int(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
Output:
1/f*(b^2*(1/3*sin(f*x+e)^8/cos(f*x+e)^3-5/3*sin(f*x+e)^8/cos(f*x+e)-5/3*(1 6/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e))+2*a*b*(sin (f*x+e)^6/cos(f*x+e)+(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e))-1/3*a ^2*(2+sin(f*x+e)^2)*cos(f*x+e))
Time = 0.10 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \] Input:
integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")
Output:
1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^6 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e)^4 + 3*(2*a*b - 3*b^2)*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3)
\[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2} \sin ^{3}{\left (e + f x \right )}\, dx \] Input:
integrate(sin(f*x+e)**3*(a+b*tan(f*x+e)**2)**2,x)
Output:
Integral((a + b*tan(e + f*x)**2)**2*sin(e + f*x)**3, x)
Time = 0.03 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right ) + \frac {3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \] Input:
integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")
Output:
1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^3 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e) + (3*(2*a*b - 3*b^2)*cos(f*x + e)^2 + b^2)/cos(f*x + e)^3)/f
Time = 0.84 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.69 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {6 \, a b \cos \left (f x + e\right )^{2} - 9 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac {a^{2} f^{11} \cos \left (f x + e\right )^{3} - 2 \, a b f^{11} \cos \left (f x + e\right )^{3} + b^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 12 \, a b f^{11} \cos \left (f x + e\right ) - 9 \, b^{2} f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \] Input:
integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")
Output:
1/3*(6*a*b*cos(f*x + e)^2 - 9*b^2*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3) + 1/3*(a^2*f^11*cos(f*x + e)^3 - 2*a*b*f^11*cos(f*x + e)^3 + b^2*f^11*cos (f*x + e)^3 - 3*a^2*f^11*cos(f*x + e) + 12*a*b*f^11*cos(f*x + e) - 9*b^2*f ^11*cos(f*x + e))/f^12
Time = 11.62 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.60 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {32\,a\,b+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (64\,a\,b-32\,a^2\right )+12\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (24\,a^2-96\,a\,b+96\,b^2\right )-4\,a^2-32\,b^2}{f\,\left (3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-3\right )} \] Input:
int(sin(e + f*x)^3*(a + b*tan(e + f*x)^2)^2,x)
Output:
-(32*a*b + tan(e/2 + (f*x)/2)^6*(64*a*b - 32*a^2) + 12*a^2*tan(e/2 + (f*x) /2)^8 + tan(e/2 + (f*x)/2)^4*(24*a^2 - 96*a*b + 96*b^2) - 4*a^2 - 32*b^2)/ (f*(9*tan(e/2 + (f*x)/2)^4 - 9*tan(e/2 + (f*x)/2)^8 + 3*tan(e/2 + (f*x)/2) ^12 - 3))
Time = 0.14 (sec) , antiderivative size = 187, normalized size of antiderivative = 2.34 \[ \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8} a^{2}-8 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8} a b +8 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8} b^{2}-6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} a^{2}+24 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} a b -24 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4} b^{2}+8 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a^{2}-16 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a b -3 a^{2}\right )}{3 f \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{12}-3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-1\right )} \] Input:
int(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x)
Output:
(4*tan((e + f*x)/2)**4*(tan((e + f*x)/2)**8*a**2 - 8*tan((e + f*x)/2)**8*a *b + 8*tan((e + f*x)/2)**8*b**2 - 6*tan((e + f*x)/2)**4*a**2 + 24*tan((e + f*x)/2)**4*a*b - 24*tan((e + f*x)/2)**4*b**2 + 8*tan((e + f*x)/2)**2*a**2 - 16*tan((e + f*x)/2)**2*a*b - 3*a**2))/(3*f*(tan((e + f*x)/2)**12 - 3*ta n((e + f*x)/2)**8 + 3*tan((e + f*x)/2)**4 - 1))