Integrand size = 17, antiderivative size = 128 \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\frac {(2 c d-b e) 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 {(2 c d-b e) 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 {e \sinh \left (a+b x+c x^2\right )}{2 c} \] Output:
1/8*(-b*e+2*c*d)*exp(-a+1/4*b^2/c)*Pi^(1/2)*erf(1/2*(2*c*x+b)/c^(1/2))/c^( 3/2)+1/8*(-b*e+2*c*d)*exp(a-1/4*b^2/c)*Pi^(1/2)*erfi(1/2*(2*c*x+b)/c^(1/2) )/c^(3/2)+1/2*e*sinh(c*x^2+b*x+a)/c
Time = 0.15 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.14 \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\frac {(2 c d-b e) \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 )+(2 c d-b e) \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 )+4 \sqrt {c} e \sinh (a+x (b+c x))}{8 c^{3/2}} \] Input:
Integrate[(d + e*x)*Cosh[a + b*x + c*x^2],x]
Output:
((2*c*d - b*e)*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])]*(Cosh[a - b^2/(4*c)] - Sinh[a - b^2/(4*c)]) + (2*c*d - b*e)*Sqrt[Pi]*Erfi[(b + 2*c*x)/(2*Sqrt[c ])]*(Cosh[a - b^2/(4*c)] + Sinh[a - b^2/(4*c)]) + 4*Sqrt[c]*e*Sinh[a + x*( b + c*x)])/(8*c^(3/2))
Time = 0.39 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {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 (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx\) |
\(\Big \downarrow \) 5906 |
\(\displaystyle \frac {(2 c d-b e) \int \cosh \left (c x^2+b x+a\right )dx}{2 c}+\frac {e \sinh \left (a+b x+c x^2\right )}{2 c}\) |
\(\Big \downarrow \) 5898 |
\(\displaystyle \frac {(2 c d-b e) \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 {e \sinh \left (a+b x+c x^2\right )}{2 c}\) |
\(\Big \downarrow \) 2664 |
\(\displaystyle \frac {(2 c d-b e) \left (\frac {1}{2} e^{\frac {b^2}{4 c}-a} \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 {e \sinh \left (a+b x+c x^2\right )}{2 c}\) |
\(\Big \downarrow \) 2633 |
\(\displaystyle \frac {(2 c d-b e) \left (\frac {1}{2} e^{\frac {b^2}{4 c}-a} \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 {e \sinh \left (a+b x+c x^2\right )}{2 c}\) |
\(\Big \downarrow \) 2634 |
\(\displaystyle \frac {(2 c d-b e) \left (\frac {\sqrt {\pi } e^{\frac {b^2}{4 c}-a} \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 {e \sinh \left (a+b x+c x^2\right )}{2 c}\) |
Input:
Int[(d + e*x)*Cosh[a + b*x + c*x^2],x]
Output:
((2*c*d - b*e)*((E^(-a + b^2/(4*c))*Sqrt[Pi]*Erf[(b + 2*c*x)/(2*Sqrt[c])]) /(4*Sqrt[c]) + (E^(a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b + 2*c*x)/(2*Sqrt[c])])/ (4*Sqrt[c])))/(2*c) + (e*Sinh[a + b*x + c*x^2])/(2*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]
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]
Time = 0.46 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.56
method | result | size |
risch | \(\frac {\operatorname {erf}\left (\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right ) \sqrt {\pi }\, d \,{\mathrm e}^{-\frac {4 a c -b^{2}}{4 c}}}{4 \sqrt {c}}-\frac {{\mathrm e}^{-a} e \,{\mathrm e}^{-x \left (c x +b \right )}}{4 c}-\frac {{\mathrm e}^{-a} e b \sqrt {\pi }\, {\mathrm e}^{\frac {b^{2}}{4 c}} \operatorname {erf}\left (\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{8 c^{\frac {3}{2}}}-\frac {\operatorname {erf}\left (-\sqrt {-c}\, x +\frac {b}{2 \sqrt {-c}}\right ) \sqrt {\pi }\, d \,{\mathrm e}^{\frac {4 a c -b^{2}}{4 c}}}{4 \sqrt {-c}}+\frac {{\mathrm e}^{a} e \,{\mathrm e}^{x \left (c x +b \right )}}{4 c}+\frac {{\mathrm e}^{a} e b \sqrt {\pi }\, {\mathrm e}^{-\frac {b^{2}}{4 c}} \operatorname {erf}\left (-\sqrt {-c}\, x +\frac {b}{2 \sqrt {-c}}\right )}{8 c \sqrt {-c}}\) | \(200\) |
Input:
int((e*x+d)*cosh(c*x^2+b*x+a),x,method=_RETURNVERBOSE)
Output:
1/4*erf(c^(1/2)*x+1/2*b/c^(1/2))/c^(1/2)*Pi^(1/2)*d*exp(-1/4*(4*a*c-b^2)/c )-1/4*exp(-a)*e/c*exp(-x*(c*x+b))-1/8*exp(-a)*e*b/c^(3/2)*Pi^(1/2)*exp(1/4 *b^2/c)*erf(c^(1/2)*x+1/2*b/c^(1/2))-1/4*erf(-(-c)^(1/2)*x+1/2*b/(-c)^(1/2 ))/(-c)^(1/2)*Pi^(1/2)*d*exp(1/4*(4*a*c-b^2)/c)+1/4*exp(a)*e/c*exp(x*(c*x+ b))+1/8*exp(a)*e*b/c*Pi^(1/2)*exp(-1/4*b^2/c)/(-c)^(1/2)*erf(-(-c)^(1/2)*x +1/2*b/(-c)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 412 vs. \(2 (100) = 200\).
Time = 0.09 (sec) , antiderivative size = 412, normalized size of antiderivative = 3.22 \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\frac {2 \, c e \cosh \left (c x^{2} + b x + a\right )^{2} + 4 \, c e \cosh \left (c x^{2} + b x + a\right ) \sinh \left (c x^{2} + b x + a\right ) + 2 \, c e \sinh \left (c x^{2} + b x + a\right )^{2} - \sqrt {\pi } {\left ({\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + {\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + {\left ({\left (2 \, c d - b e\right )} \cosh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + {\left (2 \, c d - b e\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 (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \cosh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) - {\left (2 \, c d - b e\right )} \cosh \left (c x^{2} + b x + a\right ) \sinh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) + {\left ({\left (2 \, c d - b e\right )} \cosh \left (-\frac {b^{2} - 4 \, a c}{4 \, c}\right ) - {\left (2 \, c d - b e\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 ) - 2 \, c e}{8 \, {\left (c^{2} \cosh \left (c x^{2} + b x + a\right ) + c^{2} \sinh \left (c x^{2} + b x + a\right )\right )}} \] Input:
integrate((e*x+d)*cosh(c*x^2+b*x+a),x, algorithm="fricas")
Output:
1/8*(2*c*e*cosh(c*x^2 + b*x + a)^2 + 4*c*e*cosh(c*x^2 + b*x + a)*sinh(c*x^ 2 + b*x + a) + 2*c*e*sinh(c*x^2 + b*x + a)^2 - sqrt(pi)*((2*c*d - b*e)*cos h(c*x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) + (2*c*d - b*e)*cosh(c*x^2 + b*x + a)*sinh(-1/4*(b^2 - 4*a*c)/c) + ((2*c*d - b*e)*cosh(-1/4*(b^2 - 4*a *c)/c) + (2*c*d - b*e)*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)*((2*c*d - b*e)*cosh(c* x^2 + b*x + a)*cosh(-1/4*(b^2 - 4*a*c)/c) - (2*c*d - b*e)*cosh(c*x^2 + b*x + a)*sinh(-1/4*(b^2 - 4*a*c)/c) + ((2*c*d - b*e)*cosh(-1/4*(b^2 - 4*a*c)/ c) - (2*c*d - b*e)*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)) - 2*c*e)/(c^2*cosh(c*x^2 + b*x + a) + c^2 *sinh(c*x^2 + b*x + a))
\[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\int \left (d + e x\right ) \cosh {\left (a + b x + c x^{2} \right )}\, dx \] Input:
integrate((e*x+d)*cosh(c*x**2+b*x+a),x)
Output:
Integral((d + e*x)*cosh(a + b*x + c*x**2), x)
Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (100) = 200\).
Time = 0.15 (sec) , antiderivative size = 254, normalized size of antiderivative = 1.98 \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\frac {\sqrt {\pi } d \operatorname {erf}\left (\sqrt {-c} x - \frac {b}{2 \, \sqrt {-c}}\right ) e^{\left (a - \frac {b^{2}}{4 \, c}\right )}}{4 \, \sqrt {-c}} + \frac {\sqrt {\pi } d \operatorname {erf}\left (\sqrt {c} x + \frac {b}{2 \, \sqrt {c}}\right ) e^{\left (-a + \frac {b^{2}}{4 \, c}\right )}}{4 \, \sqrt {c}} - \frac {{\left (\frac {\sqrt {\pi } {\left (2 \, c x + b\right )} b {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-\frac {{\left (2 \, c x + b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt {-\frac {{\left (2 \, c x + b\right )}^{2}}{c}} c^{\frac {3}{2}}} - \frac {2 \, e^{\left (\frac {{\left (2 \, c x + b\right )}^{2}}{4 \, c}\right )}}{\sqrt {c}}\right )} e e^{\left (a - \frac {b^{2}}{4 \, c}\right )}}{8 \, \sqrt {c}} - \frac {{\left (\frac {\sqrt {\pi } {\left (2 \, c x + b\right )} b {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {\frac {{\left (2 \, c x + b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt {\frac {{\left (2 \, c x + b\right )}^{2}}{c}} \left (-c\right )^{\frac {3}{2}}} + \frac {2 \, c e^{\left (-\frac {{\left (2 \, c x + b\right )}^{2}}{4 \, c}\right )}}{\left (-c\right )^{\frac {3}{2}}}\right )} e e^{\left (-a + \frac {b^{2}}{4 \, c}\right )}}{8 \, \sqrt {-c}} \] Input:
integrate((e*x+d)*cosh(c*x^2+b*x+a),x, algorithm="maxima")
Output:
1/4*sqrt(pi)*d*erf(sqrt(-c)*x - 1/2*b/sqrt(-c))*e^(a - 1/4*b^2/c)/sqrt(-c) + 1/4*sqrt(pi)*d*erf(sqrt(c)*x + 1/2*b/sqrt(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)/(sqr t(-(2*c*x + b)^2/c)*c^(3/2)) - 2*e^(1/4*(2*c*x + b)^2/c)/sqrt(c))*e*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*c*e^(-1/4*(2*c*x + b)^ 2/c)/(-c)^(3/2))*e*e^(-a + 1/4*b^2/c)/sqrt(-c)
Time = 0.12 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.09 \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=-\frac {\frac {\sqrt {\pi } {\left (2 \, c d - b e\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 \, e e^{\left (-c x^{2} - b x - a\right )}}{8 \, c} - \frac {\frac {\sqrt {\pi } {\left (2 \, c d - b e\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 \, e e^{\left (c x^{2} + b x + a\right )}}{8 \, c} \] Input:
integrate((e*x+d)*cosh(c*x^2+b*x+a),x, algorithm="giac")
Output:
-1/8*(sqrt(pi)*(2*c*d - b*e)*erf(-1/2*sqrt(c)*(2*x + b/c))*e^(1/4*(b^2 - 4 *a*c)/c)/sqrt(c) + 2*e*e^(-c*x^2 - b*x - a))/c - 1/8*(sqrt(pi)*(2*c*d - b* e)*erf(-1/2*sqrt(-c)*(2*x + b/c))*e^(-1/4*(b^2 - 4*a*c)/c)/sqrt(-c) - 2*e* e^(c*x^2 + b*x + a))/c
Timed out. \[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\int \mathrm {cosh}\left (c\,x^2+b\,x+a\right )\,\left (d+e\,x\right ) \,d x \] Input:
int(cosh(a + b*x + c*x^2)*(d + e*x),x)
Output:
int(cosh(a + b*x + c*x^2)*(d + e*x), x)
\[ \int (d+e x) \cosh \left (a+b x+c x^2\right ) \, dx=\frac {\sqrt {\pi }\, e^{c \,x^{2}+b x +2 a} \mathrm {erf}\left (\frac {2 c i x +b i}{2 \sqrt {c}}\right ) b e i -2 \sqrt {\pi }\, e^{c \,x^{2}+b x +2 a} \mathrm {erf}\left (\frac {2 c i x +b i}{2 \sqrt {c}}\right ) c d i +2 e^{\frac {8 c^{2} x^{2}+8 b c x +8 a c +b^{2}}{4 c}} \sqrt {c}\, e -2 e^{\frac {4 c^{2} x^{2}+4 b c x +b^{2}}{4 c}} \sqrt {c}\, \left (\int \frac {1}{e^{c \,x^{2}+b x}}d x \right ) b e +4 e^{\frac {4 c^{2} x^{2}+4 b c x +b^{2}}{4 c}} \sqrt {c}\, \left (\int \frac {1}{e^{c \,x^{2}+b x}}d x \right ) c d -2 e^{\frac {b^{2}}{4 c}} \sqrt {c}\, e}{8 e^{\frac {4 c^{2} x^{2}+4 b c x +4 a c +b^{2}}{4 c}} \sqrt {c}\, c} \] Input:
int((e*x+d)*cosh(c*x^2+b*x+a),x)
Output:
(sqrt(pi)*e**(2*a + b*x + c*x**2)*erf((b*i + 2*c*i*x)/(2*sqrt(c)))*b*e*i - 2*sqrt(pi)*e**(2*a + b*x + c*x**2)*erf((b*i + 2*c*i*x)/(2*sqrt(c)))*c*d*i + 2*e**((8*a*c + b**2 + 8*b*c*x + 8*c**2*x**2)/(4*c))*sqrt(c)*e - 2*e**(( b**2 + 4*b*c*x + 4*c**2*x**2)/(4*c))*sqrt(c)*int(1/e**(b*x + c*x**2),x)*b* e + 4*e**((b**2 + 4*b*c*x + 4*c**2*x**2)/(4*c))*sqrt(c)*int(1/e**(b*x + c* x**2),x)*c*d - 2*e**(b**2/(4*c))*sqrt(c)*e)/(8*e**((4*a*c + b**2 + 4*b*c*x + 4*c**2*x**2)/(4*c))*sqrt(c)*c)