Integrand size = 14, antiderivative size = 188 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=-\frac {3 x \cos \left (a+b x^2\right )}{8 b}+\frac {x \cos \left (3 a+3 b x^2\right )}{24 b}+\frac {3 \sqrt {\frac {\pi }{2}} \cos (a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )}{8 b^{3/2}}-\frac {\sqrt {\frac {\pi }{6}} \cos (3 a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right )}{24 b^{3/2}}-\frac {3 \sqrt {\frac {\pi }{2}} \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right ) \sin (a)}{8 b^{3/2}}+\frac {\sqrt {\frac {\pi }{6}} \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right ) \sin (3 a)}{24 b^{3/2}} \] Output:
-3/8*x*cos(b*x^2+a)/b+1/24*x*cos(3*b*x^2+3*a)/b+3/16*2^(1/2)*Pi^(1/2)*cos( a)*FresnelC(b^(1/2)*2^(1/2)/Pi^(1/2)*x)/b^(3/2)-1/144*6^(1/2)*Pi^(1/2)*cos (3*a)*FresnelC(b^(1/2)*6^(1/2)/Pi^(1/2)*x)/b^(3/2)-3/16*2^(1/2)*Pi^(1/2)*F resnelS(b^(1/2)*2^(1/2)/Pi^(1/2)*x)*sin(a)/b^(3/2)+1/144*6^(1/2)*Pi^(1/2)* FresnelS(b^(1/2)*6^(1/2)/Pi^(1/2)*x)*sin(3*a)/b^(3/2)
Time = 0.49 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.85 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\frac {-54 \sqrt {b} x \cos \left (a+b x^2\right )+6 \sqrt {b} x \cos \left (3 \left (a+b x^2\right )\right )+27 \sqrt {2 \pi } \cos (a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )-\sqrt {6 \pi } \cos (3 a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right )-27 \sqrt {2 \pi } \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right ) \sin (a)+\sqrt {6 \pi } \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right ) \sin (3 a)}{144 b^{3/2}} \] Input:
Integrate[x^2*Sin[a + b*x^2]^3,x]
Output:
(-54*Sqrt[b]*x*Cos[a + b*x^2] + 6*Sqrt[b]*x*Cos[3*(a + b*x^2)] + 27*Sqrt[2 *Pi]*Cos[a]*FresnelC[Sqrt[b]*Sqrt[2/Pi]*x] - Sqrt[6*Pi]*Cos[3*a]*FresnelC[ Sqrt[b]*Sqrt[6/Pi]*x] - 27*Sqrt[2*Pi]*FresnelS[Sqrt[b]*Sqrt[2/Pi]*x]*Sin[a ] + Sqrt[6*Pi]*FresnelS[Sqrt[b]*Sqrt[6/Pi]*x]*Sin[3*a])/(144*b^(3/2))
Time = 0.40 (sec) , antiderivative size = 188, 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 = {3884, 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 \sin ^3\left (a+b x^2\right ) \, dx\) |
\(\Big \downarrow \) 3884 |
\(\displaystyle \int \left (\frac {3}{4} x^2 \sin \left (a+b x^2\right )-\frac {1}{4} x^2 \sin \left (3 a+3 b x^2\right )\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 \sqrt {\frac {\pi }{2}} \cos (a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )}{8 b^{3/2}}-\frac {\sqrt {\frac {\pi }{6}} \cos (3 a) \operatorname {FresnelC}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right )}{24 b^{3/2}}-\frac {3 \sqrt {\frac {\pi }{2}} \sin (a) \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )}{8 b^{3/2}}+\frac {\sqrt {\frac {\pi }{6}} \sin (3 a) \operatorname {FresnelS}\left (\sqrt {b} \sqrt {\frac {6}{\pi }} x\right )}{24 b^{3/2}}-\frac {3 x \cos \left (a+b x^2\right )}{8 b}+\frac {x \cos \left (3 a+3 b x^2\right )}{24 b}\) |
Input:
Int[x^2*Sin[a + b*x^2]^3,x]
Output:
(-3*x*Cos[a + b*x^2])/(8*b) + (x*Cos[3*a + 3*b*x^2])/(24*b) + (3*Sqrt[Pi/2 ]*Cos[a]*FresnelC[Sqrt[b]*Sqrt[2/Pi]*x])/(8*b^(3/2)) - (Sqrt[Pi/6]*Cos[3*a ]*FresnelC[Sqrt[b]*Sqrt[6/Pi]*x])/(24*b^(3/2)) - (3*Sqrt[Pi/2]*FresnelS[Sq rt[b]*Sqrt[2/Pi]*x]*Sin[a])/(8*b^(3/2)) + (Sqrt[Pi/6]*FresnelS[Sqrt[b]*Sqr t[6/Pi]*x]*Sin[3*a])/(24*b^(3/2))
Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x _Symbol] :> Int[ExpandTrigReduce[(e*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]
Time = 1.31 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.70
method | result | size |
default | \(-\frac {3 x \cos \left (b \,x^{2}+a \right )}{8 b}+\frac {3 \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {FresnelC}\left (\frac {\sqrt {b}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )-\sin \left (a \right ) \operatorname {FresnelS}\left (\frac {\sqrt {b}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )\right )}{16 b^{\frac {3}{2}}}+\frac {x \cos \left (3 b \,x^{2}+3 a \right )}{24 b}-\frac {\sqrt {2}\, \sqrt {\pi }\, \sqrt {3}\, \left (\cos \left (3 a \right ) \operatorname {FresnelC}\left (\frac {\sqrt {2}\, \sqrt {3}\, \sqrt {b}\, x}{\sqrt {\pi }}\right )-\sin \left (3 a \right ) \operatorname {FresnelS}\left (\frac {\sqrt {2}\, \sqrt {3}\, \sqrt {b}\, x}{\sqrt {\pi }}\right )\right )}{144 b^{\frac {3}{2}}}\) | \(132\) |
risch | \(-\frac {{\mathrm e}^{-3 i a} \sqrt {\pi }\, \sqrt {3}\, \operatorname {erf}\left (\sqrt {3}\, \sqrt {i b}\, x \right )}{288 b \sqrt {i b}}-\frac {{\mathrm e}^{3 i a} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-3 i b}\, x \right )}{96 b \sqrt {-3 i b}}+\frac {3 \,{\mathrm e}^{i a} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-i b}\, x \right )}{32 b \sqrt {-i b}}+\frac {3 \,{\mathrm e}^{-i a} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {i b}\, x \right )}{32 b \sqrt {i b}}-\frac {3 x \cos \left (b \,x^{2}+a \right )}{8 b}+\frac {x \cos \left (3 b \,x^{2}+3 a \right )}{24 b}\) | \(151\) |
Input:
int(x^2*sin(b*x^2+a)^3,x,method=_RETURNVERBOSE)
Output:
-3/8*x*cos(b*x^2+a)/b+3/16/b^(3/2)*2^(1/2)*Pi^(1/2)*(cos(a)*FresnelC(b^(1/ 2)*2^(1/2)/Pi^(1/2)*x)-sin(a)*FresnelS(b^(1/2)*2^(1/2)/Pi^(1/2)*x))+1/24*x *cos(3*b*x^2+3*a)/b-1/144/b^(3/2)*2^(1/2)*Pi^(1/2)*3^(1/2)*(cos(3*a)*Fresn elC(2^(1/2)/Pi^(1/2)*3^(1/2)*b^(1/2)*x)-sin(3*a)*FresnelS(2^(1/2)/Pi^(1/2) *3^(1/2)*b^(1/2)*x))
Time = 0.08 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.78 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\frac {24 \, b x \cos \left (b x^{2} + a\right )^{3} - \sqrt {6} \pi \sqrt {\frac {b}{\pi }} \cos \left (3 \, a\right ) \operatorname {C}\left (\sqrt {6} x \sqrt {\frac {b}{\pi }}\right ) + 27 \, \sqrt {2} \pi \sqrt {\frac {b}{\pi }} \cos \left (a\right ) \operatorname {C}\left (\sqrt {2} x \sqrt {\frac {b}{\pi }}\right ) + \sqrt {6} \pi \sqrt {\frac {b}{\pi }} \operatorname {S}\left (\sqrt {6} x \sqrt {\frac {b}{\pi }}\right ) \sin \left (3 \, a\right ) - 27 \, \sqrt {2} \pi \sqrt {\frac {b}{\pi }} \operatorname {S}\left (\sqrt {2} x \sqrt {\frac {b}{\pi }}\right ) \sin \left (a\right ) - 72 \, b x \cos \left (b x^{2} + a\right )}{144 \, b^{2}} \] Input:
integrate(x^2*sin(b*x^2+a)^3,x, algorithm="fricas")
Output:
1/144*(24*b*x*cos(b*x^2 + a)^3 - sqrt(6)*pi*sqrt(b/pi)*cos(3*a)*fresnel_co s(sqrt(6)*x*sqrt(b/pi)) + 27*sqrt(2)*pi*sqrt(b/pi)*cos(a)*fresnel_cos(sqrt (2)*x*sqrt(b/pi)) + sqrt(6)*pi*sqrt(b/pi)*fresnel_sin(sqrt(6)*x*sqrt(b/pi) )*sin(3*a) - 27*sqrt(2)*pi*sqrt(b/pi)*fresnel_sin(sqrt(2)*x*sqrt(b/pi))*si n(a) - 72*b*x*cos(b*x^2 + a))/b^2
Leaf count of result is larger than twice the leaf count of optimal. 439 vs. \(2 (194) = 388\).
Time = 1.93 (sec) , antiderivative size = 439, normalized size of antiderivative = 2.34 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=- \frac {3 b^{\frac {3}{2}} x^{5} \sqrt {\frac {1}{b}} \cos {\left (a \right )} \Gamma \left (\frac {3}{4}\right ) \Gamma \left (\frac {5}{4}\right ) {{}_{2}F_{3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4} \\ \frac {3}{2}, \frac {7}{4}, \frac {9}{4} \end {matrix}\middle | {- \frac {b^{2} x^{4}}{4}} \right )}}{32 \Gamma \left (\frac {7}{4}\right ) \Gamma \left (\frac {9}{4}\right )} + \frac {3 b^{\frac {3}{2}} x^{5} \sqrt {\frac {1}{b}} \cos {\left (3 a \right )} \Gamma \left (\frac {3}{4}\right ) \Gamma \left (\frac {5}{4}\right ) {{}_{2}F_{3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4} \\ \frac {3}{2}, \frac {7}{4}, \frac {9}{4} \end {matrix}\middle | {- \frac {9 b^{2} x^{4}}{4}} \right )}}{32 \Gamma \left (\frac {7}{4}\right ) \Gamma \left (\frac {9}{4}\right )} - \frac {3 \sqrt {b} x^{3} \sqrt {\frac {1}{b}} \sin {\left (a \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{3}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} \\ \frac {1}{2}, \frac {5}{4}, \frac {7}{4} \end {matrix}\middle | {- \frac {b^{2} x^{4}}{4}} \right )}}{32 \Gamma \left (\frac {5}{4}\right ) \Gamma \left (\frac {7}{4}\right )} + \frac {\sqrt {b} x^{3} \sqrt {\frac {1}{b}} \sin {\left (3 a \right )} \Gamma \left (\frac {1}{4}\right ) \Gamma \left (\frac {3}{4}\right ) {{}_{2}F_{3}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} \\ \frac {1}{2}, \frac {5}{4}, \frac {7}{4} \end {matrix}\middle | {- \frac {9 b^{2} x^{4}}{4}} \right )}}{32 \Gamma \left (\frac {5}{4}\right ) \Gamma \left (\frac {7}{4}\right )} + \frac {3 \sqrt {2} \sqrt {\pi } x^{2} \sqrt {\frac {1}{b}} \sin {\left (a \right )} C\left (\frac {\sqrt {2} \sqrt {b} x}{\sqrt {\pi }}\right )}{8} - \frac {\sqrt {6} \sqrt {\pi } x^{2} \sqrt {\frac {1}{b}} \sin {\left (3 a \right )} C\left (\frac {\sqrt {6} \sqrt {b} x}{\sqrt {\pi }}\right )}{24} + \frac {3 \sqrt {2} \sqrt {\pi } x^{2} \sqrt {\frac {1}{b}} \cos {\left (a \right )} S\left (\frac {\sqrt {2} \sqrt {b} x}{\sqrt {\pi }}\right )}{8} - \frac {\sqrt {6} \sqrt {\pi } x^{2} \sqrt {\frac {1}{b}} \cos {\left (3 a \right )} S\left (\frac {\sqrt {6} \sqrt {b} x}{\sqrt {\pi }}\right )}{24} \] Input:
integrate(x**2*sin(b*x**2+a)**3,x)
Output:
-3*b**(3/2)*x**5*sqrt(1/b)*cos(a)*gamma(3/4)*gamma(5/4)*hyper((3/4, 5/4), (3/2, 7/4, 9/4), -b**2*x**4/4)/(32*gamma(7/4)*gamma(9/4)) + 3*b**(3/2)*x** 5*sqrt(1/b)*cos(3*a)*gamma(3/4)*gamma(5/4)*hyper((3/4, 5/4), (3/2, 7/4, 9/ 4), -9*b**2*x**4/4)/(32*gamma(7/4)*gamma(9/4)) - 3*sqrt(b)*x**3*sqrt(1/b)* sin(a)*gamma(1/4)*gamma(3/4)*hyper((1/4, 3/4), (1/2, 5/4, 7/4), -b**2*x**4 /4)/(32*gamma(5/4)*gamma(7/4)) + sqrt(b)*x**3*sqrt(1/b)*sin(3*a)*gamma(1/4 )*gamma(3/4)*hyper((1/4, 3/4), (1/2, 5/4, 7/4), -9*b**2*x**4/4)/(32*gamma( 5/4)*gamma(7/4)) + 3*sqrt(2)*sqrt(pi)*x**2*sqrt(1/b)*sin(a)*fresnelc(sqrt( 2)*sqrt(b)*x/sqrt(pi))/8 - sqrt(6)*sqrt(pi)*x**2*sqrt(1/b)*sin(3*a)*fresne lc(sqrt(6)*sqrt(b)*x/sqrt(pi))/24 + 3*sqrt(2)*sqrt(pi)*x**2*sqrt(1/b)*cos( a)*fresnels(sqrt(2)*sqrt(b)*x/sqrt(pi))/8 - sqrt(6)*sqrt(pi)*x**2*sqrt(1/b )*cos(3*a)*fresnels(sqrt(6)*sqrt(b)*x/sqrt(pi))/24
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.76 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\frac {24 \, b^{2} x \cos \left (3 \, b x^{2} + 3 \, a\right ) - 216 \, b^{2} x \cos \left (b x^{2} + a\right ) + 9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, \cos \left (3 \, a\right ) + \left (i + 1\right ) \, \sin \left (3 \, a\right )\right )} \operatorname {erf}\left (\sqrt {3 i \, b} x\right ) + {\left (-\left (i + 1\right ) \, \cos \left (3 \, a\right ) - \left (i - 1\right ) \, \sin \left (3 \, a\right )\right )} \operatorname {erf}\left (\sqrt {-3 i \, b} x\right )\right )} b^{\frac {3}{2}} - 27 \, \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, \cos \left (a\right ) + \left (i + 1\right ) \, \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {i \, b} x\right ) + {\left (-\left (i + 1\right ) \, \cos \left (a\right ) - \left (i - 1\right ) \, \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {-i \, b} x\right )\right )} b^{\frac {3}{2}}}{576 \, b^{3}} \] Input:
integrate(x^2*sin(b*x^2+a)^3,x, algorithm="maxima")
Output:
1/576*(24*b^2*x*cos(3*b*x^2 + 3*a) - 216*b^2*x*cos(b*x^2 + a) + 9^(1/4)*sq rt(2)*sqrt(pi)*(((I - 1)*cos(3*a) + (I + 1)*sin(3*a))*erf(sqrt(3*I*b)*x) + (-(I + 1)*cos(3*a) - (I - 1)*sin(3*a))*erf(sqrt(-3*I*b)*x))*b^(3/2) - 27* sqrt(2)*sqrt(pi)*(((I - 1)*cos(a) + (I + 1)*sin(a))*erf(sqrt(I*b)*x) + (-( I + 1)*cos(a) - (I - 1)*sin(a))*erf(sqrt(-I*b)*x))*b^(3/2))/b^3
Result contains complex when optimal does not.
Time = 0.13 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.38 \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\frac {x e^{\left (3 i \, b x^{2} + 3 i \, a\right )}}{48 \, b} - \frac {3 \, x e^{\left (i \, b x^{2} + i \, a\right )}}{16 \, b} - \frac {3 \, x e^{\left (-i \, b x^{2} - i \, a\right )}}{16 \, b} + \frac {x e^{\left (-3 i \, b x^{2} - 3 i \, a\right )}}{48 \, b} + \frac {\sqrt {6} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {6} \sqrt {b} x {\left (-\frac {i \, b}{{\left | b \right |}} + 1\right )}\right ) e^{\left (3 i \, a\right )}}{288 \, b^{\frac {3}{2}} {\left (-\frac {i \, b}{{\left | b \right |}} + 1\right )}} - \frac {3 \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} x {\left (-\frac {i \, b}{{\left | b \right |}} + 1\right )} \sqrt {{\left | b \right |}}\right ) e^{\left (i \, a\right )}}{32 \, b {\left (-\frac {i \, b}{{\left | b \right |}} + 1\right )} \sqrt {{\left | b \right |}}} - \frac {3 \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} x {\left (\frac {i \, b}{{\left | b \right |}} + 1\right )} \sqrt {{\left | b \right |}}\right ) e^{\left (-i \, a\right )}}{32 \, b {\left (\frac {i \, b}{{\left | b \right |}} + 1\right )} \sqrt {{\left | b \right |}}} + \frac {\sqrt {6} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {6} \sqrt {b} x {\left (\frac {i \, b}{{\left | b \right |}} + 1\right )}\right ) e^{\left (-3 i \, a\right )}}{288 \, b^{\frac {3}{2}} {\left (\frac {i \, b}{{\left | b \right |}} + 1\right )}} \] Input:
integrate(x^2*sin(b*x^2+a)^3,x, algorithm="giac")
Output:
1/48*x*e^(3*I*b*x^2 + 3*I*a)/b - 3/16*x*e^(I*b*x^2 + I*a)/b - 3/16*x*e^(-I *b*x^2 - I*a)/b + 1/48*x*e^(-3*I*b*x^2 - 3*I*a)/b + 1/288*sqrt(6)*sqrt(pi) *erf(-1/2*sqrt(6)*sqrt(b)*x*(-I*b/abs(b) + 1))*e^(3*I*a)/(b^(3/2)*(-I*b/ab s(b) + 1)) - 3/32*sqrt(2)*sqrt(pi)*erf(-1/2*sqrt(2)*x*(-I*b/abs(b) + 1)*sq rt(abs(b)))*e^(I*a)/(b*(-I*b/abs(b) + 1)*sqrt(abs(b))) - 3/32*sqrt(2)*sqrt (pi)*erf(-1/2*sqrt(2)*x*(I*b/abs(b) + 1)*sqrt(abs(b)))*e^(-I*a)/(b*(I*b/ab s(b) + 1)*sqrt(abs(b))) + 1/288*sqrt(6)*sqrt(pi)*erf(-1/2*sqrt(6)*sqrt(b)* x*(I*b/abs(b) + 1))*e^(-3*I*a)/(b^(3/2)*(I*b/abs(b) + 1))
Timed out. \[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\int x^2\,{\sin \left (b\,x^2+a\right )}^3 \,d x \] Input:
int(x^2*sin(a + b*x^2)^3,x)
Output:
int(x^2*sin(a + b*x^2)^3, x)
\[ \int x^2 \sin ^3\left (a+b x^2\right ) \, dx=\int \sin \left (b \,x^{2}+a \right )^{3} x^{2}d x \] Input:
int(x^2*sin(b*x^2+a)^3,x)
Output:
int(sin(a + b*x**2)**3*x**2,x)