Integrand size = 21, antiderivative size = 157 \[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\frac {\sec (e+f x) (a+a \sin (e+f x))^m}{f (1-m) m}+\frac {2^{-\frac {1}{2}+m} \left (1-m-m^2\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3}{2}-m,\frac {1}{2},\frac {1}{2} (1-\sin (e+f x))\right ) \sec (e+f x) (1+\sin (e+f x))^{\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f (1-m) m}-\frac {\sec (e+f x) (a+a \sin (e+f x))^{1+m}}{a f m} \] Output:
sec(f*x+e)*(a+a*sin(f*x+e))^m/f/(1-m)/m+2^(-1/2+m)*(-m^2-m+1)*hypergeom([- 1/2, 3/2-m],[1/2],1/2-1/2*sin(f*x+e))*sec(f*x+e)*(1+sin(f*x+e))^(1/2-m)*(a +a*sin(f*x+e))^m/f/(1-m)/m-sec(f*x+e)*(a+a*sin(f*x+e))^(1+m)/a/f/m
Leaf count is larger than twice the leaf count of optimal. \(1756\) vs. \(2(157)=314\).
Time = 23.64 (sec) , antiderivative size = 1756, normalized size of antiderivative = 11.18 \[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx =\text {Too large to display} \] Input:
Integrate[(a + a*Sin[e + f*x])^m*Tan[e + f*x]^2,x]
Output:
(Sqrt[Sec[e + f*x]^2]*(a + a*Sin[e + f*x])^m*Tan[e + f*x]^2*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x]^2])^m*(1 + (Sqrt[Sec[e + f*x]^2] + Tan[e + f*x]) ^2)^m*((1 + 2*m)*Hypergeometric2F1[-1 + m, -1/2 + m, 1/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2] - 4*(-1 + 2*m)*Hypergeometric2F1[1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f*x]^2]*Tan[e + f*x] + 2*Tan[e + f*x]^2)))/(2*f*(-1 + 2*m)*(1 + 2*m)*(Se c[e + f*x]^2 + Sqrt[Sec[e + f*x]^2]*Tan[e + f*x])*((m*Sqrt[Sec[e + f*x]^2] *(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x]^2])^m*(1 + (Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2)^(-1 + m)*((1 + 2* m)*Hypergeometric2F1[-1 + m, -1/2 + m, 1/2 + m, -(Sqrt[Sec[e + f*x]^2] + T an[e + f*x])^2] - 4*(-1 + 2*m)*Hypergeometric2F1[1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f*x]^2]*Tan[ e + f*x] + 2*Tan[e + f*x]^2)))/((-1 + 2*m)*(1 + 2*m)) + (Sqrt[Sec[e + f*x] ^2]*Tan[e + f*x]*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x]^2])^m*(1 + (Sqrt[ Sec[e + f*x]^2] + Tan[e + f*x])^2)^m*((1 + 2*m)*Hypergeometric2F1[-1 + m, -1/2 + m, 1/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2] - 4*(-1 + 2*m )*Hypergeometric2F1[1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[ e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f*x]^2]*Tan[e + f*x] + 2*Tan[e + f*x]^2)) )/(2*(-1 + 2*m)*(1 + 2*m)*(Sec[e + f*x]^2 + Sqrt[Sec[e + f*x]^2]*Tan[e + f *x])) + (m*Sqrt[Sec[e + f*x]^2]*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x]...
Time = 0.60 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.03, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3192, 3042, 3339, 3042, 3168, 80, 79}
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(e+f x) (a \sin (e+f x)+a)^m \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^2 (a \sin (e+f x)+a)^mdx\) |
\(\Big \downarrow \) 3192 |
\(\displaystyle \frac {\int \sec ^2(e+f x) (\sin (e+f x) a+a)^m (a (m+1)+a \sin (e+f x))dx}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(\sin (e+f x) a+a)^m (a (m+1)+a \sin (e+f x))}{\cos (e+f x)^2}dx}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 3339 |
\(\displaystyle \frac {\frac {a \left (-m^2-m+1\right ) \int \sec ^2(e+f x) (\sin (e+f x) a+a)^mdx}{1-m}+\frac {a \sec (e+f x) (a \sin (e+f x)+a)^m}{f (1-m)}}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a \left (-m^2-m+1\right ) \int \frac {(\sin (e+f x) a+a)^m}{\cos (e+f x)^2}dx}{1-m}+\frac {a \sec (e+f x) (a \sin (e+f x)+a)^m}{f (1-m)}}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 3168 |
\(\displaystyle \frac {\frac {a^3 \left (-m^2-m+1\right ) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {a \sin (e+f x)+a} \int \frac {(\sin (e+f x) a+a)^{m-\frac {3}{2}}}{(a-a \sin (e+f x))^{3/2}}d\sin (e+f x)}{f (1-m)}+\frac {a \sec (e+f x) (a \sin (e+f x)+a)^m}{f (1-m)}}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {\frac {a^2 2^{m-\frac {3}{2}} \left (-m^2-m+1\right ) \sec (e+f x) \sqrt {a-a \sin (e+f x)} (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^m \int \frac {\left (\frac {1}{2} \sin (e+f x)+\frac {1}{2}\right )^{m-\frac {3}{2}}}{(a-a \sin (e+f x))^{3/2}}d\sin (e+f x)}{f (1-m)}+\frac {a \sec (e+f x) (a \sin (e+f x)+a)^m}{f (1-m)}}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle \frac {\frac {a 2^{m-\frac {1}{2}} \left (-m^2-m+1\right ) \sec (e+f x) (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^m \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3}{2}-m,\frac {1}{2},\frac {1}{2} (1-\sin (e+f x))\right )}{f (1-m)}+\frac {a \sec (e+f x) (a \sin (e+f x)+a)^m}{f (1-m)}}{a m}-\frac {\sec (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f m}\) |
Input:
Int[(a + a*Sin[e + f*x])^m*Tan[e + f*x]^2,x]
Output:
-((Sec[e + f*x]*(a + a*Sin[e + f*x])^(1 + m))/(a*f*m)) + ((a*Sec[e + f*x]* (a + a*Sin[e + f*x])^m)/(f*(1 - m)) + (2^(-1/2 + m)*a*(1 - m - m^2)*Hyperg eometric2F1[-1/2, 3/2 - m, 1/2, (1 - Sin[e + f*x])/2]*Sec[e + f*x]*(1 + Si n[e + f*x])^(1/2 - m)*(a + a*Sin[e + f*x])^m)/(f*(1 - m)))/(a*m)
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.), x_Symbol] :> Simp[a^2*((g*Cos[e + f*x])^(p + 1)/(f*g*(a + b*Sin [e + f*x])^((p + 1)/2)*(a - b*Sin[e + f*x])^((p + 1)/2))) Subst[Int[(a + b*x)^(m + (p - 1)/2)*(a - b*x)^((p - 1)/2), x], x, Sin[e + f*x]], x] /; Fre eQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[-(a + b*Sin[e + f*x])^(m + 1)/(b*f*m*Cos[e + f*x]), x] + Simp[1/(b*m) Int[(a + b*Sin[e + f*x])^m*((b*(m + 1) + a*Sin[e + f*x])/Cos [e + f*x]^2), x], x] /; FreeQ[{a, b, e, f, m}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && !LtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && NeQ[m + p + 1, 0]
\[\int \left (a +\sin \left (f x +e \right ) a \right )^{m} \tan \left (f x +e \right )^{2}d x\]
Input:
int((a+sin(f*x+e)*a)^m*tan(f*x+e)^2,x)
Output:
int((a+sin(f*x+e)*a)^m*tan(f*x+e)^2,x)
\[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{2} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^2,x, algorithm="fricas")
Output:
integral((a*sin(f*x + e) + a)^m*tan(f*x + e)^2, x)
\[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \tan ^{2}{\left (e + f x \right )}\, dx \] Input:
integrate((a+a*sin(f*x+e))**m*tan(f*x+e)**2,x)
Output:
Integral((a*(sin(e + f*x) + 1))**m*tan(e + f*x)**2, x)
\[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{2} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^2,x, algorithm="maxima")
Output:
integrate((a*sin(f*x + e) + a)^m*tan(f*x + e)^2, x)
\[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{2} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^2,x, algorithm="giac")
Output:
integrate((a*sin(f*x + e) + a)^m*tan(f*x + e)^2, x)
Timed out. \[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int {\mathrm {tan}\left (e+f\,x\right )}^2\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \] Input:
int(tan(e + f*x)^2*(a + a*sin(e + f*x))^m,x)
Output:
int(tan(e + f*x)^2*(a + a*sin(e + f*x))^m, x)
\[ \int (a+a \sin (e+f x))^m \tan ^2(e+f x) \, dx=\int \left (a +a \sin \left (f x +e \right )\right )^{m} \tan \left (f x +e \right )^{2}d x \] Input:
int((a+a*sin(f*x+e))^m*tan(f*x+e)^2,x)
Output:
int((sin(e + f*x)*a + a)**m*tan(e + f*x)**2,x)