\(\int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx\) [152]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [A] (verification not implemented)
Sympy [F(-2)]
Maxima [A] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 263 \[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=\frac {3 a^2 (c+d x)^{1+m}}{2 d (1+m)}+\frac {2^{-3-m} a^2 e^{2 e-\frac {2 c f}{d}} (c+d x)^m \left (-\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 f (c+d x)}{d}\right )}{f}+\frac {a^2 e^{e-\frac {c f}{d}} (c+d x)^m \left (-\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {f (c+d x)}{d}\right )}{f}-\frac {a^2 e^{-e+\frac {c f}{d}} (c+d x)^m \left (\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {f (c+d x)}{d}\right )}{f}-\frac {2^{-3-m} a^2 e^{-2 e+\frac {2 c f}{d}} (c+d x)^m \left (\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {2 f (c+d x)}{d}\right )}{f} \] Output:

3/2*a^2*(d*x+c)^(1+m)/d/(1+m)+2^(-3-m)*a^2*exp(2*e-2*c*f/d)*(d*x+c)^m*GAMM 
A(1+m,-2*f*(d*x+c)/d)/f/((-f*(d*x+c)/d)^m)+a^2*exp(e-c*f/d)*(d*x+c)^m*GAMM 
A(1+m,-f*(d*x+c)/d)/f/((-f*(d*x+c)/d)^m)-a^2*exp(-e+c*f/d)*(d*x+c)^m*GAMMA 
(1+m,f*(d*x+c)/d)/f/((f*(d*x+c)/d)^m)-2^(-3-m)*a^2*exp(-2*e+2*c*f/d)*(d*x+ 
c)^m*GAMMA(1+m,2*f*(d*x+c)/d)/f/((f*(d*x+c)/d)^m)
 

Mathematica [A] (warning: unable to verify)

