\(\int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx\) [129]

Optimal result
Mathematica [F]
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 111 \[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\frac {\operatorname {AppellF1}\left (1+p,\frac {1+p}{2},\frac {1}{2} (1-2 m+p),2+p,\sin (e+f x),-\sin (e+f x)\right ) (1-\sin (e+f x))^{\frac {1+p}{2}} (1+\sin (e+f x))^{\frac {1}{2} (1-2 m+p)} (a+a \sin (e+f x))^m (g \tan (e+f x))^{1+p}}{f g (1+p)} \] Output:

AppellF1(p+1,1/2-m+1/2*p,1/2*p+1/2,2+p,-sin(f*x+e),sin(f*x+e))*(1-sin(f*x+ 
e))^(1/2*p+1/2)*(1+sin(f*x+e))^(1/2-m+1/2*p)*(a+a*sin(f*x+e))^m*(g*tan(f*x 
+e))^(p+1)/f/g/(p+1)
 

Mathematica [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx \] Input:

Integrate[(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^p,x]
 

Output:

Integrate[(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^p, x]
 

Rubi [A] (verified)

Time = 0.39 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.41, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 3199, 152, 152, 150}

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 (a \sin (e+f x)+a)^m (g \tan (e+f x))^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x)+a)^m (g \tan (e+f x))^pdx\)

\(\Big \downarrow \) 3199

\(\displaystyle \frac {(a \sin (e+f x))^{-p-1} (a-a \sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x)+a)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \int (a \sin (e+f x))^p (a-a \sin (e+f x))^{\frac {1}{2} (-p-1)} (\sin (e+f x) a+a)^{m+\frac {1}{2} (-p-1)}d(a \sin (e+f x))}{f g}\)

\(\Big \downarrow \) 152

\(\displaystyle \frac {(1-\sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x))^{-p-1} (a-a \sin (e+f x))^{\frac {1}{2} (-p-1)+\frac {p+1}{2}} (a \sin (e+f x)+a)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \int (1-\sin (e+f x))^{\frac {1}{2} (-p-1)} (a \sin (e+f x))^p (\sin (e+f x) a+a)^{m+\frac {1}{2} (-p-1)}d(a \sin (e+f x))}{f g}\)

\(\Big \downarrow \) 152

\(\displaystyle \frac {(1-\sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x))^{-p-1} (a-a \sin (e+f x))^{\frac {1}{2} (-p-1)+\frac {p+1}{2}} (g \tan (e+f x))^{p+1} (\sin (e+f x)+1)^{\frac {1}{2} (-2 m+p+1)} (a \sin (e+f x)+a)^{m-\frac {p}{2}+\frac {p+1}{2}-\frac {1}{2}} \int (1-\sin (e+f x))^{\frac {1}{2} (-p-1)} (a \sin (e+f x))^p (\sin (e+f x)+1)^{m+\frac {1}{2} (-p-1)}d(a \sin (e+f x))}{f g}\)

\(\Big \downarrow \) 150

\(\displaystyle \frac {(1-\sin (e+f x))^{\frac {p+1}{2}} (a-a \sin (e+f x))^{\frac {1}{2} (-p-1)+\frac {p+1}{2}} (g \tan (e+f x))^{p+1} (\sin (e+f x)+1)^{\frac {1}{2} (-2 m+p+1)} (a \sin (e+f x)+a)^{m-\frac {p}{2}+\frac {p+1}{2}-\frac {1}{2}} \operatorname {AppellF1}\left (p+1,\frac {p+1}{2},\frac {1}{2} (-2 m+p+1),p+2,\sin (e+f x),-\sin (e+f x)\right )}{f g (p+1)}\)

Input:

Int[(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^p,x]
 

Output:

(AppellF1[1 + p, (1 + p)/2, (1 - 2*m + p)/2, 2 + p, Sin[e + f*x], -Sin[e + 
 f*x]]*(1 - Sin[e + f*x])^((1 + p)/2)*(1 + Sin[e + f*x])^((1 - 2*m + p)/2) 
*(a - a*Sin[e + f*x])^((-1 - p)/2 + (1 + p)/2)*(a + a*Sin[e + f*x])^(-1/2 
+ m - p/2 + (1 + p)/2)*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p))
 

Defintions of rubi rules used

rule 150
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ 
] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 
, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] &&  !In 
tegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
 

rule 152
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ 
] :> Simp[c^IntPart[n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) 
Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3199
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x 
_)])^(p_), x_Symbol] :> Simp[(g*Tan[e + f*x])^(p + 1)*(a - b*Sin[e + f*x])^ 
((p + 1)/2)*((a + b*Sin[e + f*x])^((p + 1)/2)/(f*g*(b*Sin[e + f*x])^(p + 1) 
))   Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] & 
&  !IntegerQ[m] &&  !IntegerQ[p]
 
Maple [F]

\[\int \left (a +\sin \left (f x +e \right ) a \right )^{m} \left (g \tan \left (f x +e \right )\right )^{p}d x\]

Input:

int((a+sin(f*x+e)*a)^m*(g*tan(f*x+e))^p,x)
 

Output:

int((a+sin(f*x+e)*a)^m*(g*tan(f*x+e))^p,x)
 

Fricas [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \] Input:

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="fricas")
 

Output:

integral((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)
 

Sympy [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (g \tan {\left (e + f x \right )}\right )^{p}\, dx \] Input:

integrate((a+a*sin(f*x+e))**m*(g*tan(f*x+e))**p,x)
 

Output:

Integral((a*(sin(e + f*x) + 1))**m*(g*tan(e + f*x))**p, x)
 

Maxima [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \] Input:

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="maxima")
 

Output:

integrate((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)
 

Giac [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \] Input:

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="giac")
 

Output:

integrate((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)
 

Mupad [F(-1)]

Timed out. \[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=\int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \] Input:

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x))^m,x)
 

Output:

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x))^m, x)
 

Reduce [F]

\[ \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx=g^{p} \left (\int \tan \left (f x +e \right )^{p} \left (a +a \sin \left (f x +e \right )\right )^{m}d x \right ) \] Input:

int((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x)
 

Output:

g**p*int(tan(e + f*x)**p*(sin(e + f*x)*a + a)**m,x)