\(\int (e+f x)^m (a+b \arctan (c+d x)) \, dx\) [49]

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

Optimal result

Integrand size = 18, antiderivative size = 177 \[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\frac {(e+f x)^{1+m} (a+b \arctan (c+d x))}{f (1+m)}-\frac {i b d (e+f x)^{2+m} \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,\frac {d (e+f x)}{d e+(i-c) f}\right )}{2 f (d e+(i-c) f) (1+m) (2+m)}+\frac {i b d (e+f x)^{2+m} \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,\frac {d (e+f x)}{d e-(i+c) f}\right )}{2 f (d e-(i+c) f) (1+m) (2+m)} \] Output:

(f*x+e)^(1+m)*(a+b*arctan(d*x+c))/f/(1+m)-1/2*I*b*d*(f*x+e)^(2+m)*hypergeo 
m([1, 2+m],[3+m],d*(f*x+e)/(d*e+(I-c)*f))/f/(d*e+(I-c)*f)/(1+m)/(2+m)+1/2* 
I*b*d*(f*x+e)^(2+m)*hypergeom([1, 2+m],[3+m],d*(f*x+e)/(d*e-(I+c)*f))/f/(d 
*e-(I+c)*f)/(1+m)/(2+m)
 

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.92 \[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\frac {(e+f x)^{1+m} \left (2 (a+b \arctan (c+d x))+\frac {b d (e+f x) \left ((d e-(i+c) f) \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,\frac {d (e+f x)}{d e-(-i+c) f}\right )+(-d e+(-i+c) f) \operatorname {Hypergeometric2F1}\left (1,2+m,3+m,\frac {d (e+f x)}{d e-(i+c) f}\right )\right )}{(i d e+f-i c f) (d e-(-i+c) f) (2+m)}\right )}{2 f (1+m)} \] Input:

Integrate[(e + f*x)^m*(a + b*ArcTan[c + d*x]),x]
 

Output:

((e + f*x)^(1 + m)*(2*(a + b*ArcTan[c + d*x]) + (b*d*(e + f*x)*((d*e - (I 
+ c)*f)*Hypergeometric2F1[1, 2 + m, 3 + m, (d*(e + f*x))/(d*e - (-I + c)*f 
)] + (-(d*e) + (-I + c)*f)*Hypergeometric2F1[1, 2 + m, 3 + m, (d*(e + f*x) 
)/(d*e - (I + c)*f)]))/((I*d*e + f - I*c*f)*(d*e - (-I + c)*f)*(2 + m))))/ 
(2*f*(1 + m))
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.34, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {5570, 5387, 485, 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 (e+f x)^m (a+b \arctan (c+d x)) \, dx\)

\(\Big \downarrow \) 5570

\(\displaystyle \frac {\int \left (e-\frac {c f}{d}+\frac {f (c+d x)}{d}\right )^m (a+b \arctan (c+d x))d(c+d x)}{d}\)

\(\Big \downarrow \) 5387

\(\displaystyle \frac {\frac {d (a+b \arctan (c+d x)) \left (\frac {f (c+d x)}{d}-\frac {c f}{d}+e\right )^{m+1}}{f (m+1)}-\frac {b d \int \frac {\left (e-\frac {c f}{d}+\frac {f (c+d x)}{d}\right )^{m+1}}{(c+d x)^2+1}d(c+d x)}{f (m+1)}}{d}\)

\(\Big \downarrow \) 485