Time = 0.68 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.15 \[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=-\frac {2^{-5-m} a^2 e^{-2 \left (e+\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {f^2 (c+d x)^2}{d^2}\right )^{-m} (1+\cosh (e+f x))^2 \left (-3 2^{2+m} e^{2 \left (e+\frac {c f}{d}\right )} f (c+d x) \left (-\frac {f^2 (c+d x)^2}{d^2}\right )^m-d e^{4 e} (1+m) \left (f \left (\frac {c}{d}+x\right )\right )^m \Gamma \left (1+m,-\frac {2 f (c+d x)}{d}\right )-2^{3+m} d e^{3 e+\frac {c f}{d}} (1+m) \left (f \left (\frac {c}{d}+x\right )\right )^m \Gamma \left (1+m,-\frac {f (c+d x)}{d}\right )+2^{3+m} d e^{e+\frac {3 c f}{d}} (1+m) \left (-\frac {f (c+d x)}{d}\right )^m \Gamma \left (1+m,\frac {f (c+d x)}{d}\right )+d e^{\frac {4 c f}{d}} (1+m) \left (-\frac {f (c+d x)}{d}\right )^m \Gamma \left (1+m,\frac {2 f (c+d x)}{d}\right )\right ) \text {sech}^4\left (\frac {1}{2} (e+f x)\right )}{d f (1+m)} \] Input:

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

Output:

-((2^(-5 - m)*a^2*(c + d*x)^m*(1 + Cosh[e + f*x])^2*(-3*2^(2 + m)*E^(2*(e 
+ (c*f)/d))*f*(c + d*x)*(-((f^2*(c + d*x)^2)/d^2))^m - d*E^(4*e)*(1 + m)*( 
f*(c/d + x))^m*Gamma[1 + m, (-2*f*(c + d*x))/d] - 2^(3 + m)*d*E^(3*e + (c* 
f)/d)*(1 + m)*(f*(c/d + x))^m*Gamma[1 + m, -((f*(c + d*x))/d)] + 2^(3 + m) 
*d*E^(e + (3*c*f)/d)*(1 + m)*(-((f*(c + d*x))/d))^m*Gamma[1 + m, (f*(c + d 
*x))/d] + d*E^((4*c*f)/d)*(1 + m)*(-((f*(c + d*x))/d))^m*Gamma[1 + m, (2*f 
*(c + d*x))/d])*Sech[(e + f*x)/2]^4)/(d*E^(2*(e + (c*f)/d))*f*(1 + m)*(-(( 
f^2*(c + d*x)^2)/d^2))^m))
 

Rubi [A] (verified)

Time = 0.77 (sec) , antiderivative size = 258, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3799, 3042, 3793, 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 (c+d x)^m (a \cosh (e+f x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^m \left (a+a \sin \left (i e+i f x+\frac {\pi }{2}\right )\right )^2dx\)

\(\Big \downarrow \) 3799

\(\displaystyle 4 a^2 \int (c+d x)^m \cosh ^4\left (\frac {e}{2}+\frac {f x}{2}\right )dx\)

\(\Big \downarrow \) 3042

\(\displaystyle 4 a^2 \int (c+d x)^m \sin \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{2}\right )^4dx\)

\(\Big \downarrow \) 3793

\(\displaystyle 4 a^2 \int \left (\frac {1}{2} \cosh (e+f x) (c+d x)^m+\frac {1}{8} \cosh (2 e+2 f x) (c+d x)^m+\frac {3}{8} (c+d x)^m\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 4 a^2 \left (\frac {2^{-m-5} e^{2 e-\frac {2 c f}{d}} (c+d x)^m \left (-\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {2 f (c+d x)}{d}\right )}{f}+\frac {e^{e-\frac {c f}{d}} (c+d x)^m \left (-\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {f (c+d x)}{d}\right )}{4 f}-\frac {e^{\frac {c f}{d}-e} (c+d x)^m \left (\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {f (c+d x)}{d}\right )}{4 f}-\frac {2^{-m-5} e^{\frac {2 c f}{d}-2 e} (c+d x)^m \left (\frac {f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {2 f (c+d x)}{d}\right )}{f}+\frac {3 (c+d x)^{m+1}}{8 d (m+1)}\right )\)

Input:

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

Output:

4*a^2*((3*(c + d*x)^(1 + m))/(8*d*(1 + m)) + (2^(-5 - m)*E^(2*e - (2*c*f)/ 
d)*(c + d*x)^m*Gamma[1 + m, (-2*f*(c + d*x))/d])/(f*(-((f*(c + d*x))/d))^m 
) + (E^(e - (c*f)/d)*(c + d*x)^m*Gamma[1 + m, -((f*(c + d*x))/d)])/(4*f*(- 
((f*(c + d*x))/d))^m) - (E^(-e + (c*f)/d)*(c + d*x)^m*Gamma[1 + m, (f*(c + 
 d*x))/d])/(4*f*((f*(c + d*x))/d)^m) - (2^(-5 - m)*E^(-2*e + (2*c*f)/d)*(c 
 + d*x)^m*Gamma[1 + m, (2*f*(c + d*x))/d])/(f*((f*(c + d*x))/d)^m))
 

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 3793
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In 
t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f 
, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
 

rule 3799
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Simp[(2*a)^n   Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) 
+ f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 
2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
 
Maple [F]

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

Input:

int((d*x+c)^m*(a+a*cosh(f*x+e))^2,x)
 

Output:

int((d*x+c)^m*(a+a*cosh(f*x+e))^2,x)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 493, normalized size of antiderivative = 1.87 \[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=-\frac {{\left (a^{2} d m + a^{2} d\right )} \cosh \left (\frac {d m \log \left (\frac {2 \, f}{d}\right ) + 2 \, d e - 2 \, c f}{d}\right ) \Gamma \left (m + 1, \frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + 8 \, {\left (a^{2} d m + a^{2} d\right )} \cosh \left (\frac {d m \log \left (\frac {f}{d}\right ) + d e - c f}{d}\right ) \Gamma \left (m + 1, \frac {d f x + c f}{d}\right ) - 8 \, {\left (a^{2} d m + a^{2} d\right )} \cosh \left (\frac {d m \log \left (-\frac {f}{d}\right ) - d e + c f}{d}\right ) \Gamma \left (m + 1, -\frac {d f x + c f}{d}\right ) - {\left (a^{2} d m + a^{2} d\right )} \cosh \left (\frac {d m \log \left (-\frac {2 \, f}{d}\right ) - 2 \, d e + 2 \, c f}{d}\right ) \Gamma \left (m + 1, -\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - {\left (a^{2} d m + a^{2} d\right )} \Gamma \left (m + 1, \frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sinh \left (\frac {d m \log \left (\frac {2 \, f}{d}\right ) + 2 \, d e - 2 \, c f}{d}\right ) - 8 \, {\left (a^{2} d m + a^{2} d\right )} \Gamma \left (m + 1, \frac {d f x + c f}{d}\right ) \sinh \left (\frac {d m \log \left (\frac {f}{d}\right ) + d e - c f}{d}\right ) + 8 \, {\left (a^{2} d m + a^{2} d\right )} \Gamma \left (m + 1, -\frac {d f x + c f}{d}\right ) \sinh \left (\frac {d m \log \left (-\frac {f}{d}\right ) - d e + c f}{d}\right ) + {\left (a^{2} d m + a^{2} d\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sinh \left (\frac {d m \log \left (-\frac {2 \, f}{d}\right ) - 2 \, d e + 2 \, c f}{d}\right ) - 12 \, {\left (a^{2} d f x + a^{2} c f\right )} \cosh \left (m \log \left (d x + c\right )\right ) - 12 \, {\left (a^{2} d f x + a^{2} c f\right )} \sinh \left (m \log \left (d x + c\right )\right )}{8 \, {\left (d f m + d f\right )}} \] Input:

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

Output:

-1/8*((a^2*d*m + a^2*d)*cosh((d*m*log(2*f/d) + 2*d*e - 2*c*f)/d)*gamma(m + 
 1, 2*(d*f*x + c*f)/d) + 8*(a^2*d*m + a^2*d)*cosh((d*m*log(f/d) + d*e - c* 
f)/d)*gamma(m + 1, (d*f*x + c*f)/d) - 8*(a^2*d*m + a^2*d)*cosh((d*m*log(-f 
/d) - d*e + c*f)/d)*gamma(m + 1, -(d*f*x + c*f)/d) - (a^2*d*m + a^2*d)*cos 
h((d*m*log(-2*f/d) - 2*d*e + 2*c*f)/d)*gamma(m + 1, -2*(d*f*x + c*f)/d) - 
(a^2*d*m + a^2*d)*gamma(m + 1, 2*(d*f*x + c*f)/d)*sinh((d*m*log(2*f/d) + 2 
*d*e - 2*c*f)/d) - 8*(a^2*d*m + a^2*d)*gamma(m + 1, (d*f*x + c*f)/d)*sinh( 
(d*m*log(f/d) + d*e - c*f)/d) + 8*(a^2*d*m + a^2*d)*gamma(m + 1, -(d*f*x + 
 c*f)/d)*sinh((d*m*log(-f/d) - d*e + c*f)/d) + (a^2*d*m + a^2*d)*gamma(m + 
 1, -2*(d*f*x + c*f)/d)*sinh((d*m*log(-2*f/d) - 2*d*e + 2*c*f)/d) - 12*(a^ 
2*d*f*x + a^2*c*f)*cosh(m*log(d*x + c)) - 12*(a^2*d*f*x + a^2*c*f)*sinh(m* 
log(d*x + c)))/(d*f*m + d*f)
 

Sympy [F(-2)]

Exception generated. \[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=\text {Exception raised: TypeError} \] Input:

integrate((d*x+c)**m*(a+a*cosh(f*x+e))**2,x)
 

Output:

Exception raised: TypeError >> cannot determine truth value of Relational
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 209, normalized size of antiderivative = 0.79 \[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=-\frac {1}{4} \, {\left (\frac {{\left (d x + c\right )}^{m + 1} e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} E_{-m}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} + \frac {{\left (d x + c\right )}^{m + 1} e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} E_{-m}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} - \frac {2 \, {\left (d x + c\right )}^{m + 1}}{d {\left (m + 1\right )}}\right )} a^{2} - {\left (\frac {{\left (d x + c\right )}^{m + 1} e^{\left (-e + \frac {c f}{d}\right )} E_{-m}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{d} + \frac {{\left (d x + c\right )}^{m + 1} e^{\left (e - \frac {c f}{d}\right )} E_{-m}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{d}\right )} a^{2} + \frac {{\left (d x + c\right )}^{m + 1} a^{2}}{d {\left (m + 1\right )}} \] Input:

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

Output:

-1/4*((d*x + c)^(m + 1)*e^(-2*e + 2*c*f/d)*exp_integral_e(-m, 2*(d*x + c)* 
f/d)/d + (d*x + c)^(m + 1)*e^(2*e - 2*c*f/d)*exp_integral_e(-m, -2*(d*x + 
c)*f/d)/d - 2*(d*x + c)^(m + 1)/(d*(m + 1)))*a^2 - ((d*x + c)^(m + 1)*e^(- 
e + c*f/d)*exp_integral_e(-m, (d*x + c)*f/d)/d + (d*x + c)^(m + 1)*e^(e - 
c*f/d)*exp_integral_e(-m, -(d*x + c)*f/d)/d)*a^2 + (d*x + c)^(m + 1)*a^2/( 
d*(m + 1))
 

Giac [F]

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

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

Output:

integrate((a*cosh(f*x + e) + a)^2*(d*x + c)^m, x)
 

Mupad [F(-1)]

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

int((a + a*cosh(e + f*x))^2*(c + d*x)^m,x)
 

Output:

int((a + a*cosh(e + f*x))^2*(c + d*x)^m, x)
 

Reduce [F]

\[ \int (c+d x)^m (a+a \cosh (e+f x))^2 \, dx=\frac {a^{2} \left (e^{4 f x +4 e} \left (d x +c \right )^{m} d m +e^{4 f x +4 e} \left (d x +c \right )^{m} d +8 e^{3 f x +3 e} \left (d x +c \right )^{m} d m +8 e^{3 f x +3 e} \left (d x +c \right )^{m} d +12 e^{2 f x +2 e} \left (d x +c \right )^{m} c f +12 e^{2 f x +2 e} \left (d x +c \right )^{m} d f x -8 e^{f x +e} \left (d x +c \right )^{m} d m -8 e^{f x +e} \left (d x +c \right )^{m} d -\left (d x +c \right )^{m} d m -\left (d x +c \right )^{m} d -e^{2 f x +4 e} \left (\int \frac {e^{2 f x} \left (d x +c \right )^{m}}{d x +c}d x \right ) d^{2} m^{2}-e^{2 f x +4 e} \left (\int \frac {e^{2 f x} \left (d x +c \right )^{m}}{d x +c}d x \right ) d^{2} m -8 e^{2 f x +3 e} \left (\int \frac {e^{f x} \left (d x +c \right )^{m}}{d x +c}d x \right ) d^{2} m^{2}-8 e^{2 f x +3 e} \left (\int \frac {e^{f x} \left (d x +c \right )^{m}}{d x +c}d x \right ) d^{2} m +e^{2 f x +2 e} \left (\int \frac {\left (d x +c \right )^{m}}{e^{2 f x +2 e} c +e^{2 f x +2 e} d x}d x \right ) d^{2} m^{2}+e^{2 f x +2 e} \left (\int \frac {\left (d x +c \right )^{m}}{e^{2 f x +2 e} c +e^{2 f x +2 e} d x}d x \right ) d^{2} m +8 e^{2 f x +e} \left (\int \frac {\left (d x +c \right )^{m}}{e^{f x} c +e^{f x} d x}d x \right ) d^{2} m^{2}+8 e^{2 f x +e} \left (\int \frac {\left (d x +c \right )^{m}}{e^{f x} c +e^{f x} d x}d x \right ) d^{2} m \right )}{8 e^{2 f x +2 e} d f \left (m +1\right )} \] Input:

int((d*x+c)^m*(a+a*cosh(f*x+e))^2,x)
 

Output:

(a**2*(e**(4*e + 4*f*x)*(c + d*x)**m*d*m + e**(4*e + 4*f*x)*(c + d*x)**m*d 
 + 8*e**(3*e + 3*f*x)*(c + d*x)**m*d*m + 8*e**(3*e + 3*f*x)*(c + d*x)**m*d 
 + 12*e**(2*e + 2*f*x)*(c + d*x)**m*c*f + 12*e**(2*e + 2*f*x)*(c + d*x)**m 
*d*f*x - 8*e**(e + f*x)*(c + d*x)**m*d*m - 8*e**(e + f*x)*(c + d*x)**m*d - 
 (c + d*x)**m*d*m - (c + d*x)**m*d - e**(4*e + 2*f*x)*int((e**(2*f*x)*(c + 
 d*x)**m)/(c + d*x),x)*d**2*m**2 - e**(4*e + 2*f*x)*int((e**(2*f*x)*(c + d 
*x)**m)/(c + d*x),x)*d**2*m - 8*e**(3*e + 2*f*x)*int((e**(f*x)*(c + d*x)** 
m)/(c + d*x),x)*d**2*m**2 - 8*e**(3*e + 2*f*x)*int((e**(f*x)*(c + d*x)**m) 
/(c + d*x),x)*d**2*m + e**(2*e + 2*f*x)*int((c + d*x)**m/(e**(2*e + 2*f*x) 
*c + e**(2*e + 2*f*x)*d*x),x)*d**2*m**2 + e**(2*e + 2*f*x)*int((c + d*x)** 
m/(e**(2*e + 2*f*x)*c + e**(2*e + 2*f*x)*d*x),x)*d**2*m + 8*e**(e + 2*f*x) 
*int((c + d*x)**m/(e**(f*x)*c + e**(f*x)*d*x),x)*d**2*m**2 + 8*e**(e + 2*f 
*x)*int((c + d*x)**m/(e**(f*x)*c + e**(f*x)*d*x),x)*d**2*m))/(8*e**(2*e + 
2*f*x)*d*f*(m + 1))