\(\int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx\) [331]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [F(-2)]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 18, antiderivative size = 33 \[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=-\frac {2 x \sqrt {\cos (a+b x)}}{b}+\frac {4 E\left (\left .\frac {1}{2} (a+b x)\right |2\right )}{b^2} \] Output:

-2*x*cos(b*x+a)^(1/2)/b+4*EllipticE(sin(1/2*a+1/2*b*x),2^(1/2))/b^2
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 0.67 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.00 \[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=-\frac {2 \sqrt {\cos (a+b x)} \left (b x-2 \tan (a+b x)+\operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {3}{2},-\tan ^2(a+b x)\right ) \sqrt [4]{\sec ^2(a+b x)} \tan (a+b x)\right )}{b^2} \] Input:

Integrate[(x*Sin[a + b*x])/Sqrt[Cos[a + b*x]],x]
 

Output:

(-2*Sqrt[Cos[a + b*x]]*(b*x - 2*Tan[a + b*x] + Hypergeometric2F1[1/4, 1/2, 
 3/2, -Tan[a + b*x]^2]*(Sec[a + b*x]^2)^(1/4)*Tan[a + b*x]))/b^2
 

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3925, 3042, 3119}

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 \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx\)

\(\Big \downarrow \) 3925

\(\displaystyle \frac {2 \int \sqrt {\cos (a+b x)}dx}{b}-\frac {2 x \sqrt {\cos (a+b x)}}{b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \int \sqrt {\sin \left (a+b x+\frac {\pi }{2}\right )}dx}{b}-\frac {2 x \sqrt {\cos (a+b x)}}{b}\)

\(\Big \downarrow \) 3119

\(\displaystyle \frac {4 E\left (\left .\frac {1}{2} (a+b x)\right |2\right )}{b^2}-\frac {2 x \sqrt {\cos (a+b x)}}{b}\)

Input:

Int[(x*Sin[a + b*x])/Sqrt[Cos[a + b*x]],x]
 

Output:

(-2*x*Sqrt[Cos[a + b*x]])/b + (4*EllipticE[(a + b*x)/2, 2])/b^2
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3119
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* 
(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3925
Int[Cos[(a_.) + (b_.)*(x_)^(n_.)]^(p_.)*(x_)^(m_.)*Sin[(a_.) + (b_.)*(x_)^( 
n_.)], x_Symbol] :> Simp[(-x^(m - n + 1))*(Cos[a + b*x^n]^(p + 1)/(b*n*(p + 
 1))), x] + Simp[(m - n + 1)/(b*n*(p + 1))   Int[x^(m - n)*Cos[a + b*x^n]^( 
p + 1), x], x] /; FreeQ[{a, b, p}, x] && LtQ[0, n, m + 1] && NeQ[p, -1]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.23 (sec) , antiderivative size = 310, normalized size of antiderivative = 9.39

method result size
risch \(-\frac {\left (b x +2 i\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right ) \sqrt {2}\, {\mathrm e}^{-i \left (b x +a \right )}}{b^{2} \sqrt {{\mathrm e}^{-i \left (b x +a \right )} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}}-\frac {2 i \left (-\frac {2 \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{\sqrt {{\mathrm e}^{i \left (b x +a \right )} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (b x +a \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (b x +a \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (b x +a \right )}}\, \left (-2 i \operatorname {EllipticE}\left (\sqrt {-i \left ({\mathrm e}^{i \left (b x +a \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (b x +a \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {{\mathrm e}^{3 i \left (b x +a \right )}+{\mathrm e}^{i \left (b x +a \right )}}}\right ) \sqrt {2}\, \sqrt {{\mathrm e}^{i \left (b x +a \right )} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}\, {\mathrm e}^{-i \left (b x +a \right )}}{b^{2} \sqrt {{\mathrm e}^{-i \left (b x +a \right )} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}}\) \(310\)

Input:

int(x*sin(b*x+a)/cos(b*x+a)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

-(b*x+2*I)*(exp(I*(b*x+a))^2+1)/b^2*2^(1/2)/(1/exp(I*(b*x+a))*(exp(I*(b*x+ 
a))^2+1))^(1/2)/exp(I*(b*x+a))-2*I/b^2*(-2*(exp(I*(b*x+a))^2+1)/(exp(I*(b* 
x+a))*(exp(I*(b*x+a))^2+1))^(1/2)+I*(-I*(exp(I*(b*x+a))+I))^(1/2)*2^(1/2)* 
(I*(exp(I*(b*x+a))-I))^(1/2)*(I*exp(I*(b*x+a)))^(1/2)/(exp(I*(b*x+a))^3+ex 
p(I*(b*x+a)))^(1/2)*(-2*I*EllipticE((-I*(exp(I*(b*x+a))+I))^(1/2),1/2*2^(1 
/2))+I*EllipticF((-I*(exp(I*(b*x+a))+I))^(1/2),1/2*2^(1/2))))*2^(1/2)/(1/e 
xp(I*(b*x+a))*(exp(I*(b*x+a))^2+1))^(1/2)*(exp(I*(b*x+a))*(exp(I*(b*x+a))^ 
2+1))^(1/2)/exp(I*(b*x+a))
 

Fricas [F(-2)]

Exception generated. \[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\text {Exception raised: TypeError} \] Input:

integrate(x*sin(b*x+a)/cos(b*x+a)^(1/2),x, algorithm="fricas")
 

Output:

Exception raised: TypeError >>  Error detected within library code:   inte 
grate: implementation incomplete (has polynomial part)
 

Sympy [F]

\[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\int \frac {x \sin {\left (a + b x \right )}}{\sqrt {\cos {\left (a + b x \right )}}}\, dx \] Input:

integrate(x*sin(b*x+a)/cos(b*x+a)**(1/2),x)
 

Output:

Integral(x*sin(a + b*x)/sqrt(cos(a + b*x)), x)
 

Maxima [F]

\[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\int { \frac {x \sin \left (b x + a\right )}{\sqrt {\cos \left (b x + a\right )}} \,d x } \] Input:

integrate(x*sin(b*x+a)/cos(b*x+a)^(1/2),x, algorithm="maxima")
 

Output:

integrate(x*sin(b*x + a)/sqrt(cos(b*x + a)), x)
 

Giac [F]

\[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\int { \frac {x \sin \left (b x + a\right )}{\sqrt {\cos \left (b x + a\right )}} \,d x } \] Input:

integrate(x*sin(b*x+a)/cos(b*x+a)^(1/2),x, algorithm="giac")
 

Output:

integrate(x*sin(b*x + a)/sqrt(cos(b*x + a)), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\int \frac {x\,\sin \left (a+b\,x\right )}{\sqrt {\cos \left (a+b\,x\right )}} \,d x \] Input:

int((x*sin(a + b*x))/cos(a + b*x)^(1/2),x)
 

Output:

int((x*sin(a + b*x))/cos(a + b*x)^(1/2), x)
 

Reduce [F]

\[ \int \frac {x \sin (a+b x)}{\sqrt {\cos (a+b x)}} \, dx=\int \frac {\sqrt {\cos \left (b x +a \right )}\, \sin \left (b x +a \right ) x}{\cos \left (b x +a \right )}d x \] Input:

int(x*sin(b*x+a)/cos(b*x+a)^(1/2),x)
 

Output:

int((sqrt(cos(a + b*x))*sin(a + b*x)*x)/cos(a + b*x),x)