\(\displaystyle \frac {\frac {d (a+b \arctan (c+d x)) \left (\frac {f (c+d x)}{d}-\frac {c f}{d}+e\right )^{m+1}}{f (m+1)}-\frac {b d \int \left (\frac {i \left (e-\frac {c f}{d}+\frac {f (c+d x)}{d}\right )^{m+1}}{2 (-c-d x+i)}+\frac {i \left (e-\frac {c f}{d}+\frac {f (c+d x)}{d}\right )^{m+1}}{2 (c+d x+i)}\right )d(c+d x)}{f (m+1)}}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {d (a+b \arctan (c+d x)) \left (\frac {f (c+d x)}{d}-\frac {c f}{d}+e\right )^{m+1}}{f (m+1)}-\frac {b d \left (\frac {i d \left (\frac {f (c+d x)}{d}-\frac {c f}{d}+e\right )^{m+2} \operatorname {Hypergeometric2F1}\left (1,m+2,m+3,\frac {d e-c f+f (c+d x)}{d e-c f+i f}\right )}{2 (m+2) (d e+(-c+i) f)}-\frac {i d \left (\frac {f (c+d x)}{d}-\frac {c f}{d}+e\right )^{m+2} \operatorname {Hypergeometric2F1}\left (1,m+2,m+3,\frac {d e-c f+f (c+d x)}{d e-(c+i) f}\right )}{2 (m+2) (d e-(c+i) f)}\right )}{f (m+1)}}{d}\)

Input:

Int[(e + f*x)^m*(a + b*ArcTan[c + d*x]),x]
 

Output:

((d*(e - (c*f)/d + (f*(c + d*x))/d)^(1 + m)*(a + b*ArcTan[c + d*x]))/(f*(1 
 + m)) - (b*d*(((I/2)*d*(e - (c*f)/d + (f*(c + d*x))/d)^(2 + m)*Hypergeome 
tric2F1[1, 2 + m, 3 + m, (d*e - c*f + f*(c + d*x))/(d*e + I*f - c*f)])/((d 
*e + (I - c)*f)*(2 + m)) - ((I/2)*d*(e - (c*f)/d + (f*(c + d*x))/d)^(2 + m 
)*Hypergeometric2F1[1, 2 + m, 3 + m, (d*e - c*f + f*(c + d*x))/(d*e - (I + 
 c)*f)])/((d*e - (I + c)*f)*(2 + m))))/(f*(1 + m)))/d
 

Defintions of rubi rules used

