Optimal. Leaf size=217 \[ \frac {\left (\frac {1}{4}+\frac {i}{4}\right ) e^{\frac {2 a b n+\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{\frac {1}{n}} \text {Erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {1}{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 )}{x}-\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) e^{\frac {2 a b n-\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{\frac {1}{n}} \text {Erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {1}{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 )}{x}-\frac {\text {FresnelC}\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {6607, 4714,
2314, 2308, 2266, 2235, 2236} \begin {gather*} \frac {\left (\frac {1}{4}+\frac {i}{4}\right ) \left (c x^n\right )^{\frac {1}{n}} e^{\frac {2 a b n+\frac {i}{\pi d^2}}{2 b^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 {1}{n}\right )}{\sqrt {\pi } b d}\right )}{x}-\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) \left (c x^n\right )^{\frac {1}{n}} e^{\frac {2 a b n-\frac {i}{\pi d^2}}{2 b^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 {1}{n}\right )}{\sqrt {\pi } b d}\right )}{x}-\frac {\text {FresnelC}\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2236
Rule 2266
Rule 2308
Rule 2314
Rule 4714
Rule 6607
Rubi steps
\begin {align*} \int \frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x^2} \, dx &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+(b d n) \int \frac {\cos \left (\frac {1}{2} d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2\right )}{x^2} \, dx\\ &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {1}{2} (b d n) \int \frac {e^{-\frac {1}{2} i d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2}}{x^2} \, dx+\frac {1}{2} (b d n) \int \frac {e^{\frac {1}{2} i d^2 \pi \left (a+b \log \left (c x^n\right )\right )^2}}{x^2} \, dx\\ &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {1}{2} (b d n) \int \frac {\exp \left (-\frac {1}{2} i a^2 d^2 \pi -i a b d^2 \pi \log \left (c x^n\right )-\frac {1}{2} i b^2 d^2 \pi \log ^2\left (c x^n\right )\right )}{x^2} \, dx+\frac {1}{2} (b d n) \int \frac {\exp \left (\frac {1}{2} i a^2 d^2 \pi +i a b d^2 \pi \log \left (c x^n\right )+\frac {1}{2} i b^2 d^2 \pi \log ^2\left (c x^n\right )\right )}{x^2} \, dx\\ &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {1}{2} (b d n) \int \frac {\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 ) \left (c x^n\right )^{-i a b d^2 \pi }}{x^2} \, dx+\frac {1}{2} (b d n) \int \frac {\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 ) \left (c x^n\right )^{i a b d^2 \pi }}{x^2} \, dx\\ &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {1}{2} \left (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}{2} \left (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 {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {\left (b d \left (c x^n\right )^{-i a b d^2 \pi -\frac {-1-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 (-1-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 )}{2 x}+\frac {\left (b d \left (c x^n\right )^{i a b d^2 \pi -\frac {-1+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 (-1+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 )}{2 x}\\ &=-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}+\frac {\left (b d e^{\frac {2 a b n-\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{-i a b d^2 \pi -\frac {-1-i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (\frac {i \left (\frac {-1-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 )}{2 x}+\frac {\left (b d e^{\frac {2 a b n+\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{i a b d^2 \pi -\frac {-1+i a b d^2 n \pi }{n}}\right ) \text {Subst}\left (\int \exp \left (-\frac {i \left (\frac {-1+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 )}{2 x}\\ &=\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) e^{\frac {2 a b n+\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{\frac {1}{n}} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {1}{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 )}{x}-\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) e^{\frac {2 a b n-\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{\frac {1}{n}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\frac {1}{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 )}{x}-\frac {C\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.58, size = 194, normalized size = 0.89 \begin {gather*} -\frac {\sqrt [4]{-1} \sqrt {2} e^{\frac {2 a b n-\frac {i}{d^2 \pi }}{2 b^2 n^2}} \left (c x^n\right )^{\frac {1}{n}} \left (\text {Erfi}\left (\frac {(-1)^{3/4} \left (-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 )+i e^{\frac {i}{b^2 d^2 n^2 \pi }} \text {Erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \left (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 )\right )+4 \text {FresnelC}\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{4 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.47, size = 0, normalized size = 0.00 \[\int \frac {\FresnelC \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 444 vs. \(2 (177) = 354\).
time = 0.38, size = 444, normalized size = 2.05 \begin {gather*} \frac {\pi \sqrt {b^{2} d^{2} n^{2}} x e^{\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} + \frac {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 + i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + \pi \sqrt {b^{2} d^{2} n^{2}} x e^{\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} - \frac {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 - i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + i \, \pi \sqrt {b^{2} d^{2} n^{2}} x e^{\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} + \frac {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 + i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - i \, \pi \sqrt {b^{2} d^{2} n^{2}} x e^{\left (\frac {\log \left (c\right )}{n} + \frac {a}{b n} - \frac {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 - i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - 2 \, \operatorname {C}\left (b d \log \left (c x^{n}\right ) + a d\right )}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {C\left (a d + b d \log {\left (c x^{n} \right )}\right )}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\mathrm {FresnelC}\left (d\,\left (a+b\,\ln \left (c\,x^n\right )\right )\right )}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________