Integrand size = 18, antiderivative size = 298 \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=-\frac {3}{16} \sqrt [4]{-1} e^{\frac {1}{4} i \left (4 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt [4]{-1} (2 i f x+b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) e^{3 i d+\frac {i b^2 \log ^2(f)}{12 f}} f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (6 i f x+b \log (f))}{\sqrt {6} \sqrt {f}}\right )-\frac {3}{16} \sqrt [4]{-1} e^{-\frac {1}{4} i \left (4 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erfi}\left (\frac {\sqrt [4]{-1} (2 i f x-b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) e^{-\frac {1}{12} i \left (36 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (6 i f x-b \log (f))}{\sqrt {6} \sqrt {f}}\right ) \] Output:
-3/16*(-1)^(1/4)*exp(1/4*I*(4*d+b^2*ln(f)^2/f))*f^(-1/2+a)*Pi^(1/2)*erf(1/ 2*(-1)^(1/4)*(2*I*f*x+b*ln(f))/f^(1/2))-(1/96+1/96*I)*exp(3*I*d+1/12*I*b^2 *ln(f)^2/f)*f^(-1/2+a)*6^(1/2)*Pi^(1/2)*erf((1/12+1/12*I)*(6*I*f*x+b*ln(f) )*6^(1/2)/f^(1/2))-3/16*(-1)^(1/4)*f^(-1/2+a)*Pi^(1/2)*erfi(1/2*(-1)^(1/4) *(2*I*f*x-b*ln(f))/f^(1/2))/exp(1/4*I*(4*d+b^2*ln(f)^2/f))-(1/96+1/96*I)*f ^(-1/2+a)*6^(1/2)*Pi^(1/2)*erfi((1/12+1/12*I)*(6*I*f*x-b*ln(f))*6^(1/2)/f^ (1/2))/exp(1/12*I*(36*d+b^2*ln(f)^2/f))
Time = 0.59 (sec) , antiderivative size = 267, normalized size of antiderivative = 0.90 \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=\frac {1}{48} \sqrt [4]{-1} e^{-\frac {i b^2 \log ^2(f)}{4 f}} f^{-\frac {1}{2}+a} \sqrt {\pi } \left (-9 \text {erfi}\left (\frac {(-1)^{3/4} (2 f x+i b \log (f))}{2 \sqrt {f}}\right ) (\cos (d)-i \sin (d))+9 e^{\frac {i b^2 \log ^2(f)}{2 f}} \text {erfi}\left (\frac {\sqrt [4]{-1} (2 f x-i b \log (f))}{2 \sqrt {f}}\right ) (-i \cos (d)+\sin (d))+\sqrt {3} e^{\frac {i b^2 \log ^2(f)}{6 f}} \left (-\text {erfi}\left (\frac {(-1)^{3/4} (6 f x+i b \log (f))}{2 \sqrt {3} \sqrt {f}}\right ) (\cos (3 d)-i \sin (3 d))+e^{\frac {i b^2 \log ^2(f)}{6 f}} \text {erfi}\left (\frac {(6+6 i) f x+(1-i) b \log (f)}{2 \sqrt {6} \sqrt {f}}\right ) (-i \cos (3 d)+\sin (3 d))\right )\right ) \] Input:
Integrate[f^(a + b*x)*Cos[d + f*x^2]^3,x]
Output:
((-1)^(1/4)*f^(-1/2 + a)*Sqrt[Pi]*(-9*Erfi[((-1)^(3/4)*(2*f*x + I*b*Log[f] ))/(2*Sqrt[f])]*(Cos[d] - I*Sin[d]) + 9*E^(((I/2)*b^2*Log[f]^2)/f)*Erfi[(( -1)^(1/4)*(2*f*x - I*b*Log[f]))/(2*Sqrt[f])]*((-I)*Cos[d] + Sin[d]) + Sqrt [3]*E^(((I/6)*b^2*Log[f]^2)/f)*(-(Erfi[((-1)^(3/4)*(6*f*x + I*b*Log[f]))/( 2*Sqrt[3]*Sqrt[f])]*(Cos[3*d] - I*Sin[3*d])) + E^(((I/6)*b^2*Log[f]^2)/f)* Erfi[((6 + 6*I)*f*x + (1 - I)*b*Log[f])/(2*Sqrt[6]*Sqrt[f])]*((-I)*Cos[3*d ] + Sin[3*d]))))/(48*E^(((I/4)*b^2*Log[f]^2)/f))
Time = 0.54 (sec) , antiderivative size = 298, 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.111, Rules used = {4976, 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 f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx\) |
\(\Big \downarrow \) 4976 |
\(\displaystyle \int \left (\frac {3}{8} e^{-i d-i f x^2} f^{a+b x}+\frac {3}{8} e^{i d+i f x^2} f^{a+b x}+\frac {1}{8} e^{-3 i d-3 i f x^2} f^{a+b x}+\frac {1}{8} e^{3 i d+3 i f x^2} f^{a+b x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {3}{16} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{\frac {1}{4} i \left (\frac {b^2 \log ^2(f)}{f}+4 d\right )} \text {erf}\left (\frac {\sqrt [4]{-1} (b \log (f)+2 i f x)}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\frac {\pi }{6}} f^{a-\frac {1}{2}} e^{\frac {i b^2 \log ^2(f)}{12 f}+3 i d} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (b \log (f)+6 i f x)}{\sqrt {6} \sqrt {f}}\right )-\frac {3}{16} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{-\frac {1}{4} i \left (\frac {b^2 \log ^2(f)}{f}+4 d\right )} \text {erfi}\left (\frac {\sqrt [4]{-1} (-b \log (f)+2 i f x)}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\frac {\pi }{6}} f^{a-\frac {1}{2}} e^{-\frac {1}{12} i \left (\frac {b^2 \log ^2(f)}{f}+36 d\right )} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (-b \log (f)+6 i f x)}{\sqrt {6} \sqrt {f}}\right )\) |
Input:
Int[f^(a + b*x)*Cos[d + f*x^2]^3,x]
Output:
(-3*(-1)^(1/4)*E^((I/4)*(4*d + (b^2*Log[f]^2)/f))*f^(-1/2 + a)*Sqrt[Pi]*Er f[((-1)^(1/4)*((2*I)*f*x + b*Log[f]))/(2*Sqrt[f])])/16 - (1/16 + I/16)*E^( (3*I)*d + ((I/12)*b^2*Log[f]^2)/f)*f^(-1/2 + a)*Sqrt[Pi/6]*Erf[((1/2 + I/2 )*((6*I)*f*x + b*Log[f]))/(Sqrt[6]*Sqrt[f])] - (3*(-1)^(1/4)*f^(-1/2 + a)* Sqrt[Pi]*Erfi[((-1)^(1/4)*((2*I)*f*x - b*Log[f]))/(2*Sqrt[f])])/(16*E^((I/ 4)*(4*d + (b^2*Log[f]^2)/f))) - ((1/16 + I/16)*f^(-1/2 + a)*Sqrt[Pi/6]*Erf i[((1/2 + I/2)*((6*I)*f*x - b*Log[f]))/(Sqrt[6]*Sqrt[f])])/E^((I/12)*(36*d + (b^2*Log[f]^2)/f))
Int[Cos[v_]^(n_.)*(F_)^(u_), x_Symbol] :> Int[ExpandTrigToExp[F^u, Cos[v]^n , x], x] /; FreeQ[F, x] && (LinearQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]
Time = 2.48 (sec) , antiderivative size = 235, normalized size of antiderivative = 0.79
method | result | size |
risch | \(-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+36 d f \right )}{12 f}} \sqrt {3}\, \operatorname {erf}\left (-\sqrt {3}\, \sqrt {i f}\, x +\frac {\ln \left (f \right ) b \sqrt {3}}{6 \sqrt {i f}}\right )}{48 \sqrt {i f}}-\frac {3 \sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f \right )}{4 f}} \operatorname {erf}\left (-\sqrt {i f}\, x +\frac {\ln \left (f \right ) b}{2 \sqrt {i f}}\right )}{16 \sqrt {i f}}-\frac {3 \sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f \right )}{4 f}} \operatorname {erf}\left (-\sqrt {-i f}\, x +\frac {\ln \left (f \right ) b}{2 \sqrt {-i f}}\right )}{16 \sqrt {-i f}}-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+36 d f \right )}{12 f}} \operatorname {erf}\left (-\sqrt {-3 i f}\, x +\frac {\ln \left (f \right ) b}{2 \sqrt {-3 i f}}\right )}{16 \sqrt {-3 i f}}\) | \(235\) |
Input:
int(f^(b*x+a)*cos(f*x^2+d)^3,x,method=_RETURNVERBOSE)
Output:
-1/48*Pi^(1/2)*f^a*exp(-1/12*I*(ln(f)^2*b^2+36*d*f)/f)*3^(1/2)/(I*f)^(1/2) *erf(-3^(1/2)*(I*f)^(1/2)*x+1/6*ln(f)*b*3^(1/2)/(I*f)^(1/2))-3/16*Pi^(1/2) *f^a*exp(-1/4*I*(ln(f)^2*b^2+4*d*f)/f)/(I*f)^(1/2)*erf(-(I*f)^(1/2)*x+1/2* ln(f)*b/(I*f)^(1/2))-3/16*Pi^(1/2)*f^a*exp(1/4*I*(ln(f)^2*b^2+4*d*f)/f)/(- I*f)^(1/2)*erf(-(-I*f)^(1/2)*x+1/2*ln(f)*b/(-I*f)^(1/2))-1/16*Pi^(1/2)*f^a *exp(1/12*I*(ln(f)^2*b^2+36*d*f)/f)/(-3*I*f)^(1/2)*erf(-(-3*I*f)^(1/2)*x+1 /2*ln(f)*b/(-3*I*f)^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 525 vs. \(2 (196) = 392\).
Time = 0.08 (sec) , antiderivative size = 525, normalized size of antiderivative = 1.76 \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx =\text {Too large to display} \] Input:
integrate(f^(b*x+a)*cos(f*x^2+d)^3,x, algorithm="fricas")
Output:
1/48*(sqrt(6)*pi*sqrt(f/pi)*e^(1/12*(-I*b^2*log(f)^2 + 12*a*f*log(f) - 36* I*d*f)/f)*fresnel_cos(1/6*sqrt(6)*(6*f*x + I*b*log(f))*sqrt(f/pi)/f) - sqr t(6)*pi*sqrt(f/pi)*e^(1/12*(I*b^2*log(f)^2 + 12*a*f*log(f) + 36*I*d*f)/f)* fresnel_cos(-1/6*sqrt(6)*(6*f*x - I*b*log(f))*sqrt(f/pi)/f) + 9*sqrt(2)*pi *sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + 4*a*f*log(f) - 4*I*d*f)/f)*fresnel_c os(1/2*sqrt(2)*(2*f*x + I*b*log(f))*sqrt(f/pi)/f) - 9*sqrt(2)*pi*sqrt(f/pi )*e^(1/4*(I*b^2*log(f)^2 + 4*a*f*log(f) + 4*I*d*f)/f)*fresnel_cos(-1/2*sqr t(2)*(2*f*x - I*b*log(f))*sqrt(f/pi)/f) - I*sqrt(6)*pi*sqrt(f/pi)*e^(1/12* (-I*b^2*log(f)^2 + 12*a*f*log(f) - 36*I*d*f)/f)*fresnel_sin(1/6*sqrt(6)*(6 *f*x + I*b*log(f))*sqrt(f/pi)/f) - I*sqrt(6)*pi*sqrt(f/pi)*e^(1/12*(I*b^2* log(f)^2 + 12*a*f*log(f) + 36*I*d*f)/f)*fresnel_sin(-1/6*sqrt(6)*(6*f*x - I*b*log(f))*sqrt(f/pi)/f) - 9*I*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f )^2 + 4*a*f*log(f) - 4*I*d*f)/f)*fresnel_sin(1/2*sqrt(2)*(2*f*x + I*b*log( f))*sqrt(f/pi)/f) - 9*I*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(I*b^2*log(f)^2 + 4*a *f*log(f) + 4*I*d*f)/f)*fresnel_sin(-1/2*sqrt(2)*(2*f*x - I*b*log(f))*sqrt (f/pi)/f))/f
\[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=\int f^{a + b x} \cos ^{3}{\left (d + f x^{2} \right )}\, dx \] Input:
integrate(f**(b*x+a)*cos(f*x**2+d)**3,x)
Output:
Integral(f**(a + b*x)*cos(d + f*x**2)**3, x)
Time = 0.12 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.01 \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=-\frac {9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 36 \, d f}{12 \, f}\right ) + \left (i + 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 36 \, d f}{12 \, f}\right )\right )} \operatorname {erf}\left (\frac {6 i \, f x - b \log \left (f\right )}{2 \, \sqrt {3 i \, f}}\right ) + {\left (\left (i + 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 36 \, d f}{12 \, f}\right ) + \left (i - 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 36 \, d f}{12 \, f}\right )\right )} \operatorname {erf}\left (\frac {6 i \, f x + b \log \left (f\right )}{2 \, \sqrt {-3 i \, f}}\right )\right )} f^{\frac {3}{2}} - 9 \, \sqrt {2} \sqrt {\pi } {\left ({\left (-\left (i - 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right ) - \left (i + 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {2 i \, f x - b \log \left (f\right )}{2 \, \sqrt {i \, f}}\right ) + {\left (-\left (i + 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right ) - \left (i - 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {2 i \, f x + b \log \left (f\right )}{2 \, \sqrt {-i \, f}}\right )\right )} f^{\frac {3}{2}}}{96 \, f^{2}} \] Input:
integrate(f^(b*x+a)*cos(f*x^2+d)^3,x, algorithm="maxima")
Output:
-1/96*(9^(1/4)*sqrt(2)*sqrt(pi)*(((I - 1)*f^a*cos(1/12*(b^2*log(f)^2 + 36* d*f)/f) + (I + 1)*f^a*sin(1/12*(b^2*log(f)^2 + 36*d*f)/f))*erf(1/2*(6*I*f* x - b*log(f))/sqrt(3*I*f)) + ((I + 1)*f^a*cos(1/12*(b^2*log(f)^2 + 36*d*f) /f) + (I - 1)*f^a*sin(1/12*(b^2*log(f)^2 + 36*d*f)/f))*erf(1/2*(6*I*f*x + b*log(f))/sqrt(-3*I*f)))*f^(3/2) - 9*sqrt(2)*sqrt(pi)*((-(I - 1)*f^a*cos(1 /4*(b^2*log(f)^2 + 4*d*f)/f) - (I + 1)*f^a*sin(1/4*(b^2*log(f)^2 + 4*d*f)/ f))*erf(1/2*(2*I*f*x - b*log(f))/sqrt(I*f)) + (-(I + 1)*f^a*cos(1/4*(b^2*l og(f)^2 + 4*d*f)/f) - (I - 1)*f^a*sin(1/4*(b^2*log(f)^2 + 4*d*f)/f))*erf(1 /2*(2*I*f*x + b*log(f))/sqrt(-I*f)))*f^(3/2))/f^2
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 595 vs. \(2 (196) = 392\).
Time = 0.22 (sec) , antiderivative size = 595, normalized size of antiderivative = 2.00 \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=\text {Too large to display} \] Input:
integrate(f^(b*x+a)*cos(f*x^2+d)^3,x, algorithm="giac")
Output:
-3/16*sqrt(2)*sqrt(pi)*erf(-1/8*sqrt(2)*(4*x - (pi*b*sgn(f) - pi*b + 2*I*b *log(abs(f)))/f)*(-I*f/abs(f) + 1)*sqrt(abs(f)))*e^(1/8*I*pi^2*b^2*sgn(f)/ f + 1/4*pi*b^2*log(abs(f))*sgn(f)/f - 1/8*I*pi^2*b^2/f - 1/4*pi*b^2*log(ab s(f))/f + 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*l og(abs(f)) + I*d)/((-I*f/abs(f) + 1)*sqrt(abs(f))) - 1/48*sqrt(6)*sqrt(pi) *erf(-1/24*sqrt(6)*sqrt(f)*(12*x - (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)) )/f)*(-I*f/abs(f) + 1))*e^(1/24*I*pi^2*b^2*sgn(f)/f + 1/12*pi*b^2*log(abs( f))*sgn(f)/f - 1/24*I*pi^2*b^2/f - 1/12*pi*b^2*log(abs(f))/f + 1/12*I*b^2* log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) + 3*I*d)/ (sqrt(f)*(-I*f/abs(f) + 1)) - 1/48*sqrt(6)*sqrt(pi)*erf(-1/24*sqrt(6)*sqrt (f)*(12*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*(I*f/abs(f) + 1))* e^(-1/24*I*pi^2*b^2*sgn(f)/f - 1/12*pi*b^2*log(abs(f))*sgn(f)/f + 1/24*I*p i^2*b^2/f + 1/12*pi*b^2*log(abs(f))/f - 1/12*I*b^2*log(abs(f))^2/f - 1/2*I *pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) - 3*I*d)/(sqrt(f)*(I*f/abs(f) + 1)) - 3/16*sqrt(2)*sqrt(pi)*erf(-1/8*sqrt(2)*(4*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*(I*f/abs(f) + 1)*sqrt(abs(f)))*e^(-1/8*I*pi^2*b^2*sg n(f)/f - 1/4*pi*b^2*log(abs(f))*sgn(f)/f + 1/8*I*pi^2*b^2/f + 1/4*pi*b^2*l og(abs(f))/f - 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) - I*d)/((I*f/abs(f) + 1)*sqrt(abs(f)))
Timed out. \[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=\int f^{a+b\,x}\,{\cos \left (f\,x^2+d\right )}^3 \,d x \] Input:
int(f^(a + b*x)*cos(d + f*x^2)^3,x)
Output:
int(f^(a + b*x)*cos(d + f*x^2)^3, x)
\[ \int f^{a+b x} \cos ^3\left (d+f x^2\right ) \, dx=f^{a} \left (\int f^{b x} \cos \left (f \,x^{2}+d \right )^{3}d x \right ) \] Input:
int(f^(b*x+a)*cos(f*x^2+d)^3,x)
Output:
f**a*int(f**(b*x)*cos(d + f*x**2)**3,x)