Integrand size = 17, antiderivative size = 231 \[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\left (\frac {1}{12}-\frac {i}{12}\right ) e^{-\frac {3 a}{b n}+\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{-3/n} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {3}{n}+i a b d^2 \pi +i b^2 d^2 \pi \log \left (c x^n\right )\right )}{b d \sqrt {\pi }}\right )+\left (\frac {1}{12}-\frac {i}{12}\right ) e^{-\frac {3 a}{b n}-\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {3}{n}-i a b d^2 \pi -i b^2 d^2 \pi \log \left (c x^n\right )\right )}{b d \sqrt {\pi }}\right )+\frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \]
[Out]
Time = 0.39 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {6606, 4713, 2314, 2308, 2266, 2235, 2236} \[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\left (\frac {1}{12}-\frac {i}{12}\right ) x^3 \left (c x^n\right )^{-3/n} e^{-\frac {3 a}{b n}+\frac {9 i}{2 \pi b^2 d^2 n^2}} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (i \pi a b d^2+i \pi b^2 d^2 \log \left (c x^n\right )+\frac {3}{n}\right )}{\sqrt {\pi } b d}\right )+\left (\frac {1}{12}-\frac {i}{12}\right ) x^3 \left (c x^n\right )^{-3/n} e^{-\frac {3 a}{b n}-\frac {9 i}{2 \pi b^2 d^2 n^2}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (-i \pi a b d^2-i \pi b^2 d^2 \log \left (c x^n\right )+\frac {3}{n}\right )}{\sqrt {\pi } b d}\right )+\frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \]
[In]
[Out]
Rule 2235
Rule 2236
Rule 2266
Rule 2308
Rule 2314
Rule 4713
Rule 6606
Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{3} (b d n) \int x^2 \sin \left (\frac {1}{2} d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx \\ & = \frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} (i b d n) \int e^{-\frac {1}{2} i d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2} x^2 \, dx+\frac {1}{6} (i b d n) \int e^{\frac {1}{2} i d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2} x^2 \, dx \\ & = \frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} \left (i b d n x^{i a b d^2 n \pi } \left (c x^n\right )^{-i a b d^2 \pi }\right ) \int \exp \left (-\frac {1}{2} i a^2 d^2 \pi -\frac {1}{2} i b^2 d^2 \pi \log ^2\left (c x^n\right )\right ) x^{2-i a b d^2 n \pi } \, dx+\frac {1}{6} \left (i b d n x^{-i a b d^2 n \pi } \left (c x^n\right )^{i a b d^2 \pi }\right ) \int \exp \left (\frac {1}{2} i a^2 d^2 \pi +\frac {1}{2} i b^2 d^2 \pi \log ^2\left (c x^n\right )\right ) x^{2+i a b d^2 n \pi } \, dx \\ & = \frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} \left (i b d x^3 \left (c x^n\right )^{-i a b d^2 \pi -\frac {3-i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (-\frac {1}{2} i a^2 d^2 \pi +\frac {\left (3-i a b d^2 n \pi \right ) x}{n}-\frac {1}{2} i b^2 d^2 \pi x^2\right ) \, dx,x,\log \left (c x^n\right )\right )+\frac {1}{6} \left (i b d x^3 \left (c x^n\right )^{i a b d^2 \pi -\frac {3+i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (\frac {1}{2} i a^2 d^2 \pi +\frac {\left (3+i a b d^2 n \pi \right ) x}{n}+\frac {1}{2} i b^2 d^2 \pi x^2\right ) \, dx,x,\log \left (c x^n\right )\right ) \\ & = \frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} \left (i b d e^{-\frac {3 a}{b n}-\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{-i a b d^2 \pi -\frac {3-i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (\frac {i \left (\frac {3-i a b d^2 n \pi }{n}-i b^2 d^2 \pi x\right )^2}{2 b^2 d^2 \pi }\right ) \, dx,x,\log \left (c x^n\right )\right )+\frac {1}{6} \left (i b d e^{-\frac {3 a}{b n}+\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{i a b d^2 \pi -\frac {3+i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (-\frac {i \left (\frac {3+i a b d^2 n \pi }{n}+i b^2 d^2 \pi x\right )^2}{2 b^2 d^2 \pi }\right ) \, dx,x,\log \left (c x^n\right )\right ) \\ & = \left (\frac {1}{12}-\frac {i}{12}\right ) e^{-\frac {3 a}{b n}+\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{-3/n} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {3}{n}+i a b d^2 \pi +i b^2 d^2 \pi \log \left (c x^n\right )\right )}{b d \sqrt {\pi }}\right )+\left (\frac {1}{12}-\frac {i}{12}\right ) e^{-\frac {3 a}{b n}-\frac {9 i}{2 b^2 d^2 n^2 \pi }} x^3 \left (c x^n\right )^{-3/n} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {3}{n}-i a b d^2 \pi -i b^2 d^2 \pi \log \left (c x^n\right )\right )}{b d \sqrt {\pi }}\right )+\frac {1}{3} x^3 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \\ \end{align*}
Time = 4.57 (sec) , antiderivative size = 319, normalized size of antiderivative = 1.38 \[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\frac {1}{12} x^3 \left (4 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right )+\sqrt [4]{-1} \sqrt {2} e^{\frac {1}{2} \left (-\frac {6 a}{b n}-\frac {9 i}{b^2 d^2 n^2 \pi }-i a^2 d^2 \pi +2 i a b d^2 \pi \left (n \log (x)-\log \left (c x^n\right )\right )-i b^2 d^2 \pi \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )} \left (c x^n\right )^{-3/n} \left (e^{\frac {9 i}{b^2 d^2 n^2 \pi }} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (-3 i+a b d^2 n \pi +b^2 d^2 n \pi \log \left (c x^n\right )\right )}{b d n \sqrt {\pi }}\right )+i \text {erfi}\left (\frac {(-1)^{3/4} \left (3 i+a b d^2 n \pi +b^2 d^2 n \pi \log \left (c x^n\right )\right )}{b d n \sqrt {2 \pi }}\right )\right ) \left (\cos \left (\frac {1}{2} d^2 \pi \left (a-b n \log (x)+b \log \left (c x^n\right )\right )^2\right )+i \sin \left (\frac {1}{2} d^2 \pi \left (a-b n \log (x)+b \log \left (c x^n\right )\right )^2\right )\right )\right ) \]
[In]
[Out]
\[\int x^{2} \operatorname {FresnelS}\left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )d x\]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 448 vs. \(2 (187) = 374\).
Time = 0.29 (sec) , antiderivative size = 448, normalized size of antiderivative = 1.94 \[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\frac {1}{3} \, x^{3} \operatorname {S}\left (b d \log \left (c x^{n}\right ) + a d\right ) - \frac {1}{6} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} - \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {C}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n + 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + \frac {1}{6} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} + \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {C}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n - 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{6} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} - \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {S}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n + 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{6} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} + \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {S}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n - 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) \]
[In]
[Out]
\[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int x^{2} S\left (a d + b d \log {\left (c x^{n} \right )}\right )\, dx \]
[In]
[Out]
\[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int { x^{2} \operatorname {S}\left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right ) \,d x } \]
[In]
[Out]
\[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int { x^{2} \operatorname {S}\left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int x^2 \operatorname {FresnelS}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int x^2\,\mathrm {FresnelS}\left (d\,\left (a+b\,\ln \left (c\,x^n\right )\right )\right ) \,d x \]
[In]
[Out]