\(\int x^2 \cosh (a+b x-c x^2) \, dx\) [6]

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

Optimal result

Integrand size = 16, antiderivative size = 227 \[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {b^2 e^{a+\frac {b^2}{4 c}} \sqrt {\pi } \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{16 c^{5/2}}-\frac {e^{a+\frac {b^2}{4 c}} \sqrt {\pi } \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{8 c^{3/2}}-\frac {b^2 e^{-a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{16 c^{5/2}}+\frac {e^{-a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{8 c^{3/2}}-\frac {b \sinh \left (a+b x-c x^2\right )}{4 c^2}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c} \] Output:

-1/16*b^2*exp(a+1/4*b^2/c)*Pi^(1/2)*erf(1/2*(-2*c*x+b)/c^(1/2))/c^(5/2)-1/ 
8*exp(a+1/4*b^2/c)*Pi^(1/2)*erf(1/2*(-2*c*x+b)/c^(1/2))/c^(3/2)-1/16*b^2*e 
xp(-a-1/4*b^2/c)*Pi^(1/2)*erfi(1/2*(-2*c*x+b)/c^(1/2))/c^(5/2)+1/8*exp(-a- 
1/4*b^2/c)*Pi^(1/2)*erfi(1/2*(-2*c*x+b)/c^(1/2))/c^(3/2)-1/4*b*sinh(-c*x^2 
+b*x+a)/c^2-1/2*x*sinh(-c*x^2+b*x+a)/c
 

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.67 \[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=\frac {\left (b^2-2 c\right ) \sqrt {\pi } \text {erfi}\left (\frac {-b+2 c x}{2 \sqrt {c}}\right ) \left (\cosh \left (a+\frac {b^2}{4 c}\right )-\sinh \left (a+\frac {b^2}{4 c}\right )\right )+\left (b^2+2 c\right ) \sqrt {\pi } \text {erf}\left (\frac {-b+2 c x}{2 \sqrt {c}}\right ) \left (\cosh \left (a+\frac {b^2}{4 c}\right )+\sinh \left (a+\frac {b^2}{4 c}\right )\right )-4 \sqrt {c} (b+2 c x) \sinh (a+x (b-c x))}{16 c^{5/2}} \] Input:

Integrate[x^2*Cosh[a + b*x - c*x^2],x]
 

Output:

((b^2 - 2*c)*Sqrt[Pi]*Erfi[(-b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a + b^2/(4*c)] 
- Sinh[a + b^2/(4*c)]) + (b^2 + 2*c)*Sqrt[Pi]*Erf[(-b + 2*c*x)/(2*Sqrt[c]) 
]*(Cosh[a + b^2/(4*c)] + Sinh[a + b^2/(4*c)]) - 4*Sqrt[c]*(b + 2*c*x)*Sinh 
[a + x*(b - c*x)])/(16*c^(5/2))
 

Rubi [A] (verified)

Time = 0.83 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.08, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {5910, 5897, 2664, 2633, 2634, 5906, 5898, 2664, 2633, 2634}

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 x^2 \cosh \left (a+b x-c x^2\right ) \, dx\)

\(\Big \downarrow \) 5910

\(\displaystyle \frac {\int \sinh \left (-c x^2+b x+a\right )dx}{2 c}+\frac {b \int x \cosh \left (-c x^2+b x+a\right )dx}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 5897

\(\displaystyle \frac {\frac {1}{2} \int e^{-c x^2+b x+a}dx-\frac {1}{2} \int e^{c x^2-b x-a}dx}{2 c}+\frac {b \int x \cosh \left (-c x^2+b x+a\right )dx}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2664

\(\displaystyle \frac {\frac {1}{2} e^{a+\frac {b^2}{4 c}} \int e^{-\frac {(b-2 c x)^2}{4 c}}dx-\frac {1}{2} e^{-a-\frac {b^2}{4 c}} \int e^{\frac {(b-2 c x)^2}{4 c}}dx}{2 c}+\frac {b \int x \cosh \left (-c x^2+b x+a\right )dx}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2633

\(\displaystyle \frac {\frac {1}{2} e^{a+\frac {b^2}{4 c}} \int e^{-\frac {(b-2 c x)^2}{4 c}}dx+\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}+\frac {b \int x \cosh \left (-c x^2+b x+a\right )dx}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2634

\(\displaystyle \frac {b \int x \cosh \left (-c x^2+b x+a\right )dx}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 5906

\(\displaystyle \frac {b \left (\frac {b \int \cosh \left (-c x^2+b x+a\right )dx}{2 c}-\frac {\sinh \left (a+b x-c x^2\right )}{2 c}\right )}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 5898

\(\displaystyle \frac {b \left (\frac {b \left (\frac {1}{2} \int e^{-c x^2+b x+a}dx+\frac {1}{2} \int e^{c x^2-b x-a}dx\right )}{2 c}-\frac {\sinh \left (a+b x-c x^2\right )}{2 c}\right )}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2664

\(\displaystyle \frac {b \left (\frac {b \left (\frac {1}{2} e^{a+\frac {b^2}{4 c}} \int e^{-\frac {(b-2 c x)^2}{4 c}}dx+\frac {1}{2} e^{-a-\frac {b^2}{4 c}} \int e^{\frac {(b-2 c x)^2}{4 c}}dx\right )}{2 c}-\frac {\sinh \left (a+b x-c x^2\right )}{2 c}\right )}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2633

\(\displaystyle \frac {b \left (\frac {b \left (\frac {1}{2} e^{a+\frac {b^2}{4 c}} \int e^{-\frac {(b-2 c x)^2}{4 c}}dx-\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}\right )}{2 c}-\frac {\sinh \left (a+b x-c x^2\right )}{2 c}\right )}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

\(\Big \downarrow \) 2634

\(\displaystyle \frac {b \left (\frac {b \left (-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}\right )}{2 c}-\frac {\sinh \left (a+b x-c x^2\right )}{2 c}\right )}{2 c}+\frac {\frac {\sqrt {\pi } e^{-a-\frac {b^2}{4 c}} \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{a+\frac {b^2}{4 c}} \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{2 c}-\frac {x \sinh \left (a+b x-c x^2\right )}{2 c}\)

Input:

Int[x^2*Cosh[a + b*x - c*x^2],x]
 

Output:

(-1/4*(E^(a + b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/Sqrt[c] + 
(E^(-a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b - 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c]))/( 
2*c) - (x*Sinh[a + b*x - c*x^2])/(2*c) + (b*((b*(-1/4*(E^(a + b^2/(4*c))*S 
qrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/Sqrt[c] - (E^(-a - b^2/(4*c))*Sqrt[P 
i]*Erfi[(b - 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c])))/(2*c) - Sinh[a + b*x - c*x 
^2]/(2*c)))/(2*c)
 

Defintions of rubi rules used

rule 2633
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{ 
F, a, b, c, d}, x] && PosQ[b]
 

rule 2634
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F], 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; Fr 
eeQ[{F, a, b, c, d}, x] && NegQ[b]
 

rule 2664
Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[F^(a - b^2/ 
(4*c))   Int[F^((b + 2*c*x)^2/(4*c)), x], x] /; FreeQ[{F, a, b, c}, x]
 

rule 5897
Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[1/2   Int[E^ 
(a + b*x + c*x^2), x], x] - Simp[1/2   Int[E^(-a - b*x - c*x^2), x], x] /; 
FreeQ[{a, b, c}, x]
 

rule 5898
Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[1/2   Int[E^ 
(a + b*x + c*x^2), x], x] + Simp[1/2   Int[E^(-a - b*x - c*x^2), x], x] /; 
FreeQ[{a, b, c}, x]
 

rule 5906
Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]*((d_.) + (e_.)*(x_)), x_Symbol] 
 :> Simp[e*(Sinh[a + b*x + c*x^2]/(2*c)), x] - Simp[(b*e - 2*c*d)/(2*c)   I 
nt[Cosh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*e - 
2*c*d, 0]
 

rule 5910
Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]*((d_.) + (e_.)*(x_))^(m_), x_Sy 
mbol] :> Simp[e*(d + e*x)^(m - 1)*(Sinh[a + b*x + c*x^2]/(2*c)), x] + (-Sim 
p[(b*e - 2*c*d)/(2*c)   Int[(d + e*x)^(m - 1)*Cosh[a + b*x + c*x^2], x], x] 
 - Simp[e^2*((m - 1)/(2*c))   Int[(d + e*x)^(m - 2)*Sinh[a + b*x + c*x^2], 
x], x]) /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1] && NeQ[b*e - 2*c*d, 0]
 
Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.07

method result size
risch \(\frac {x \,{\mathrm e}^{c \,x^{2}-b x -a}}{4 c}+\frac {b \,{\mathrm e}^{c \,x^{2}-b x -a}}{8 c^{2}}+\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c +b^{2}}{4 c}} \operatorname {erf}\left (\sqrt {-c}\, x +\frac {b}{2 \sqrt {-c}}\right )}{16 c^{2} \sqrt {-c}}-\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c +b^{2}}{4 c}} \operatorname {erf}\left (\sqrt {-c}\, x +\frac {b}{2 \sqrt {-c}}\right )}{8 c \sqrt {-c}}-\frac {x \,{\mathrm e}^{-c \,x^{2}+b x +a}}{4 c}-\frac {b \,{\mathrm e}^{-c \,x^{2}+b x +a}}{8 c^{2}}-\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +b^{2}}{4 c}} \operatorname {erf}\left (-\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{16 c^{\frac {5}{2}}}-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +b^{2}}{4 c}} \operatorname {erf}\left (-\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{8 c^{\frac {3}{2}}}\) \(244\)

Input:

int(x^2*cosh(-c*x^2+b*x+a),x,method=_RETURNVERBOSE)
 

Output:

1/4/c*x*exp(c*x^2-b*x-a)+1/8*b/c^2*exp(c*x^2-b*x-a)+1/16*b^2/c^2*Pi^(1/2)* 
exp(-1/4*(4*a*c+b^2)/c)/(-c)^(1/2)*erf((-c)^(1/2)*x+1/2*b/(-c)^(1/2))-1/8/ 
c*Pi^(1/2)*exp(-1/4*(4*a*c+b^2)/c)/(-c)^(1/2)*erf((-c)^(1/2)*x+1/2*b/(-c)^ 
(1/2))-1/4/c*x*exp(-c*x^2+b*x+a)-1/8*b/c^2*exp(-c*x^2+b*x+a)-1/16*b^2/c^(5 
/2)*Pi^(1/2)*exp(1/4*(4*a*c+b^2)/c)*erf(-c^(1/2)*x+1/2*b/c^(1/2))-1/8/c^(3 
/2)*Pi^(1/2)*exp(1/4*(4*a*c+b^2)/c)*erf(-c^(1/2)*x+1/2*b/c^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 466 vs. \(2 (179) = 358\).

Time = 0.09 (sec) , antiderivative size = 466, normalized size of antiderivative = 2.05 \[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {4 \, c^{2} x - 2 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right )^{2} + \sqrt {\pi } {\left ({\left (b^{2} - 2 \, c\right )} \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) - {\left (b^{2} - 2 \, c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) + {\left ({\left (b^{2} - 2 \, c\right )} \cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) - {\left (b^{2} - 2 \, c\right )} \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt {-c} \operatorname {erf}\left (\frac {{\left (2 \, c x - b\right )} \sqrt {-c}}{2 \, c}\right ) - \sqrt {\pi } {\left ({\left (b^{2} + 2 \, c\right )} \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) + {\left (b^{2} + 2 \, c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) + {\left ({\left (b^{2} + 2 \, c\right )} \cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) + {\left (b^{2} + 2 \, c\right )} \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt {c} \operatorname {erf}\left (\frac {2 \, c x - b}{2 \, \sqrt {c}}\right ) - 4 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (c x^{2} - b x - a\right ) - 2 \, {\left (2 \, c^{2} x + b c\right )} \sinh \left (c x^{2} - b x - a\right )^{2} + 2 \, b c}{16 \, {\left (c^{3} \cosh \left (c x^{2} - b x - a\right ) + c^{3} \sinh \left (c x^{2} - b x - a\right )\right )}} \] Input:

integrate(x^2*cosh(-c*x^2+b*x+a),x, algorithm="fricas")
 

Output:

-1/16*(4*c^2*x - 2*(2*c^2*x + b*c)*cosh(c*x^2 - b*x - a)^2 + sqrt(pi)*((b^ 
2 - 2*c)*cosh(c*x^2 - b*x - a)*cosh(1/4*(b^2 + 4*a*c)/c) - (b^2 - 2*c)*cos 
h(c*x^2 - b*x - a)*sinh(1/4*(b^2 + 4*a*c)/c) + ((b^2 - 2*c)*cosh(1/4*(b^2 
+ 4*a*c)/c) - (b^2 - 2*c)*sinh(1/4*(b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x - a) 
)*sqrt(-c)*erf(1/2*(2*c*x - b)*sqrt(-c)/c) - sqrt(pi)*((b^2 + 2*c)*cosh(c* 
x^2 - b*x - a)*cosh(1/4*(b^2 + 4*a*c)/c) + (b^2 + 2*c)*cosh(c*x^2 - b*x - 
a)*sinh(1/4*(b^2 + 4*a*c)/c) + ((b^2 + 2*c)*cosh(1/4*(b^2 + 4*a*c)/c) + (b 
^2 + 2*c)*sinh(1/4*(b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x - a))*sqrt(c)*erf(1/ 
2*(2*c*x - b)/sqrt(c)) - 4*(2*c^2*x + b*c)*cosh(c*x^2 - b*x - a)*sinh(c*x^ 
2 - b*x - a) - 2*(2*c^2*x + b*c)*sinh(c*x^2 - b*x - a)^2 + 2*b*c)/(c^3*cos 
h(c*x^2 - b*x - a) + c^3*sinh(c*x^2 - b*x - a))
 

Sympy [F]

\[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=\int x^{2} \cosh {\left (a + b x - c x^{2} \right )}\, dx \] Input:

integrate(x**2*cosh(-c*x**2+b*x+a),x)
 

Output:

Integral(x**2*cosh(a + b*x - c*x**2), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 834 vs. \(2 (179) = 358\).

Time = 0.34 (sec) , antiderivative size = 834, normalized size of antiderivative = 3.67 \[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=\text {Too large to display} \] Input:

integrate(x^2*cosh(-c*x^2+b*x+a),x, algorithm="maxima")
 

Output:

1/3*x^3*cosh(c*x^2 - b*x - a) - 1/96*(sqrt(pi)*(2*c*x - b)*b^3*(erf(1/2*sq 
rt((2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*(-c)^(7/2)) - 6*b^2*c*e^( 
-1/4*(2*c*x - b)^2/c)/(-c)^(7/2) - 12*(2*c*x - b)^3*b*gamma(3/2, 1/4*(2*c* 
x - b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(7/2)) - 8*c^2*gamma(2, 1/4*(2*c 
*x - b)^2/c)/(-c)^(7/2))*b*e^(a + 1/4*b^2/c)/sqrt(-c) - 1/96*(sqrt(pi)*(2* 
c*x - b)*b^4*(erf(1/2*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*( 
-c)^(9/2)) - 8*b^3*c*e^(-1/4*(2*c*x - b)^2/c)/(-c)^(9/2) - 24*(2*c*x - b)^ 
3*b^2*gamma(3/2, 1/4*(2*c*x - b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(9/2)) 
 - 32*b*c^2*gamma(2, 1/4*(2*c*x - b)^2/c)/(-c)^(9/2) - 16*(2*c*x - b)^5*ga 
mma(5/2, 1/4*(2*c*x - b)^2/c)/(((2*c*x - b)^2/c)^(5/2)*(-c)^(9/2)))*c*e^(a 
 + 1/4*b^2/c)/sqrt(-c) + 1/96*(sqrt(pi)*(2*c*x - b)*b^3*(erf(1/2*sqrt(-(2* 
c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(7/2)) + 6*b^2*e^(1/4*(2*c*x 
 - b)^2/c)/c^(5/2) - 12*(2*c*x - b)^3*b*gamma(3/2, -1/4*(2*c*x - b)^2/c)/( 
(-(2*c*x - b)^2/c)^(3/2)*c^(7/2)) - 8*gamma(2, -1/4*(2*c*x - b)^2/c)/c^(3/ 
2))*b*e^(-a - 1/4*b^2/c)/sqrt(c) - 1/96*(sqrt(pi)*(2*c*x - b)*b^4*(erf(1/2 
*sqrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(9/2)) + 8*b^3*e^( 
1/4*(2*c*x - b)^2/c)/c^(7/2) - 24*(2*c*x - b)^3*b^2*gamma(3/2, -1/4*(2*c*x 
 - b)^2/c)/((-(2*c*x - b)^2/c)^(3/2)*c^(9/2)) - 32*b*gamma(2, -1/4*(2*c*x 
- b)^2/c)/c^(5/2) - 16*(2*c*x - b)^5*gamma(5/2, -1/4*(2*c*x - b)^2/c)/((-( 
2*c*x - b)^2/c)^(5/2)*c^(9/2)))*sqrt(c)*e^(-a - 1/4*b^2/c)
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.74 \[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {\frac {\sqrt {\pi } {\left (b^{2} + 2 \, c\right )} \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (\frac {b^{2} + 4 \, a c}{4 \, c}\right )}}{\sqrt {c}} + 2 \, {\left (c {\left (2 \, x - \frac {b}{c}\right )} + 2 \, b\right )} e^{\left (-c x^{2} + b x + a\right )}}{16 \, c^{2}} - \frac {\frac {\sqrt {\pi } {\left (b^{2} - 2 \, c\right )} \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {-c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (-\frac {b^{2} + 4 \, a c}{4 \, c}\right )}}{\sqrt {-c}} - 2 \, {\left (c {\left (2 \, x - \frac {b}{c}\right )} + 2 \, b\right )} e^{\left (c x^{2} - b x - a\right )}}{16 \, c^{2}} \] Input:

integrate(x^2*cosh(-c*x^2+b*x+a),x, algorithm="giac")
 

Output:

-1/16*(sqrt(pi)*(b^2 + 2*c)*erf(-1/2*sqrt(c)*(2*x - b/c))*e^(1/4*(b^2 + 4* 
a*c)/c)/sqrt(c) + 2*(c*(2*x - b/c) + 2*b)*e^(-c*x^2 + b*x + a))/c^2 - 1/16 
*(sqrt(pi)*(b^2 - 2*c)*erf(-1/2*sqrt(-c)*(2*x - b/c))*e^(-1/4*(b^2 + 4*a*c 
)/c)/sqrt(-c) - 2*(c*(2*x - b/c) + 2*b)*e^(c*x^2 - b*x - a))/c^2
 

Mupad [F(-1)]

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

int(x^2*cosh(a + b*x - c*x^2),x)
 

Output:

int(x^2*cosh(a + b*x - c*x^2), x)
 

Reduce [F]

\[ \int x^2 \cosh \left (a+b x-c x^2\right ) \, dx=\frac {\sqrt {\pi }\, e^{\frac {4 c^{2} x^{2}+4 b c x +8 a c +b^{2}}{4 c}} \mathrm {erf}\left (\frac {2 c x -b}{2 \sqrt {c}}\right ) b^{2}+2 \sqrt {\pi }\, e^{\frac {4 c^{2} x^{2}+4 b c x +8 a c +b^{2}}{4 c}} \mathrm {erf}\left (\frac {2 c x -b}{2 \sqrt {c}}\right ) c -2 e^{2 b x +2 a} \sqrt {c}\, b -4 e^{2 b x +2 a} \sqrt {c}\, c x +2 e^{c \,x^{2}+b x} \sqrt {c}\, \left (\int \frac {e^{c \,x^{2}}}{e^{b x}}d x \right ) b^{2}-4 e^{c \,x^{2}+b x} \sqrt {c}\, \left (\int \frac {e^{c \,x^{2}}}{e^{b x}}d x \right ) c +2 e^{2 c \,x^{2}} \sqrt {c}\, b +4 e^{2 c \,x^{2}} \sqrt {c}\, c x}{16 e^{c \,x^{2}+b x +a} \sqrt {c}\, c^{2}} \] Input:

int(x^2*cosh(-c*x^2+b*x+a),x)
 

Output:

(sqrt(pi)*e**((8*a*c + b**2 + 4*b*c*x + 4*c**2*x**2)/(4*c))*erf(( - b + 2* 
c*x)/(2*sqrt(c)))*b**2 + 2*sqrt(pi)*e**((8*a*c + b**2 + 4*b*c*x + 4*c**2*x 
**2)/(4*c))*erf(( - b + 2*c*x)/(2*sqrt(c)))*c - 2*e**(2*a + 2*b*x)*sqrt(c) 
*b - 4*e**(2*a + 2*b*x)*sqrt(c)*c*x + 2*e**(b*x + c*x**2)*sqrt(c)*int(e**( 
c*x**2)/e**(b*x),x)*b**2 - 4*e**(b*x + c*x**2)*sqrt(c)*int(e**(c*x**2)/e** 
(b*x),x)*c + 2*e**(2*c*x**2)*sqrt(c)*b + 4*e**(2*c*x**2)*sqrt(c)*c*x)/(16* 
e**(a + b*x + c*x**2)*sqrt(c)*c**2)