Integrand size = 18, antiderivative size = 67 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {a (c+d x)^3}{3 d}-\frac {2 b d (c+d x) \cosh (e+f x)}{f^2}+\frac {2 b d^2 \sinh (e+f x)}{f^3}+\frac {b (c+d x)^2 \sinh (e+f x)}{f} \] Output:
1/3*a*(d*x+c)^3/d-2*b*d*(d*x+c)*cosh(f*x+e)/f^2+2*b*d^2*sinh(f*x+e)/f^3+b* (d*x+c)^2*sinh(f*x+e)/f
Time = 0.18 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.24 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {1}{3} a x \left (3 c^2+3 c d x+d^2 x^2\right )-\frac {2 b d (c+d x) \cosh (e+f x)}{f^2}+\frac {b \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \sinh (e+f x)}{f^3} \] Input:
Integrate[(c + d*x)^2*(a + b*Cosh[e + f*x]),x]
Output:
(a*x*(3*c^2 + 3*c*d*x + d^2*x^2))/3 - (2*b*d*(c + d*x)*Cosh[e + f*x])/f^2 + (b*(c^2*f^2 + 2*c*d*f^2*x + d^2*(2 + f^2*x^2))*Sinh[e + f*x])/f^3
Time = 0.30 (sec) , antiderivative size = 67, 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.167, Rules used = {3042, 3798, 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)^2 (a+b \cosh (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^2 \left (a+b \sin \left (i e+i f x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (a (c+d x)^2+b (c+d x)^2 \cosh (e+f x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (c+d x)^3}{3 d}-\frac {2 b d (c+d x) \cosh (e+f x)}{f^2}+\frac {b (c+d x)^2 \sinh (e+f x)}{f}+\frac {2 b d^2 \sinh (e+f x)}{f^3}\) |
Input:
Int[(c + d*x)^2*(a + b*Cosh[e + f*x]),x]
Output:
(a*(c + d*x)^3)/(3*d) - (2*b*d*(c + d*x)*Cosh[e + f*x])/f^2 + (2*b*d^2*Sin h[e + f*x])/f^3 + (b*(c + d*x)^2*Sinh[e + f*x])/f
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ m, 0] || NeQ[a^2 - b^2, 0])
Time = 0.64 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.13
method | result | size |
parallelrisch | \(\frac {b \left (\left (d x +c \right )^{2} f^{2}+2 d^{2}\right ) \sinh \left (f x +e \right )+\left (-2 b d \left (d x +c \right ) \cosh \left (f x +e \right )+a x \left (\frac {1}{3} x^{2} d^{2}+c d x +c^{2}\right ) f^{2}-2 b c d \right ) f}{f^{3}}\) | \(76\) |
risch | \(\frac {a \,d^{2} x^{3}}{3}+a d c \,x^{2}+a \,c^{2} x +\frac {a \,c^{3}}{3 d}+\frac {b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2} f x -2 c d f +2 d^{2}\right ) {\mathrm e}^{f x +e}}{2 f^{3}}-\frac {b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}+2 d^{2} f x +2 c d f +2 d^{2}\right ) {\mathrm e}^{-f x -e}}{2 f^{3}}\) | \(146\) |
parts | \(\frac {a \left (d x +c \right )^{3}}{3 d}+\frac {b \left (\frac {d^{2} \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}+\frac {d^{2} e^{2} \sinh \left (f x +e \right )}{f^{2}}+\frac {2 c d \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}-\frac {2 d e c \sinh \left (f x +e \right )}{f}+c^{2} \sinh \left (f x +e \right )\right )}{f}\) | \(162\) |
derivativedivides | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {d^{2} b \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 d^{2} e b \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 d c b \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b \sinh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 d e c b \sinh \left (f x +e \right )}{f}+c^{2} a \left (f x +e \right )+b \,c^{2} \sinh \left (f x +e \right )}{f}\) | \(240\) |
default | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {d^{2} b \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 d^{2} e b \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 d c b \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b \sinh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 d e c b \sinh \left (f x +e \right )}{f}+c^{2} a \left (f x +e \right )+b \,c^{2} \sinh \left (f x +e \right )}{f}\) | \(240\) |
orering | \(\frac {\left (d^{4} f^{4} x^{5}+5 c \,d^{3} f^{4} x^{4}+10 c^{2} d^{2} f^{4} x^{3}+9 c^{3} d \,f^{4} x^{2}+3 c^{4} f^{4} x -12 d^{4} f^{2} x^{3}-42 c \,d^{3} f^{2} x^{2}-48 c^{2} d^{2} f^{2} x -12 c^{3} d \,f^{2}-48 d^{4} x -12 d^{3} c \right ) \left (a +b \cosh \left (f x +e \right )\right )}{3 f^{4} \left (d x +c \right )^{2}}+\frac {\left (7 d^{3} f^{2} x^{3}+21 c \,d^{2} f^{2} x^{2}+21 c^{2} d \,f^{2} x +3 c^{3} f^{2}+30 d^{3} x +6 d^{2} c \right ) \left (2 \left (d x +c \right ) \left (a +b \cosh \left (f x +e \right )\right ) d +\left (d x +c \right )^{2} b f \sinh \left (f x +e \right )\right )}{3 f^{4} \left (d x +c \right )^{3}}-\frac {x \left (d^{2} x^{2} f^{2}+3 c d \,f^{2} x +3 c^{2} f^{2}+6 d^{2}\right ) \left (2 d^{2} \left (a +b \cosh \left (f x +e \right )\right )+4 \left (d x +c \right ) b f \sinh \left (f x +e \right ) d +\left (d x +c \right )^{2} b \,f^{2} \cosh \left (f x +e \right )\right )}{3 f^{4} \left (d x +c \right )^{2}}\) | \(334\) |
Input:
int((d*x+c)^2*(a+b*cosh(f*x+e)),x,method=_RETURNVERBOSE)
Output:
(b*((d*x+c)^2*f^2+2*d^2)*sinh(f*x+e)+(-2*b*d*(d*x+c)*cosh(f*x+e)+a*x*(1/3* x^2*d^2+c*d*x+c^2)*f^2-2*b*c*d)*f)/f^3
Time = 0.09 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.52 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {a d^{2} f^{3} x^{3} + 3 \, a c d f^{3} x^{2} + 3 \, a c^{2} f^{3} x - 6 \, {\left (b d^{2} f x + b c d f\right )} \cosh \left (f x + e\right ) + 3 \, {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} + 2 \, b d^{2}\right )} \sinh \left (f x + e\right )}{3 \, f^{3}} \] Input:
integrate((d*x+c)^2*(a+b*cosh(f*x+e)),x, algorithm="fricas")
Output:
1/3*(a*d^2*f^3*x^3 + 3*a*c*d*f^3*x^2 + 3*a*c^2*f^3*x - 6*(b*d^2*f*x + b*c* d*f)*cosh(f*x + e) + 3*(b*d^2*f^2*x^2 + 2*b*c*d*f^2*x + b*c^2*f^2 + 2*b*d^ 2)*sinh(f*x + e))/f^3
Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (65) = 130\).
Time = 0.23 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.25 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\begin {cases} a c^{2} x + a c d x^{2} + \frac {a d^{2} x^{3}}{3} + \frac {b c^{2} \sinh {\left (e + f x \right )}}{f} + \frac {2 b c d x \sinh {\left (e + f x \right )}}{f} - \frac {2 b c d \cosh {\left (e + f x \right )}}{f^{2}} + \frac {b d^{2} x^{2} \sinh {\left (e + f x \right )}}{f} - \frac {2 b d^{2} x \cosh {\left (e + f x \right )}}{f^{2}} + \frac {2 b d^{2} \sinh {\left (e + f x \right )}}{f^{3}} & \text {for}\: f \neq 0 \\\left (a + b \cosh {\left (e \right )}\right ) \left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)**2*(a+b*cosh(f*x+e)),x)
Output:
Piecewise((a*c**2*x + a*c*d*x**2 + a*d**2*x**3/3 + b*c**2*sinh(e + f*x)/f + 2*b*c*d*x*sinh(e + f*x)/f - 2*b*c*d*cosh(e + f*x)/f**2 + b*d**2*x**2*sin h(e + f*x)/f - 2*b*d**2*x*cosh(e + f*x)/f**2 + 2*b*d**2*sinh(e + f*x)/f**3 , Ne(f, 0)), ((a + b*cosh(e))*(c**2*x + c*d*x**2 + d**2*x**3/3), True))
Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (65) = 130\).
Time = 0.04 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.10 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x + b c d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} - \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {1}{2} \, b d^{2} {\left (\frac {{\left (f^{2} x^{2} e^{e} - 2 \, f x e^{e} + 2 \, e^{e}\right )} e^{\left (f x\right )}}{f^{3}} - \frac {{\left (f^{2} x^{2} + 2 \, f x + 2\right )} e^{\left (-f x - e\right )}}{f^{3}}\right )} + \frac {b c^{2} \sinh \left (f x + e\right )}{f} \] Input:
integrate((d*x+c)^2*(a+b*cosh(f*x+e)),x, algorithm="maxima")
Output:
1/3*a*d^2*x^3 + a*c*d*x^2 + a*c^2*x + b*c*d*((f*x*e^e - e^e)*e^(f*x)/f^2 - (f*x + 1)*e^(-f*x - e)/f^2) + 1/2*b*d^2*((f^2*x^2*e^e - 2*f*x*e^e + 2*e^e )*e^(f*x)/f^3 - (f^2*x^2 + 2*f*x + 2)*e^(-f*x - e)/f^3) + b*c^2*sinh(f*x + e)/f
Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (65) = 130\).
Time = 0.11 (sec) , antiderivative size = 146, normalized size of antiderivative = 2.18 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x + \frac {{\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} - 2 \, b d^{2} f x - 2 \, b c d f + 2 \, b d^{2}\right )} e^{\left (f x + e\right )}}{2 \, f^{3}} - \frac {{\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} + 2 \, b d^{2} f x + 2 \, b c d f + 2 \, b d^{2}\right )} e^{\left (-f x - e\right )}}{2 \, f^{3}} \] Input:
integrate((d*x+c)^2*(a+b*cosh(f*x+e)),x, algorithm="giac")
Output:
1/3*a*d^2*x^3 + a*c*d*x^2 + a*c^2*x + 1/2*(b*d^2*f^2*x^2 + 2*b*c*d*f^2*x + b*c^2*f^2 - 2*b*d^2*f*x - 2*b*c*d*f + 2*b*d^2)*e^(f*x + e)/f^3 - 1/2*(b*d ^2*f^2*x^2 + 2*b*c*d*f^2*x + b*c^2*f^2 + 2*b*d^2*f*x + 2*b*c*d*f + 2*b*d^2 )*e^(-f*x - e)/f^3
Time = 1.96 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.64 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {a\,d^2\,x^3}{3}+\frac {\mathrm {sinh}\left (e+f\,x\right )\,\left (b\,c^2\,f^2+2\,b\,d^2\right )}{f^3}+a\,c^2\,x+a\,c\,d\,x^2-\frac {2\,b\,d^2\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {b\,d^2\,x^2\,\mathrm {sinh}\left (e+f\,x\right )}{f}-\frac {2\,b\,c\,d\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {2\,b\,c\,d\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f} \] Input:
int((a + b*cosh(e + f*x))*(c + d*x)^2,x)
Output:
(a*d^2*x^3)/3 + (sinh(e + f*x)*(2*b*d^2 + b*c^2*f^2))/f^3 + a*c^2*x + a*c* d*x^2 - (2*b*d^2*x*cosh(e + f*x))/f^2 + (b*d^2*x^2*sinh(e + f*x))/f - (2*b *c*d*cosh(e + f*x))/f^2 + (2*b*c*d*x*sinh(e + f*x))/f
Time = 0.15 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.85 \[ \int (c+d x)^2 (a+b \cosh (e+f x)) \, dx=\frac {-6 \cosh \left (f x +e \right ) b c d f -6 \cosh \left (f x +e \right ) b \,d^{2} f x +3 \sinh \left (f x +e \right ) b \,c^{2} f^{2}+6 \sinh \left (f x +e \right ) b c d \,f^{2} x +3 \sinh \left (f x +e \right ) b \,d^{2} f^{2} x^{2}+6 \sinh \left (f x +e \right ) b \,d^{2}+3 a \,c^{2} f^{3} x +3 a c d \,f^{3} x^{2}+a \,d^{2} f^{3} x^{3}}{3 f^{3}} \] Input:
int((d*x+c)^2*(a+b*cosh(f*x+e)),x)
Output:
( - 6*cosh(e + f*x)*b*c*d*f - 6*cosh(e + f*x)*b*d**2*f*x + 3*sinh(e + f*x) *b*c**2*f**2 + 6*sinh(e + f*x)*b*c*d*f**2*x + 3*sinh(e + f*x)*b*d**2*f**2* x**2 + 6*sinh(e + f*x)*b*d**2 + 3*a*c**2*f**3*x + 3*a*c*d*f**3*x**2 + a*d* *2*f**3*x**3)/(3*f**3)