Integrand size = 14, antiderivative size = 110 \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {x}{2}-\frac {e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{8 \sqrt {c}}-\frac {e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{8 \sqrt {c}} \] Output:
1/2*x-1/16*exp(2*a+1/2*b^2/c)*2^(1/2)*Pi^(1/2)*erf(1/2*(-2*c*x+b)*2^(1/2)/ c^(1/2))/c^(1/2)-1/16*exp(-2*a-1/2*b^2/c)*2^(1/2)*Pi^(1/2)*erfi(1/2*(-2*c* x+b)*2^(1/2)/c^(1/2))/c^(1/2)
Time = 0.10 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.31 \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {4 \sqrt {2} \sqrt {c} x+\sqrt {\pi } \text {erfi}\left (\frac {-b+2 c x}{\sqrt {2} \sqrt {c}}\right ) \left (\cosh \left (2 a+\frac {b^2}{2 c}\right )-\sinh \left (2 a+\frac {b^2}{2 c}\right )\right )+\sqrt {\pi } \text {erf}\left (\frac {-b+2 c x}{\sqrt {2} \sqrt {c}}\right ) \left (\cosh \left (2 a+\frac {b^2}{2 c}\right )+\sinh \left (2 a+\frac {b^2}{2 c}\right )\right )}{8 \sqrt {2} \sqrt {c}} \] Input:
Integrate[Cosh[a + b*x - c*x^2]^2,x]
Output:
(4*Sqrt[2]*Sqrt[c]*x + Sqrt[Pi]*Erfi[(-b + 2*c*x)/(Sqrt[2]*Sqrt[c])]*(Cosh [2*a + b^2/(2*c)] - Sinh[2*a + b^2/(2*c)]) + Sqrt[Pi]*Erf[(-b + 2*c*x)/(Sq rt[2]*Sqrt[c])]*(Cosh[2*a + b^2/(2*c)] + Sinh[2*a + b^2/(2*c)]))/(8*Sqrt[2 ]*Sqrt[c])
Time = 0.26 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {5900, 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 \cosh ^2\left (a+b x-c x^2\right ) \, dx\) |
\(\Big \downarrow \) 5900 |
\(\displaystyle \int \left (\frac {1}{2} \cosh \left (2 a+2 b x-2 c x^2\right )+\frac {1}{2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\sqrt {\frac {\pi }{2}} e^{2 a+\frac {b^2}{2 c}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{8 \sqrt {c}}-\frac {\sqrt {\frac {\pi }{2}} e^{-2 a-\frac {b^2}{2 c}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{8 \sqrt {c}}+\frac {x}{2}\) |
Input:
Int[Cosh[a + b*x - c*x^2]^2,x]
Output:
x/2 - (E^(2*a + b^2/(2*c))*Sqrt[Pi/2]*Erf[(b - 2*c*x)/(Sqrt[2]*Sqrt[c])])/ (8*Sqrt[c]) - (E^(-2*a - b^2/(2*c))*Sqrt[Pi/2]*Erfi[(b - 2*c*x)/(Sqrt[2]*S qrt[c])])/(8*Sqrt[c])
Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]^(n_), x_Symbol] :> Int[ExpandTr igReduce[Cosh[a + b*x + c*x^2]^n, x], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 1]
Time = 0.96 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.82
method | result | size |
risch | \(\frac {x}{2}+\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c +b^{2}}{2 c}} \operatorname {erf}\left (\sqrt {-2 c}\, x +\frac {b}{\sqrt {-2 c}}\right )}{8 \sqrt {-2 c}}-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +b^{2}}{2 c}} \sqrt {2}\, \operatorname {erf}\left (-\sqrt {2}\, \sqrt {c}\, x +\frac {b \sqrt {2}}{2 \sqrt {c}}\right )}{16 \sqrt {c}}\) | \(90\) |
Input:
int(cosh(-c*x^2+b*x+a)^2,x,method=_RETURNVERBOSE)
Output:
1/2*x+1/8*Pi^(1/2)*exp(-1/2*(4*a*c+b^2)/c)/(-2*c)^(1/2)*erf((-2*c)^(1/2)*x +b/(-2*c)^(1/2))-1/16*Pi^(1/2)*exp(1/2*(4*a*c+b^2)/c)*2^(1/2)/c^(1/2)*erf( -2^(1/2)*c^(1/2)*x+1/2*b*2^(1/2)/c^(1/2))
Time = 0.10 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.20 \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=-\frac {\sqrt {2} \sqrt {\pi } \sqrt {-c} {\left (\cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) - \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )} \sqrt {-c}}{2 \, c}\right ) - \sqrt {2} \sqrt {\pi } \sqrt {c} {\left (\cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )}}{2 \, \sqrt {c}}\right ) - 8 \, c x}{16 \, c} \] Input:
integrate(cosh(-c*x^2+b*x+a)^2,x, algorithm="fricas")
Output:
-1/16*(sqrt(2)*sqrt(pi)*sqrt(-c)*(cosh(1/2*(b^2 + 4*a*c)/c) - sinh(1/2*(b^ 2 + 4*a*c)/c))*erf(1/2*sqrt(2)*(2*c*x - b)*sqrt(-c)/c) - sqrt(2)*sqrt(pi)* sqrt(c)*(cosh(1/2*(b^2 + 4*a*c)/c) + sinh(1/2*(b^2 + 4*a*c)/c))*erf(1/2*sq rt(2)*(2*c*x - b)/sqrt(c)) - 8*c*x)/c
\[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\int \cosh ^{2}{\left (a + b x - c x^{2} \right )}\, dx \] Input:
integrate(cosh(-c*x**2+b*x+a)**2,x)
Output:
Integral(cosh(a + b*x - c*x**2)**2, x)
Time = 0.12 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.87 \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} \sqrt {c} x - \frac {\sqrt {2} b}{2 \, \sqrt {c}}\right ) e^{\left (2 \, a + \frac {b^{2}}{2 \, c}\right )}}{16 \, \sqrt {c}} + \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} \sqrt {-c} x + \frac {\sqrt {2} b}{2 \, \sqrt {-c}}\right ) e^{\left (-2 \, a - \frac {b^{2}}{2 \, c}\right )}}{16 \, \sqrt {-c}} + \frac {1}{2} \, x \] Input:
integrate(cosh(-c*x^2+b*x+a)^2,x, algorithm="maxima")
Output:
1/16*sqrt(2)*sqrt(pi)*erf(sqrt(2)*sqrt(c)*x - 1/2*sqrt(2)*b/sqrt(c))*e^(2* a + 1/2*b^2/c)/sqrt(c) + 1/16*sqrt(2)*sqrt(pi)*erf(sqrt(2)*sqrt(-c)*x + 1/ 2*sqrt(2)*b/sqrt(-c))*e^(-2*a - 1/2*b^2/c)/sqrt(-c) + 1/2*x
Time = 0.11 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.87 \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=-\frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} \sqrt {c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )}}{16 \, \sqrt {c}} - \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} \sqrt {-c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (-\frac {b^{2} + 4 \, a c}{2 \, c}\right )}}{16 \, \sqrt {-c}} + \frac {1}{2} \, x \] Input:
integrate(cosh(-c*x^2+b*x+a)^2,x, algorithm="giac")
Output:
-1/16*sqrt(2)*sqrt(pi)*erf(-1/2*sqrt(2)*sqrt(c)*(2*x - b/c))*e^(1/2*(b^2 + 4*a*c)/c)/sqrt(c) - 1/16*sqrt(2)*sqrt(pi)*erf(-1/2*sqrt(2)*sqrt(-c)*(2*x - b/c))*e^(-1/2*(b^2 + 4*a*c)/c)/sqrt(-c) + 1/2*x
Timed out. \[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\int {\mathrm {cosh}\left (-c\,x^2+b\,x+a\right )}^2 \,d x \] Input:
int(cosh(a + b*x - c*x^2)^2,x)
Output:
int(cosh(a + b*x - c*x^2)^2, x)
\[ \int \cosh ^2\left (a+b x-c x^2\right ) \, dx=\int \cosh \left (-c \,x^{2}+b x +a \right )^{2}d x \] Input:
int(cosh(-c*x^2+b*x+a)^2,x)
Output:
int(cosh(a + b*x - c*x**2)**2,x)