\(\int f^{a+c x^2} \sin ^3(d+f x^2) \, dx\) [102]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 213 \[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\frac {3 i e^{-i d} f^a \sqrt {\pi } \text {erf}\left (x \sqrt {i f-c \log (f)}\right )}{16 \sqrt {i f-c \log (f)}}-\frac {i e^{-3 i d} f^a \sqrt {\pi } \text {erf}\left (x \sqrt {3 i f-c \log (f)}\right )}{16 \sqrt {3 i f-c \log (f)}}-\frac {3 i e^{i d} f^a \sqrt {\pi } \text {erfi}\left (x \sqrt {i f+c \log (f)}\right )}{16 \sqrt {i f+c \log (f)}}+\frac {i e^{3 i d} f^a \sqrt {\pi } \text {erfi}\left (x \sqrt {3 i f+c \log (f)}\right )}{16 \sqrt {3 i f+c \log (f)}} \] Output:

3/16*I*f^a*Pi^(1/2)*erf(x*(I*f-c*ln(f))^(1/2))/exp(I*d)/(I*f-c*ln(f))^(1/2 
)-1/16*I*f^a*Pi^(1/2)*erf(x*(3*I*f-c*ln(f))^(1/2))/exp(3*I*d)/(3*I*f-c*ln( 
f))^(1/2)-3/16*I*exp(I*d)*f^a*Pi^(1/2)*erfi(x*(I*f+c*ln(f))^(1/2))/(I*f+c* 
ln(f))^(1/2)+1/16*I*exp(3*I*d)*f^a*Pi^(1/2)*erfi(x*(3*I*f+c*ln(f))^(1/2))/ 
(3*I*f+c*ln(f))^(1/2)
 

Mathematica [A] (verified)

Time = 1.64 (sec) , antiderivative size = 386, normalized size of antiderivative = 1.81 \[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\frac {\sqrt [4]{-1} f^a \sqrt {\pi } \left (-3 \text {erfi}\left (\sqrt [4]{-1} x \sqrt {f-i c \log (f)}\right ) \sqrt {f-i c \log (f)} \left (9 f^3+9 i c f^2 \log (f)+c^2 f \log ^2(f)+i c^3 \log ^3(f)\right ) (\cos (d)+i \sin (d))+(f-i c \log (f)) \left (\text {erfi}\left (\sqrt [4]{-1} x \sqrt {3 f-i c \log (f)}\right ) \sqrt {3 f-i c \log (f)} \left (3 f^2+4 i c f \log (f)-c^2 \log ^2(f)\right ) (\cos (3 d)+i \sin (3 d))+(3 f-i c \log (f)) \left (3 \text {erfi}\left ((-1)^{3/4} x \sqrt {f+i c \log (f)}\right ) \sqrt {f+i c \log (f)} (c \cos (d) \log (f)-3 f \sin (d))+3 \text {erf}\left (\frac {(1+i) x \sqrt {f+i c \log (f)}}{\sqrt {2}}\right ) \sqrt {f+i c \log (f)} (3 f \cos (d)+c \log (f) \sin (d))+\text {erfi}\left ((-1)^{3/4} x \sqrt {3 f+i c \log (f)}\right ) (f+i c \log (f)) \sqrt {3 f+i c \log (f)} (i \cos (3 d)+\sin (3 d))\right )\right )\right )}{16 \left (9 f^4+10 c^2 f^2 \log ^2(f)+c^4 \log ^4(f)\right )} \] Input:

Integrate[f^(a + c*x^2)*Sin[d + f*x^2]^3,x]
 

Output:

