Integrand size = 12, antiderivative size = 113 \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=-\frac {a \cosh \left ((a+b x)^2\right )}{b^3}+\frac {(a+b x) \cosh \left ((a+b x)^2\right )}{2 b^3}-\frac {\sqrt {\pi } \text {erf}(a+b x)}{8 b^3}-\frac {a^2 \sqrt {\pi } \text {erf}(a+b x)}{4 b^3}-\frac {\sqrt {\pi } \text {erfi}(a+b x)}{8 b^3}+\frac {a^2 \sqrt {\pi } \text {erfi}(a+b x)}{4 b^3} \] Output:
-a*cosh((b*x+a)^2)/b^3+1/2*(b*x+a)*cosh((b*x+a)^2)/b^3-1/8*Pi^(1/2)*erf(b* x+a)/b^3-1/4*a^2*Pi^(1/2)*erf(b*x+a)/b^3-1/8*Pi^(1/2)*erfi(b*x+a)/b^3+1/4* a^2*Pi^(1/2)*erfi(b*x+a)/b^3
Time = 0.09 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.56 \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\frac {-4 (a-b x) \cosh \left ((a+b x)^2\right )-\left (1+2 a^2\right ) \sqrt {\pi } \text {erf}(a+b x)+\left (-1+2 a^2\right ) \sqrt {\pi } \text {erfi}(a+b x)}{8 b^3} \] Input:
Integrate[x^2*Sinh[(a + b*x)^2],x]
Output:
(-4*(a - b*x)*Cosh[(a + b*x)^2] - (1 + 2*a^2)*Sqrt[Pi]*Erf[a + b*x] + (-1 + 2*a^2)*Sqrt[Pi]*Erfi[a + b*x])/(8*b^3)
Time = 0.35 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.88, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5887, 7293, 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 x^2 \sinh \left ((a+b x)^2\right ) \, dx\) |
\(\Big \downarrow \) 5887 |
\(\displaystyle \frac {\int b^2 x^2 \sinh \left ((a+b x)^2\right )d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {\int \left (\sinh \left ((a+b x)^2\right ) a^2-2 (a+b x) \sinh \left ((a+b x)^2\right ) a+(a+b x)^2 \sinh \left ((a+b x)^2\right )\right )d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {1}{4} \sqrt {\pi } a^2 \text {erf}(a+b x)+\frac {1}{4} \sqrt {\pi } a^2 \text {erfi}(a+b x)-\frac {1}{8} \sqrt {\pi } \text {erf}(a+b x)-\frac {1}{8} \sqrt {\pi } \text {erfi}(a+b x)-a \cosh \left ((a+b x)^2\right )+\frac {1}{2} (a+b x) \cosh \left ((a+b x)^2\right )}{b^3}\) |
Input:
Int[x^2*Sinh[(a + b*x)^2],x]
Output:
(-(a*Cosh[(a + b*x)^2]) + ((a + b*x)*Cosh[(a + b*x)^2])/2 - (Sqrt[Pi]*Erf[ a + b*x])/8 - (a^2*Sqrt[Pi]*Erf[a + b*x])/4 - (Sqrt[Pi]*Erfi[a + b*x])/8 + (a^2*Sqrt[Pi]*Erfi[a + b*x])/4)/b^3
Int[(x_)^(m_.)*((a_.) + (b_.)*Sinh[(c_.) + (d_.)*(u_)^(n_)])^(p_.), x_Symbo l] :> Simp[1/Coefficient[u, x, 1]^(m + 1) Subst[Int[(x - Coefficient[u, x , 0])^m*(a + b*Sinh[c + d*x^n])^p, x], x, u], x] /; FreeQ[{a, b, c, d, n, p }, x] && LinearQ[u, x] && NeQ[u, x] && IntegerQ[m]
Result contains complex when optimal does not.
Time = 0.23 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.20
method | result | size |
risch | \(\frac {x \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{2}}-\frac {a \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{4 b^{3}}-\frac {a^{2} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{4 b^{3}}-\frac {\sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{8 b^{3}}+\frac {x \,{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{2}}-\frac {a \,{\mathrm e}^{\left (b x +a \right )^{2}}}{4 b^{3}}-\frac {i a^{2} \sqrt {\pi }\, \operatorname {erf}\left (i b x +i a \right )}{4 b^{3}}+\frac {i \sqrt {\pi }\, \operatorname {erf}\left (i b x +i a \right )}{8 b^{3}}\) | \(136\) |
Input:
int(x^2*sinh((b*x+a)^2),x,method=_RETURNVERBOSE)
Output:
1/4/b^2*x*exp(-(b*x+a)^2)-1/4/b^3*a*exp(-(b*x+a)^2)-1/4*a^2*Pi^(1/2)*erf(b *x+a)/b^3-1/8*Pi^(1/2)*erf(b*x+a)/b^3+1/4/b^2*x*exp((b*x+a)^2)-1/4/b^3*a*e xp((b*x+a)^2)-1/4*I/b^3*a^2*Pi^(1/2)*erf(I*b*x+I*a)+1/8*I/b^3*Pi^(1/2)*erf (I*b*x+I*a)
Leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (95) = 190\).
Time = 0.11 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.85 \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\frac {2 \, b^{2} x + 2 \, {\left (b^{2} x - a b\right )} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} - \sqrt {\pi } \sqrt {-b^{2}} {\left ({\left (2 \, a^{2} - 1\right )} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + {\left (2 \, a^{2} - 1\right )} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {-b^{2}} {\left (b x + a\right )}}{b}\right ) - \sqrt {\pi } \sqrt {b^{2}} {\left ({\left (2 \, a^{2} + 1\right )} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + {\left (2 \, a^{2} + 1\right )} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) + 4 \, {\left (b^{2} x - a b\right )} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + 2 \, {\left (b^{2} x - a b\right )} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )^{2} - 2 \, a b}{8 \, {\left (b^{4} \cosh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right ) + b^{4} \sinh \left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )\right )}} \] Input:
integrate(x^2*sinh((b*x+a)^2),x, algorithm="fricas")
Output:
1/8*(2*b^2*x + 2*(b^2*x - a*b)*cosh(b^2*x^2 + 2*a*b*x + a^2)^2 - sqrt(pi)* sqrt(-b^2)*((2*a^2 - 1)*cosh(b^2*x^2 + 2*a*b*x + a^2) + (2*a^2 - 1)*sinh(b ^2*x^2 + 2*a*b*x + a^2))*erf(sqrt(-b^2)*(b*x + a)/b) - sqrt(pi)*sqrt(b^2)* ((2*a^2 + 1)*cosh(b^2*x^2 + 2*a*b*x + a^2) + (2*a^2 + 1)*sinh(b^2*x^2 + 2* a*b*x + a^2))*erf(sqrt(b^2)*(b*x + a)/b) + 4*(b^2*x - a*b)*cosh(b^2*x^2 + 2*a*b*x + a^2)*sinh(b^2*x^2 + 2*a*b*x + a^2) + 2*(b^2*x - a*b)*sinh(b^2*x^ 2 + 2*a*b*x + a^2)^2 - 2*a*b)/(b^4*cosh(b^2*x^2 + 2*a*b*x + a^2) + b^4*sin h(b^2*x^2 + 2*a*b*x + a^2))
\[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\int x^{2} \sinh {\left (a^{2} + 2 a b x + b^{2} x^{2} \right )}\, dx \] Input:
integrate(x**2*sinh((b*x+a)**2),x)
Output:
Integral(x**2*sinh(a**2 + 2*a*b*x + b**2*x**2), x)
Leaf count of result is larger than twice the leaf count of optimal. 817 vs. \(2 (95) = 190\).
Time = 0.37 (sec) , antiderivative size = 817, normalized size of antiderivative = 7.23 \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\text {Too large to display} \] Input:
integrate(x^2*sinh((b*x+a)^2),x, algorithm="maxima")
Output:
1/3*x^3*sinh((b*x + a)^2) + 1/6*((sqrt(pi)*(b^2*x + a*b)*a^3*b^4*(erf(sqrt ((b^2*x + a*b)^2)/b) - 1)/(sqrt((b^2*x + a*b)^2)*(-b^2)^(7/2)) - 3*(b^2*x + a*b)^3*a*b^4*gamma(3/2, (b^2*x + a*b)^2/b^2)/(((b^2*x + a*b)^2)^(3/2)*(- b^2)^(7/2)) + 3*a^2*b^4*e^(-(b^2*x + a*b)^2/b^2)/(-b^2)^(7/2) + b^4*gamma( 2, (b^2*x + a*b)^2/b^2)/(-b^2)^(7/2))*a/sqrt(-b^2) + (sqrt(pi)*(b^2*x + a* b)*a^4*b^5*(erf(sqrt((b^2*x + a*b)^2)/b) - 1)/(sqrt((b^2*x + a*b)^2)*(-b^2 )^(9/2)) - 6*(b^2*x + a*b)^3*a^2*b^5*gamma(3/2, (b^2*x + a*b)^2/b^2)/(((b^ 2*x + a*b)^2)^(3/2)*(-b^2)^(9/2)) + 4*a^3*b^5*e^(-(b^2*x + a*b)^2/b^2)/(-b ^2)^(9/2) - (b^2*x + a*b)^5*b^5*gamma(5/2, (b^2*x + a*b)^2/b^2)/(((b^2*x + a*b)^2)^(5/2)*(-b^2)^(9/2)) + 4*a*b^5*gamma(2, (b^2*x + a*b)^2/b^2)/(-b^2 )^(9/2))*b/sqrt(-b^2) + a*(sqrt(pi)*(b^2*x + a*b)*a^3*(erf(sqrt(-(b^2*x + a*b)^2/b^2)) - 1)/(b^4*sqrt(-(b^2*x + a*b)^2/b^2)) - 3*a^2*e^((b^2*x + a*b )^2/b^2)/b^3 + gamma(2, -(b^2*x + a*b)^2/b^2)/b^3 - 3*(b^2*x + a*b)^3*a*ga mma(3/2, -(b^2*x + a*b)^2/b^2)/(b^6*(-(b^2*x + a*b)^2/b^2)^(3/2)))/b - sqr t(pi)*(b^2*x + a*b)*a^4*(erf(sqrt(-(b^2*x + a*b)^2/b^2)) - 1)/(b^5*sqrt(-( b^2*x + a*b)^2/b^2)) + 4*a^3*e^((b^2*x + a*b)^2/b^2)/b^4 - 4*a*gamma(2, -( b^2*x + a*b)^2/b^2)/b^4 + 6*(b^2*x + a*b)^3*a^2*gamma(3/2, -(b^2*x + a*b)^ 2/b^2)/(b^7*(-(b^2*x + a*b)^2/b^2)^(3/2)) + (b^2*x + a*b)^5*gamma(5/2, -(b ^2*x + a*b)^2/b^2)/(b^9*(-(b^2*x + a*b)^2/b^2)^(5/2)))*b
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.21 \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=-\frac {\frac {i \, \sqrt {\pi } {\left (2 \, a^{2} - 1\right )} \operatorname {erf}\left (i \, b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {2 \, {\left (b {\left (x + \frac {a}{b}\right )} - 2 \, a\right )} e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}}{b}}{8 \, b^{2}} + \frac {\frac {\sqrt {\pi } {\left (2 \, a^{2} + 1\right )} \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} + \frac {2 \, {\left (b {\left (x + \frac {a}{b}\right )} - 2 \, a\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{8 \, b^{2}} \] Input:
integrate(x^2*sinh((b*x+a)^2),x, algorithm="giac")
Output:
-1/8*(I*sqrt(pi)*(2*a^2 - 1)*erf(I*b*(x + a/b))/b - 2*(b*(x + a/b) - 2*a)* e^(b^2*x^2 + 2*a*b*x + a^2)/b)/b^2 + 1/8*(sqrt(pi)*(2*a^2 + 1)*erf(-b*(x + a/b))/b + 2*(b*(x + a/b) - 2*a)*e^(-b^2*x^2 - 2*a*b*x - a^2)/b)/b^2
Timed out. \[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\int x^2\,\mathrm {sinh}\left ({\left (a+b\,x\right )}^2\right ) \,d x \] Input:
int(x^2*sinh((a + b*x)^2),x)
Output:
int(x^2*sinh((a + b*x)^2), x)
\[ \int x^2 \sinh \left ((a+b x)^2\right ) \, dx=\frac {-2 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b i x +a i \right ) a^{2} i +\sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b i x +a i \right ) i -2 e^{2 b^{2} x^{2}+4 a b x +2 a^{2}} a +2 e^{2 b^{2} x^{2}+4 a b x +2 a^{2}} b x -4 e^{b^{2} x^{2}+2 a b x} \left (\int \frac {1}{e^{b^{2} x^{2}+2 a b x}}d x \right ) a^{2} b -2 e^{b^{2} x^{2}+2 a b x} \left (\int \frac {1}{e^{b^{2} x^{2}+2 a b x}}d x \right ) b -2 a +2 b x}{8 e^{b^{2} x^{2}+2 a b x +a^{2}} b^{3}} \] Input:
int(x^2*sinh((b*x+a)^2),x)
Output:
( - 2*sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a*i + b*i*x)*a**2*i + s qrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a*i + b*i*x)*i - 2*e**(2*a**2 + 4*a*b*x + 2*b**2*x**2)*a + 2*e**(2*a**2 + 4*a*b*x + 2*b**2*x**2)*b*x - 4 *e**(2*a*b*x + b**2*x**2)*int(1/e**(2*a*b*x + b**2*x**2),x)*a**2*b - 2*e** (2*a*b*x + b**2*x**2)*int(1/e**(2*a*b*x + b**2*x**2),x)*b - 2*a + 2*b*x)/( 8*e**(a**2 + 2*a*b*x + b**2*x**2)*b**3)