rule 485
Int[((c_) + (d_.)*(x_))^(n_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[Expand 
Integrand[(c + d*x)^n, 1/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d, n}, x] & 
&  !IntegerQ[2*n]
 

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

rule 5387
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] 
 :> Simp[(d + e*x)^(q + 1)*((a + b*ArcTan[c*x])/(e*(q + 1))), x] - Simp[b*( 
c/(e*(q + 1)))   Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{a, b 
, c, d, e, q}, x] && NeQ[q, -1]
 

rule 5570
Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_.), x_Symbol] :> Simp[1/d   Subst[Int[((d*e - c*f)/d + f*(x/d))^m*(a + b*A 
rcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && I 
GtQ[p, 0]
 
Maple [F]

\[\int \left (f x +e \right )^{m} \left (a +b \arctan \left (d x +c \right )\right )d x\]

Input:

int((f*x+e)^m*(a+b*arctan(d*x+c)),x)
 

Output:

int((f*x+e)^m*(a+b*arctan(d*x+c)),x)
 

Fricas [F]

\[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\int { {\left (b \arctan \left (d x + c\right ) + a\right )} {\left (f x + e\right )}^{m} \,d x } \] Input:

integrate((f*x+e)^m*(a+b*arctan(d*x+c)),x, algorithm="fricas")
 

Output:

integral((b*arctan(d*x + c) + a)*(f*x + e)^m, x)
 

Sympy [F(-1)]

Timed out. \[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\text {Timed out} \] Input:

integrate((f*x+e)**m*(a+b*atan(d*x+c)),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\int { {\left (b \arctan \left (d x + c\right ) + a\right )} {\left (f x + e\right )}^{m} \,d x } \] Input:

integrate((f*x+e)^m*(a+b*arctan(d*x+c)),x, algorithm="maxima")
 

Output:

1/2*((3*e*m^2 + 2*e*m + (3*f*m^2 + 2*f*m + f)*x + e)*(f*x + e)^m*arctan(d* 
x + c) + (e*m + (f*m + f)*x + e)*(f*x + e)^m*log(d^2*x^2 + 2*c*d*x + c^2 + 
 1) + 2*(f*m^3 + f*m^2 + f*m + f)*integrate(-1/2*(2*((c^2 + 1)*f*m^3 + 2*( 
c^2 + 1)*f*m^2 + (c^2 + 1)*f*m + (d^2*f*m^3 + 2*d^2*f*m^2 + d^2*f*m)*x^2 + 
 2*(c*d*f*m^3 + 2*c*d*f*m^2 + c*d*f*m)*x)*(f*x + e)^m*arctan(d*x + c) - (( 
c^2 + 1)*f*m^3 - (c^2 + 1)*f*m + (d^2*f*m^3 - d^2*f*m)*x^2 + 2*(c*d*f*m^3 
- c*d*f*m)*x)*(f*x + e)^m*log(d^2*x^2 + 2*c*d*x + c^2 + 1) - 2*((c - 1)*d* 
e*m^2 - (c + 1)*d*e*m + (d^2*f*m^2 - d^2*f*m)*x^2 + ((d^2*e + (c - 1)*d*f) 
*m^2 - (d^2*e + (c + 1)*d*f)*m)*x)*(f*x + e)^m)/((c^2 + 1)*f*m^3 + (c^2 + 
1)*f*m^2 + (c^2 + 1)*f*m + (d^2*f*m^3 + d^2*f*m^2 + d^2*f*m + d^2*f)*x^2 + 
 (c^2 + 1)*f + 2*(c*d*f*m^3 + c*d*f*m^2 + c*d*f*m + c*d*f)*x), x))*b/(f*m^ 
3 + f*m^2 + f*m + f) + (f*x + e)^(m + 1)*a/(f*(m + 1))
 

Giac [F]

\[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\int { {\left (b \arctan \left (d x + c\right ) + a\right )} {\left (f x + e\right )}^{m} \,d x } \] Input:

integrate((f*x+e)^m*(a+b*arctan(d*x+c)),x, algorithm="giac")
 

Output:

sage0*x
 

Mupad [F(-1)]

Timed out. \[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx=\int {\left (e+f\,x\right )}^m\,\left (a+b\,\mathrm {atan}\left (c+d\,x\right )\right ) \,d x \] Input:

int((e + f*x)^m*(a + b*atan(c + d*x)),x)
 

Output:

int((e + f*x)^m*(a + b*atan(c + d*x)), x)
 

Reduce [F]

\[ \int (e+f x)^m (a+b \arctan (c+d x)) \, dx =\text {Too large to display} \] Input:

int((f*x+e)^m*(a+b*atan(d*x+c)),x)
 

Output:

((e + f*x)**m*atan(c + d*x)*b*c*e*m + (e + f*x)**m*atan(c + d*x)*b*c*f*m*x 
 + (e + f*x)**m*a*c*e*m + (e + f*x)**m*a*c*f*m*x - (e + f*x)**m*b*e + int( 
(e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 2* 
c*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + d* 
*2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*c**2*e*f*m**2 + in 
t((e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 
2*c*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + 
d**2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*c**2*e*f*m - int 
((e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 2 
*c*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + d 
**2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*c*d*e**2*m**2 - i 
nt((e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 
 2*c*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + 
 d**2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*c*d*e**2*m + in 
t((e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 
2*c*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + 
d**2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*e*f*m**2 + int(( 
e + f*x)**m/(c**2*e*m + c**2*e + c**2*f*m*x + c**2*f*x + 2*c*d*e*m*x + 2*c 
*d*e*x + 2*c*d*f*m*x**2 + 2*c*d*f*x**2 + d**2*e*m*x**2 + d**2*e*x**2 + d** 
2*f*m*x**3 + d**2*f*x**3 + e*m + e + f*m*x + f*x),x)*b*e*f*m - int(((e ...