((-1)^(1/4)*f^a*Sqrt[Pi]*(-3*Erfi[(-1)^(1/4)*x*Sqrt[f - I*c*Log[f]]]*Sqrt[ 
f - I*c*Log[f]]*(9*f^3 + (9*I)*c*f^2*Log[f] + c^2*f*Log[f]^2 + I*c^3*Log[f 
]^3)*(Cos[d] + I*Sin[d]) + (f - I*c*Log[f])*(Erfi[(-1)^(1/4)*x*Sqrt[3*f - 
I*c*Log[f]]]*Sqrt[3*f - I*c*Log[f]]*(3*f^2 + (4*I)*c*f*Log[f] - c^2*Log[f] 
^2)*(Cos[3*d] + I*Sin[3*d]) + (3*f - I*c*Log[f])*(3*Erfi[(-1)^(3/4)*x*Sqrt 
[f + I*c*Log[f]]]*Sqrt[f + I*c*Log[f]]*(c*Cos[d]*Log[f] - 3*f*Sin[d]) + 3* 
Erf[((1 + I)*x*Sqrt[f + I*c*Log[f]])/Sqrt[2]]*Sqrt[f + I*c*Log[f]]*(3*f*Co 
s[d] + c*Log[f]*Sin[d]) + Erfi[(-1)^(3/4)*x*Sqrt[3*f + I*c*Log[f]]]*(f + I 
*c*Log[f])*Sqrt[3*f + I*c*Log[f]]*(I*Cos[3*d] + Sin[3*d])))))/(16*(9*f^4 + 
 10*c^2*f^2*Log[f]^2 + c^4*Log[f]^4))
 

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 213, 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.100, Rules used = {4975, 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+c x^2} \sin ^3\left (d+f x^2\right ) \, dx\)

\(\Big \downarrow \) 4975

\(\displaystyle \int \left (\frac {3}{8} i e^{-i d-i f x^2} f^{a+c x^2}-\frac {3}{8} i e^{i d+i f x^2} f^{a+c x^2}-\frac {1}{8} i e^{-3 i d-3 i f x^2} f^{a+c x^2}+\frac {1}{8} i e^{3 i d+3 i f x^2} f^{a+c x^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {3 i \sqrt {\pi } e^{-i d} f^a \text {erf}\left (x \sqrt {-c \log (f)+i f}\right )}{16 \sqrt {-c \log (f)+i f}}-\frac {i \sqrt {\pi } e^{-3 i d} f^a \text {erf}\left (x \sqrt {-c \log (f)+3 i f}\right )}{16 \sqrt {-c \log (f)+3 i f}}-\frac {3 i \sqrt {\pi } e^{i d} f^a \text {erfi}\left (x \sqrt {c \log (f)+i f}\right )}{16 \sqrt {c \log (f)+i f}}+\frac {i \sqrt {\pi } e^{3 i d} f^a \text {erfi}\left (x \sqrt {c \log (f)+3 i f}\right )}{16 \sqrt {c \log (f)+3 i f}}\)

Input:

Int[f^(a + c*x^2)*Sin[d + f*x^2]^3,x]
 

Output:

(((3*I)/16)*f^a*Sqrt[Pi]*Erf[x*Sqrt[I*f - c*Log[f]]])/(E^(I*d)*Sqrt[I*f - 
c*Log[f]]) - ((I/16)*f^a*Sqrt[Pi]*Erf[x*Sqrt[(3*I)*f - c*Log[f]]])/(E^((3* 
I)*d)*Sqrt[(3*I)*f - c*Log[f]]) - (((3*I)/16)*E^(I*d)*f^a*Sqrt[Pi]*Erfi[x* 
Sqrt[I*f + c*Log[f]]])/Sqrt[I*f + c*Log[f]] + ((I/16)*E^((3*I)*d)*f^a*Sqrt 
[Pi]*Erfi[x*Sqrt[(3*I)*f + c*Log[f]]])/Sqrt[(3*I)*f + c*Log[f]]
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 4975
Int[(F_)^(u_)*Sin[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sin[v]^n 
, x], x] /; FreeQ[F, x] && (LinearQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, 
 x] || PolyQ[v, x, 2]) && IGtQ[n, 0]
 
Maple [A] (verified)

Time = 2.10 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.78

method result size
risch \(\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{3 i d} \operatorname {erf}\left (\sqrt {-c \ln \left (f \right )-3 i f}\, x \right )}{16 \sqrt {-c \ln \left (f \right )-3 i f}}-\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{-3 i d} \operatorname {erf}\left (x \sqrt {3 i f -c \ln \left (f \right )}\right )}{16 \sqrt {3 i f -c \ln \left (f \right )}}+\frac {3 i \sqrt {\pi }\, f^{a} {\mathrm e}^{-i d} \operatorname {erf}\left (x \sqrt {i f -c \ln \left (f \right )}\right )}{16 \sqrt {i f -c \ln \left (f \right )}}-\frac {3 i \sqrt {\pi }\, f^{a} {\mathrm e}^{i d} \operatorname {erf}\left (\sqrt {-c \ln \left (f \right )-i f}\, x \right )}{16 \sqrt {-c \ln \left (f \right )-i f}}\) \(166\)

Input:

int(f^(c*x^2+a)*sin(f*x^2+d)^3,x,method=_RETURNVERBOSE)
 

