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

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 = 21, antiderivative size = 129 \[ \int (a+a \sin (e+f x)) (g \tan (e+f x))^p \, dx=\frac {a \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {a \cos ^2(e+f x)^{\frac {1+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+p}{2},\frac {2+p}{2},\frac {4+p}{2},\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)} \] Output:

a*hypergeom([1, 1/2*p+1/2],[3/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(p+1) 
/f/g/(p+1)+a*(cos(f*x+e)^2)^(1/2*p+1/2)*hypergeom([1+1/2*p, 1/2*p+1/2],[2+ 
1/2*p],sin(f*x+e)^2)*sin(f*x+e)*(g*tan(f*x+e))^(p+1)/f/g/(2+p)
 

Mathematica [F]

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

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

Output:

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

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3189, 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 (a \sin (e+f x)+a) (g \tan (e+f x))^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3189

\(\displaystyle \int \left (a (g \tan (e+f x))^p+a \sin (e+f x) (g \tan (e+f x))^p\right )dx\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(a*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + 
f*x])^(1 + p))/(f*g*(1 + p)) + (a*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeomet 
ric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x]*(g*Ta 
n[e + f*x])^(1 + p))/(f*g*(2 + p))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 3189
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( 
x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si 
n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] 
&& IGtQ[m, 0]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int (a+a \sin (e+f x)) (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 ) \,d x \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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