Integrand size = 12, antiderivative size = 91 \[ \int \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {e^{a+\frac {b^2}{4 c}} \sqrt {\pi } \text {erf}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {e^{-a-\frac {b^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}} \] Output:
-1/4*exp(a+1/4*b^2/c)*Pi^(1/2)*erf(1/2*(-2*c*x+b)/c^(1/2))/c^(1/2)-1/4*exp (-a-1/4*b^2/c)*Pi^(1/2)*erfi(1/2*(-2*c*x+b)/c^(1/2))/c^(1/2)
Time = 0.05 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.20 \[ \int \cosh \left (a+b x-c x^2\right ) \, dx=\frac {\sqrt {\pi } \left (\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 )+\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 )\right )}{4 \sqrt {c}} \] Input:
Integrate[Cosh[a + b*x - c*x^2],x]
Output:
(Sqrt[Pi]*(Erfi[(-b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a + b^2/(4*c)] - Sinh[a + b^2/(4*c)]) + Erf[(-b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a + b^2/(4*c)] + Sinh[a + b^2/(4*c)])))/(4*Sqrt[c])
Time = 0.29 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {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 \cosh \left (a+b x-c x^2\right ) \, dx\) |
\(\Big \downarrow \) 5898 |
\(\displaystyle \frac {1}{2} \int e^{-c x^2+b x+a}dx+\frac {1}{2} \int e^{c x^2-b x-a}dx\) |
\(\Big \downarrow \) 2664 |
\(\displaystyle \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\) |
\(\Big \downarrow \) 2633 |
\(\displaystyle \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}}\) |
\(\Big \downarrow \) 2634 |
\(\displaystyle -\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}}\) |
Input:
Int[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])
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]
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]
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]
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]
Time = 0.26 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.87
method | result | size |
risch | \(\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 )}{4 \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 )}{4 \sqrt {c}}\) | \(79\) |
Input:
int(cosh(-c*x^2+b*x+a),x,method=_RETURNVERBOSE)
Output:
1/4*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*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))
Time = 0.08 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.27 \[ \int \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {\sqrt {\pi } \sqrt {-c} {\left (\cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) - \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {{\left (2 \, c x - b\right )} \sqrt {-c}}{2 \, c}\right ) - \sqrt {\pi } \sqrt {c} {\left (\cosh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right ) + \sinh \left (\frac {b^{2} + 4 \, a c}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 \, c x - b}{2 \, \sqrt {c}}\right )}{4 \, c} \] Input:
integrate(cosh(-c*x^2+b*x+a),x, algorithm="fricas")
Output:
-1/4*(sqrt(pi)*sqrt(-c)*(cosh(1/4*(b^2 + 4*a*c)/c) - sinh(1/4*(b^2 + 4*a*c )/c))*erf(1/2*(2*c*x - b)*sqrt(-c)/c) - sqrt(pi)*sqrt(c)*(cosh(1/4*(b^2 + 4*a*c)/c) + sinh(1/4*(b^2 + 4*a*c)/c))*erf(1/2*(2*c*x - b)/sqrt(c)))/c
\[ \int \cosh \left (a+b x-c x^2\right ) \, dx=\int \cosh {\left (a + b x - c x^{2} \right )}\, dx \] Input:
integrate(cosh(-c*x**2+b*x+a),x)
Output:
Integral(cosh(a + b*x - c*x**2), x)
Leaf count of result is larger than twice the leaf count of optimal. 511 vs. \(2 (69) = 138\).
Time = 0.29 (sec) , antiderivative size = 511, normalized size of antiderivative = 5.62 \[ \int \cosh \left (a+b x-c x^2\right ) \, dx =\text {Too large to display} \] Input:
integrate(cosh(-c*x^2+b*x+a),x, algorithm="maxima")
Output:
-1/8*(sqrt(pi)*(2*c*x - b)*b*(erf(1/2*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2 *c*x - b)^2/c)*(-c)^(3/2)) - 2*c*e^(-1/4*(2*c*x - b)^2/c)/(-c)^(3/2))*b*e^ (a + 1/4*b^2/c)/sqrt(-c) - 1/8*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*sqrt((2* c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*(-c)^(5/2)) - 4*b*c*e^(-1/4*(2* c*x - b)^2/c)/(-c)^(5/2) - 4*(2*c*x - b)^3*gamma(3/2, 1/4*(2*c*x - b)^2/c) /(((2*c*x - b)^2/c)^(3/2)*(-c)^(5/2)))*c*e^(a + 1/4*b^2/c)/sqrt(-c) + 1/8* (sqrt(pi)*(2*c*x - b)*b*(erf(1/2*sqrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c* x - b)^2/c)*c^(3/2)) + 2*e^(1/4*(2*c*x - b)^2/c)/sqrt(c))*b*e^(-a - 1/4*b^ 2/c)/sqrt(c) - 1/8*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*sqrt(-(2*c*x - b)^2/ c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(5/2)) + 4*b*e^(1/4*(2*c*x - b)^2/c)/c^ (3/2) - 4*(2*c*x - b)^3*gamma(3/2, -1/4*(2*c*x - b)^2/c)/((-(2*c*x - b)^2/ c)^(3/2)*c^(5/2)))*sqrt(c)*e^(-a - 1/4*b^2/c) + x*cosh(c*x^2 - b*x - a)
Time = 0.11 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.89 \[ \int \cosh \left (a+b x-c x^2\right ) \, dx=-\frac {\sqrt {\pi } \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 )}}{4 \, \sqrt {c}} - \frac {\sqrt {\pi } \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 )}}{4 \, \sqrt {-c}} \] Input:
integrate(cosh(-c*x^2+b*x+a),x, algorithm="giac")
Output:
-1/4*sqrt(pi)*erf(-1/2*sqrt(c)*(2*x - b/c))*e^(1/4*(b^2 + 4*a*c)/c)/sqrt(c ) - 1/4*sqrt(pi)*erf(-1/2*sqrt(-c)*(2*x - b/c))*e^(-1/4*(b^2 + 4*a*c)/c)/s qrt(-c)
Timed out. \[ \int \cosh \left (a+b x-c x^2\right ) \, dx=\int \mathrm {cosh}\left (-c\,x^2+b\,x+a\right ) \,d x \] Input:
int(cosh(a + b*x - c*x^2),x)
Output:
int(cosh(a + b*x - c*x^2), x)
\[ \int \cosh \left (a+b x-c x^2\right ) \, dx=\int \cosh \left (-c \,x^{2}+b x +a \right )d x \] Input:
int(cosh(-c*x^2+b*x+a),x)
Output:
int(cosh(a + b*x - c*x**2),x)