Output:

1/16*I*Pi^(1/2)*f^a*exp(3*I*d)/(-c*ln(f)-3*I*f)^(1/2)*erf((-c*ln(f)-3*I*f) 
^(1/2)*x)-1/16*I*Pi^(1/2)*f^a*exp(-3*I*d)/(3*I*f-c*ln(f))^(1/2)*erf(x*(3*I 
*f-c*ln(f))^(1/2))+3/16*I*Pi^(1/2)*f^a*exp(-I*d)/(I*f-c*ln(f))^(1/2)*erf(x 
*(I*f-c*ln(f))^(1/2))-3/16*I*Pi^(1/2)*f^a*exp(I*d)/(-c*ln(f)-I*f)^(1/2)*er 
f((-c*ln(f)-I*f)^(1/2)*x)
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 317 vs. \(2 (145) = 290\).

Time = 0.10 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.49 \[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\frac {\sqrt {\pi } {\left (-i \, c^{3} \log \left (f\right )^{3} - 3 \, c^{2} f \log \left (f\right )^{2} - i \, c f^{2} \log \left (f\right ) - 3 \, f^{3}\right )} \sqrt {-c \log \left (f\right ) - 3 i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) - 3 i \, f} x\right ) e^{\left (a \log \left (f\right ) + 3 i \, d\right )} - 3 \, \sqrt {\pi } {\left (-i \, c^{3} \log \left (f\right )^{3} - c^{2} f \log \left (f\right )^{2} - 9 i \, c f^{2} \log \left (f\right ) - 9 \, f^{3}\right )} \sqrt {-c \log \left (f\right ) - i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) - i \, f} x\right ) e^{\left (a \log \left (f\right ) + i \, d\right )} - 3 \, \sqrt {\pi } {\left (i \, c^{3} \log \left (f\right )^{3} - c^{2} f \log \left (f\right )^{2} + 9 i \, c f^{2} \log \left (f\right ) - 9 \, f^{3}\right )} \sqrt {-c \log \left (f\right ) + i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) + i \, f} x\right ) e^{\left (a \log \left (f\right ) - i \, d\right )} + \sqrt {\pi } {\left (i \, c^{3} \log \left (f\right )^{3} - 3 \, c^{2} f \log \left (f\right )^{2} + i \, c f^{2} \log \left (f\right ) - 3 \, f^{3}\right )} \sqrt {-c \log \left (f\right ) + 3 i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) + 3 i \, f} x\right ) e^{\left (a \log \left (f\right ) - 3 i \, d\right )}}{16 \, {\left (c^{4} \log \left (f\right )^{4} + 10 \, c^{2} f^{2} \log \left (f\right )^{2} + 9 \, f^{4}\right )}} \] Input:

integrate(f^(c*x^2+a)*sin(f*x^2+d)^3,x, algorithm="fricas")
 

Output:

1/16*(sqrt(pi)*(-I*c^3*log(f)^3 - 3*c^2*f*log(f)^2 - I*c*f^2*log(f) - 3*f^ 
3)*sqrt(-c*log(f) - 3*I*f)*erf(sqrt(-c*log(f) - 3*I*f)*x)*e^(a*log(f) + 3* 
I*d) - 3*sqrt(pi)*(-I*c^3*log(f)^3 - c^2*f*log(f)^2 - 9*I*c*f^2*log(f) - 9 
*f^3)*sqrt(-c*log(f) - I*f)*erf(sqrt(-c*log(f) - I*f)*x)*e^(a*log(f) + I*d 
) - 3*sqrt(pi)*(I*c^3*log(f)^3 - c^2*f*log(f)^2 + 9*I*c*f^2*log(f) - 9*f^3 
)*sqrt(-c*log(f) + I*f)*erf(sqrt(-c*log(f) + I*f)*x)*e^(a*log(f) - I*d) + 
sqrt(pi)*(I*c^3*log(f)^3 - 3*c^2*f*log(f)^2 + I*c*f^2*log(f) - 3*f^3)*sqrt 
(-c*log(f) + 3*I*f)*erf(sqrt(-c*log(f) + 3*I*f)*x)*e^(a*log(f) - 3*I*d))/( 
c^4*log(f)^4 + 10*c^2*f^2*log(f)^2 + 9*f^4)
 

Sympy [F]

\[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\int f^{a + c x^{2}} \sin ^{3}{\left (d + f x^{2} \right )}\, dx \] Input:

integrate(f**(c*x**2+a)*sin(f*x**2+d)**3,x)
                                                                                    
                                                                                    
 

Output:

Integral(f**(a + c*x**2)*sin(d + f*x**2)**3, x)
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 661 vs. \(2 (145) = 290\).

Time = 0.06 (sec) , antiderivative size = 661, normalized size of antiderivative = 3.10 \[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx =\text {Too large to display} \] Input:

integrate(f^(c*x^2+a)*sin(f*x^2+d)^3,x, algorithm="maxima")
 

Output:

-1/32*(sqrt(pi)*sqrt(2*c^2*log(f)^2 + 18*f^2)*(((c^2*cos(3*d) - I*c^2*sin( 
3*d))*f^a*log(f)^2 + f^(a + 2)*(cos(3*d) - I*sin(3*d)))*erf(sqrt(-c*log(f) 
 + 3*I*f)*x) + ((c^2*cos(3*d) + I*c^2*sin(3*d))*f^a*log(f)^2 + f^(a + 2)*( 
cos(3*d) + I*sin(3*d)))*erf(sqrt(-c*log(f) - 3*I*f)*x))*sqrt(c*log(f) + sq 
rt(c^2*log(f)^2 + 9*f^2)) - 3*sqrt(pi)*sqrt(2*c^2*log(f)^2 + 2*f^2)*(((c^2 
*cos(d) - I*c^2*sin(d))*f^a*log(f)^2 + 9*f^(a + 2)*(cos(d) - I*sin(d)))*er 
f(sqrt(-c*log(f) + I*f)*x) + ((c^2*cos(d) + I*c^2*sin(d))*f^a*log(f)^2 + 9 
*f^(a + 2)*(cos(d) + I*sin(d)))*erf(sqrt(-c*log(f) - I*f)*x))*sqrt(c*log(f 
) + sqrt(c^2*log(f)^2 + f^2)) + sqrt(pi)*sqrt(2*c^2*log(f)^2 + 18*f^2)*((( 
I*c^2*cos(3*d) + c^2*sin(3*d))*f^a*log(f)^2 + f^(a + 2)*(I*cos(3*d) + sin( 
3*d)))*erf(sqrt(-c*log(f) + 3*I*f)*x) + ((-I*c^2*cos(3*d) + c^2*sin(3*d))* 
f^a*log(f)^2 + f^(a + 2)*(-I*cos(3*d) + sin(3*d)))*erf(sqrt(-c*log(f) - 3* 
I*f)*x))*sqrt(-c*log(f) + sqrt(c^2*log(f)^2 + 9*f^2)) + 3*sqrt(pi)*sqrt(2* 
c^2*log(f)^2 + 2*f^2)*(((-I*c^2*cos(d) - c^2*sin(d))*f^a*log(f)^2 + 9*f^(a 
 + 2)*(-I*cos(d) - sin(d)))*erf(sqrt(-c*log(f) + I*f)*x) + ((I*c^2*cos(d) 
- c^2*sin(d))*f^a*log(f)^2 + 9*f^(a + 2)*(I*cos(d) - sin(d)))*erf(sqrt(-c* 
log(f) - I*f)*x))*sqrt(-c*log(f) + sqrt(c^2*log(f)^2 + f^2)))/(c^4*log(f)^ 
4 + 10*c^2*f^2*log(f)^2 + 9*f^4)
 

Giac [F]

\[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\int { f^{c x^{2} + a} \sin \left (f x^{2} + d\right )^{3} \,d x } \] Input:

integrate(f^(c*x^2+a)*sin(f*x^2+d)^3,x, algorithm="giac")
 

Output:

integrate(f^(c*x^2 + a)*sin(f*x^2 + d)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=\int f^{c\,x^2+a}\,{\sin \left (f\,x^2+d\right )}^3 \,d x \] Input:

int(f^(a + c*x^2)*sin(d + f*x^2)^3,x)
 

Output:

int(f^(a + c*x^2)*sin(d + f*x^2)^3, x)
 

Reduce [F]

\[ \int f^{a+c x^2} \sin ^3\left (d+f x^2\right ) \, dx=f^{a} \left (\int f^{c \,x^{2}} \sin \left (f \,x^{2}+d \right )^{3}d x \right ) \] Input:

int(f^(c*x^2+a)*sin(f*x^2+d)^3,x)
 

Output:

f**a*int(f**(c*x**2)*sin(d + f*x**2)**3,x)