Integrand size = 18, antiderivative size = 98 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {3 a^2 (c+d x)^2}{4 d}-\frac {2 a^2 d \cosh (e+f x)}{f^2}-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f} \] Output:
3/4*a^2*(d*x+c)^2/d-2*a^2*d*cosh(f*x+e)/f^2-1/4*a^2*d*cosh(f*x+e)^2/f^2+2* a^2*(d*x+c)*sinh(f*x+e)/f+1/2*a^2*(d*x+c)*cosh(f*x+e)*sinh(f*x+e)/f
Time = 0.59 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.83 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {a^2 (-6 (e+f x) (-2 c f+d (e-f x))-16 d \cosh (e+f x)-d \cosh (2 (e+f x))+16 f (c+d x) \sinh (e+f x)+2 f (c+d x) \sinh (2 (e+f x)))}{8 f^2} \] Input:
Integrate[(c + d*x)*(a + a*Cosh[e + f*x])^2,x]
Output:
(a^2*(-6*(e + f*x)*(-2*c*f + d*(e - f*x)) - 16*d*Cosh[e + f*x] - d*Cosh[2* (e + f*x)] + 16*f*(c + d*x)*Sinh[e + f*x] + 2*f*(c + d*x)*Sinh[2*(e + f*x) ]))/(8*f^2)
Time = 0.33 (sec) , antiderivative size = 98, 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) (a \cosh (e+f x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) \left (a+a \sin \left (i e+i f x+\frac {\pi }{2}\right )\right )^2dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (a^2 (c+d x) \cosh ^2(e+f x)+2 a^2 (c+d x) \cosh (e+f x)+a^2 (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 a^2 (c+d x) \sinh (e+f x)}{f}+\frac {a^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{2 f}+\frac {3 a^2 (c+d x)^2}{4 d}-\frac {a^2 d \cosh ^2(e+f x)}{4 f^2}-\frac {2 a^2 d \cosh (e+f x)}{f^2}\) |
Input:
Int[(c + d*x)*(a + a*Cosh[e + f*x])^2,x]
Output:
(3*a^2*(c + d*x)^2)/(4*d) - (2*a^2*d*Cosh[e + f*x])/f^2 - (a^2*d*Cosh[e + f*x]^2)/(4*f^2) + (2*a^2*(c + d*x)*Sinh[e + f*x])/f + (a^2*(c + d*x)*Cosh[ e + f*x]*Sinh[e + f*x])/(2*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.93 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.29
method | result | size |
risch | \(\frac {3 a^{2} d \,x^{2}}{4}+\frac {3 a^{2} c x}{2}+\frac {a^{2} \left (2 d x f +2 c f -d \right ) {\mathrm e}^{2 f x +2 e}}{16 f^{2}}+\frac {a^{2} \left (d x f +c f -d \right ) {\mathrm e}^{f x +e}}{f^{2}}-\frac {a^{2} \left (d x f +c f +d \right ) {\mathrm e}^{-f x -e}}{f^{2}}-\frac {a^{2} \left (2 d x f +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{2}}\) | \(126\) |
parts | \(a^{2} \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {a^{2} \left (\frac {d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 a^{2} \left (\frac {d \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}-\frac {d e \sinh \left (f x +e \right )}{f}+c \sinh \left (f x +e \right )\right )}{f}\) | \(177\) |
derivativedivides | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {d e \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c \,a^{2} \left (f x +e \right )+2 c \,a^{2} \sinh \left (f x +e \right )+c \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) | \(211\) |
default | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {d e \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c \,a^{2} \left (f x +e \right )+2 c \,a^{2} \sinh \left (f x +e \right )+c \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) | \(211\) |
orering | \(\frac {\left (2 d^{5} f^{4} x^{6}+12 c \,d^{4} f^{4} x^{5}+28 c^{2} d^{3} f^{4} x^{4}+32 c^{3} d^{2} f^{4} x^{3}+18 c^{4} d \,f^{4} x^{2}-15 d^{5} f^{2} x^{4}+4 c^{5} f^{4} x -60 c \,d^{4} f^{2} x^{3}-85 c^{2} d^{3} f^{2} x^{2}-50 c^{3} d^{2} f^{2} x -10 c^{4} d \,f^{2}+20 d^{5} x^{2}+40 c \,d^{4} x +8 c^{2} d^{3}\right ) \left (a +a \cosh \left (f x +e \right )\right )^{2}}{4 f^{4} \left (d x +c \right )^{4}}+\frac {\left (10 d^{4} f^{2} x^{4}+40 c \,d^{3} f^{2} x^{3}+55 c^{2} d^{2} f^{2} x^{2}+30 c^{3} d \,f^{2} x +5 c^{4} f^{2}-20 d^{4} x^{2}-40 c \,d^{3} x -8 c^{2} d^{2}\right ) \left (d \left (a +a \cosh \left (f x +e \right )\right )^{2}+2 \left (d x +c \right ) \left (a +a \cosh \left (f x +e \right )\right ) a f \sinh \left (f x +e \right )\right )}{4 f^{4} \left (d x +c \right )^{4}}-\frac {\left (5 d^{3} f^{2} x^{4}+20 c \,d^{2} f^{2} x^{3}+25 c^{2} d \,f^{2} x^{2}+10 c^{3} f^{2} x -20 d^{3} x^{2}-40 c \,d^{2} x -8 d \,c^{2}\right ) \left (4 d \left (a +a \cosh \left (f x +e \right )\right ) a f \sinh \left (f x +e \right )+2 \left (d x +c \right ) a^{2} f^{2} \sinh \left (f x +e \right )^{2}+2 \left (d x +c \right ) \left (a +a \cosh \left (f x +e \right )\right ) a \,f^{2} \cosh \left (f x +e \right )\right )}{8 f^{4} \left (d x +c \right )^{3}}-\frac {\left (3 x^{2} d^{2}+6 c d x +c^{2}\right ) \left (6 d \,a^{2} f^{2} \sinh \left (f x +e \right )^{2}+6 d \left (a +a \cosh \left (f x +e \right )\right ) a \,f^{2} \cosh \left (f x +e \right )+6 a^{2} \sinh \left (f x +e \right ) \cosh \left (f x +e \right ) f^{3} \left (d x +c \right )+2 \left (d x +c \right ) \left (a +a \cosh \left (f x +e \right )\right ) a \,f^{3} \sinh \left (f x +e \right )\right )}{4 f^{4} \left (d x +c \right )^{2}}+\frac {x \left (d x +2 c \right ) \left (24 d \,a^{2} f^{3} \sinh \left (f x +e \right ) \cosh \left (f x +e \right )+8 d \left (a +a \cosh \left (f x +e \right )\right ) a \,f^{3} \sinh \left (f x +e \right )+6 a^{2} f^{4} \cosh \left (f x +e \right )^{2} \left (d x +c \right )+8 a^{2} \sinh \left (f x +e \right )^{2} f^{4} \left (d x +c \right )+2 \left (d x +c \right ) \left (a +a \cosh \left (f x +e \right )\right ) a \,f^{4} \cosh \left (f x +e \right )\right )}{8 f^{4} \left (d x +c \right )}\) | \(715\) |
Input:
int((d*x+c)*(a+a*cosh(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
3/4*a^2*d*x^2+3/2*a^2*c*x+1/16*a^2*(2*d*f*x+2*c*f-d)/f^2*exp(2*f*x+2*e)+a^ 2*(d*f*x+c*f-d)/f^2*exp(f*x+e)-a^2*(d*f*x+c*f+d)/f^2*exp(-f*x-e)-1/16*a^2* (2*d*f*x+2*c*f+d)/f^2*exp(-2*f*x-2*e)
Time = 0.11 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.15 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {6 \, a^{2} d f^{2} x^{2} + 12 \, a^{2} c f^{2} x - a^{2} d \cosh \left (f x + e\right )^{2} - a^{2} d \sinh \left (f x + e\right )^{2} - 16 \, a^{2} d \cosh \left (f x + e\right ) + 4 \, {\left (4 \, a^{2} d f x + 4 \, a^{2} c f + {\left (a^{2} d f x + a^{2} c f\right )} \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )}{8 \, f^{2}} \] Input:
integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="fricas")
Output:
1/8*(6*a^2*d*f^2*x^2 + 12*a^2*c*f^2*x - a^2*d*cosh(f*x + e)^2 - a^2*d*sinh (f*x + e)^2 - 16*a^2*d*cosh(f*x + e) + 4*(4*a^2*d*f*x + 4*a^2*c*f + (a^2*d *f*x + a^2*c*f)*cosh(f*x + e))*sinh(f*x + e))/f^2
Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (94) = 188\).
Time = 0.23 (sec) , antiderivative size = 219, normalized size of antiderivative = 2.23 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\begin {cases} - \frac {a^{2} c x \sinh ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c x \cosh ^{2}{\left (e + f x \right )}}{2} + a^{2} c x + \frac {a^{2} c \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} c \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} d x^{2} \sinh ^{2}{\left (e + f x \right )}}{4} + \frac {a^{2} d x^{2} \cosh ^{2}{\left (e + f x \right )}}{4} + \frac {a^{2} d x^{2}}{2} + \frac {a^{2} d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} d x \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} d \sinh ^{2}{\left (e + f x \right )}}{4 f^{2}} - \frac {2 a^{2} d \cosh {\left (e + f x \right )}}{f^{2}} & \text {for}\: f \neq 0 \\\left (a \cosh {\left (e \right )} + a\right )^{2} \left (c x + \frac {d x^{2}}{2}\right ) & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)*(a+a*cosh(f*x+e))**2,x)
Output:
Piecewise((-a**2*c*x*sinh(e + f*x)**2/2 + a**2*c*x*cosh(e + f*x)**2/2 + a* *2*c*x + a**2*c*sinh(e + f*x)*cosh(e + f*x)/(2*f) + 2*a**2*c*sinh(e + f*x) /f - a**2*d*x**2*sinh(e + f*x)**2/4 + a**2*d*x**2*cosh(e + f*x)**2/4 + a** 2*d*x**2/2 + a**2*d*x*sinh(e + f*x)*cosh(e + f*x)/(2*f) + 2*a**2*d*x*sinh( e + f*x)/f - a**2*d*sinh(e + f*x)**2/(4*f**2) - 2*a**2*d*cosh(e + f*x)/f** 2, Ne(f, 0)), ((a*cosh(e) + a)**2*(c*x + d*x**2/2), True))
Time = 0.05 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.70 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {1}{2} \, a^{2} d x^{2} + \frac {1}{16} \, {\left (4 \, x^{2} + \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} - \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} a^{2} d + \frac {1}{8} \, a^{2} c {\left (4 \, x + \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} - \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c x + a^{2} 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 {2 \, a^{2} c \sinh \left (f x + e\right )}{f} \] Input:
integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="maxima")
Output:
1/2*a^2*d*x^2 + 1/16*(4*x^2 + (2*f*x*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 - (2 *f*x + 1)*e^(-2*f*x - 2*e)/f^2)*a^2*d + 1/8*a^2*c*(4*x + e^(2*f*x + 2*e)/f - e^(-2*f*x - 2*e)/f) + a^2*c*x + a^2*d*((f*x*e^e - e^e)*e^(f*x)/f^2 - (f *x + 1)*e^(-f*x - e)/f^2) + 2*a^2*c*sinh(f*x + e)/f
Time = 0.13 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.54 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {3}{4} \, a^{2} d x^{2} + \frac {3}{2} \, a^{2} c x + \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f - a^{2} d\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{2}} + \frac {{\left (a^{2} d f x + a^{2} c f - a^{2} d\right )} e^{\left (f x + e\right )}}{f^{2}} - \frac {{\left (a^{2} d f x + a^{2} c f + a^{2} d\right )} e^{\left (-f x - e\right )}}{f^{2}} - \frac {{\left (2 \, a^{2} d f x + 2 \, a^{2} c f + a^{2} d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \] Input:
integrate((d*x+c)*(a+a*cosh(f*x+e))^2,x, algorithm="giac")
Output:
3/4*a^2*d*x^2 + 3/2*a^2*c*x + 1/16*(2*a^2*d*f*x + 2*a^2*c*f - a^2*d)*e^(2* f*x + 2*e)/f^2 + (a^2*d*f*x + a^2*c*f - a^2*d)*e^(f*x + e)/f^2 - (a^2*d*f* x + a^2*c*f + a^2*d)*e^(-f*x - e)/f^2 - 1/16*(2*a^2*d*f*x + 2*a^2*c*f + a^ 2*d)*e^(-2*f*x - 2*e)/f^2
Time = 0.14 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.26 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {3\,a^2\,d\,x^2}{4}+\frac {3\,a^2\,c\,x}{2}-\frac {a^2\,d\,{\mathrm {cosh}\left (e+f\,x\right )}^2}{4\,f^2}-\frac {2\,a^2\,d\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {2\,a^2\,c\,\mathrm {sinh}\left (e+f\,x\right )}{f}+\frac {a^2\,c\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f}+\frac {2\,a^2\,d\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f}+\frac {a^2\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f} \] Input:
int((a + a*cosh(e + f*x))^2*(c + d*x),x)
Output:
(3*a^2*d*x^2)/4 + (3*a^2*c*x)/2 - (a^2*d*cosh(e + f*x)^2)/(4*f^2) - (2*a^2 *d*cosh(e + f*x))/f^2 + (2*a^2*c*sinh(e + f*x))/f + (a^2*c*cosh(e + f*x)*s inh(e + f*x))/(2*f) + (2*a^2*d*x*sinh(e + f*x))/f + (a^2*d*x*cosh(e + f*x) *sinh(e + f*x))/(2*f)
Time = 0.16 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.90 \[ \int (c+d x) (a+a \cosh (e+f x))^2 \, dx=\frac {a^{2} \left (2 e^{4 f x +4 e} c f +2 e^{4 f x +4 e} d f x -e^{4 f x +4 e} d +16 e^{3 f x +3 e} c f +16 e^{3 f x +3 e} d f x -16 e^{3 f x +3 e} d +24 e^{2 f x +2 e} c \,f^{2} x +12 e^{2 f x +2 e} d \,f^{2} x^{2}-16 e^{f x +e} c f -16 e^{f x +e} d f x -16 e^{f x +e} d -2 c f -2 d f x -d \right )}{16 e^{2 f x +2 e} f^{2}} \] Input:
int((d*x+c)*(a+a*cosh(f*x+e))^2,x)
Output:
(a**2*(2*e**(4*e + 4*f*x)*c*f + 2*e**(4*e + 4*f*x)*d*f*x - e**(4*e + 4*f*x )*d + 16*e**(3*e + 3*f*x)*c*f + 16*e**(3*e + 3*f*x)*d*f*x - 16*e**(3*e + 3 *f*x)*d + 24*e**(2*e + 2*f*x)*c*f**2*x + 12*e**(2*e + 2*f*x)*d*f**2*x**2 - 16*e**(e + f*x)*c*f - 16*e**(e + f*x)*d*f*x - 16*e**(e + f*x)*d - 2*c*f - 2*d*f*x - d))/(16*e**(2*e + 2*f*x)*f**2)