3.809 \(\int \frac {\cos (x)}{\sin (x)+\sin ^{\sqrt {2}}(x)} \, dx\)

Optimal. Leaf size=26 \[ \log (\sin (x))-\left (1+\sqrt {2}\right ) \log \left (\sin ^{\sqrt {2}-1}(x)+1\right ) \]

[Out]

ln(sin(x))-ln(1+sin(x)^(2^(1/2)-1))*(1+2^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4334, 266, 36, 29, 31} \[ \log (\sin (x))-\left (1+\sqrt {2}\right ) \log \left (\sin ^{\sqrt {2}-1}(x)+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(Sin[x] + Sin[x]^Sqrt[2]),x]

[Out]

Log[Sin[x]] - (1 + Sqrt[2])*Log[1 + Sin[x]^(-1 + Sqrt[2])]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4334

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[d/(b
*c), Subst[Int[SubstFor[1, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a +
 b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cos] || EqQ[F, cos])

Rubi steps

\begin {align*} \int \frac {\cos (x)}{\sin (x)+\sin ^{\sqrt {2}}(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{x \left (1+x^{-1+\sqrt {2}}\right )} \, dx,x,\sin (x)\right )\\ &=\left (1+\sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,\sin ^{-1+\sqrt {2}}(x)\right )\\ &=\left (-1-\sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,\sin ^{-1+\sqrt {2}}(x)\right )+\left (1+\sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,\sin ^{-1+\sqrt {2}}(x)\right )\\ &=\log (\sin (x))-\left (1+\sqrt {2}\right ) \log \left (1+\sin ^{-1+\sqrt {2}}(x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 26, normalized size = 1.00 \[ \log (\sin (x))-\left (1+\sqrt {2}\right ) \log \left (\sin ^{\sqrt {2}-1}(x)+1\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(Sin[x] + Sin[x]^Sqrt[2]),x]

[Out]

Log[Sin[x]] - (1 + Sqrt[2])*Log[1 + Sin[x]^(-1 + Sqrt[2])]

________________________________________________________________________________________

fricas [A]  time = 1.39, size = 27, normalized size = 1.04 \[ -{\left (\sqrt {2} + 1\right )} \log \left (\sin \relax (x)^{\left (\sqrt {2}\right )} + \sin \relax (x)\right ) + {\left (\sqrt {2} + 2\right )} \log \left (\sin \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(sqrt(2) + 1)*log(sin(x)^sqrt(2) + sin(x)) + (sqrt(2) + 2)*log(sin(x))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \relax (x)}{\sin \relax (x)^{\left (\sqrt {2}\right )} + \sin \relax (x)}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(cos(x)/(sin(x)^sqrt(2) + sin(x)), x)

________________________________________________________________________________________

maple [C]  time = 0.75, size = 1856, normalized size = 71.38 \[ \text {Expression too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*I*2^(1/2)*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(exp(I*x)-1))*csgn(I*(1+exp(I*x)))*Pi+1/2*I*2^(1/2)*cs
gn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn(I*exp(-I*x))*Pi-2*ln(2)-I*Pi+1/2*I*2^
(1/2)*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^2*csgn(I*(exp(I*x)-1))*Pi+1/2*I*2^(1/2)*csgn(I*(exp(I*x)-1)*(1+exp(I*x
)))^2*csgn(I*(1+exp(I*x)))*Pi+1/2*I*2^(1/2)*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x
)))^2*Pi+1/2*I*2^(1/2)*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^2*csgn(I*exp(-I*x))*Pi-1/2*I*2^(1/2)*csgn(I*(1+exp(
I*x))*(-1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-1/2*I*2^(1/2)*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))
*csgn((1+exp(I*x))*(-1+exp(-I*x)))*Pi+I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*
csgn(I*exp(-I*x))*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(exp(I*x)-1))*csgn(I*(1+exp(I*x)))*Pi-1/2*I*2^
(1/2)*Pi-I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-I*csgn(I*(1+exp(I*x))*(-
1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^3*Pi+I*csgn(I*(1+exp(I*
x))*(-1+exp(-I*x)))^3*Pi+I*csgn((1+exp(I*x))*(-1+exp(-I*x)))^3*Pi+I*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-ln(
exp(-1/2*2^(1/2)*(I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(exp(I*x)-1))*csgn(I*(1+exp(I*x)))*Pi+I*csgn(I*(1
+exp(I*x))*(-1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi+I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^3*Pi-I*c
sgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn(I*exp(-I*x))*Pi-I*csgn(I*(exp(I*x)-1
)*(1+exp(I*x)))^2*csgn(I*(1+exp(I*x)))*Pi+I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x
)))*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^2*csgn(I*(exp(I*x)-1))*Pi-I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^2*c
sgn(I*exp(-I*x))*Pi+I*Pi-I*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(
1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^3*Pi-I*csgn((1+exp(I*x))*(-1+exp(-I*x))
)^3*Pi+2*ln(exp(I*x))-2*ln(exp(I*x)-1)-2*ln(1+exp(I*x))+2*ln(2)))+sin(x))+2*ln(1+exp(I*x))-ln(exp(-1/2*2^(1/2)
*(I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(exp(I*x)-1))*csgn(I*(1+exp(I*x)))*Pi+I*csgn(I*(1+exp(I*x))*(-1+e
xp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi+I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^3*Pi-I*csgn(I*(exp(I*x)-
1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn(I*exp(-I*x))*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^
2*csgn(I*(1+exp(I*x)))*Pi+I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))*csgn((1+exp(I*x))*(-1+exp(-I*x)))*Pi-I*csgn(I*
(exp(I*x)-1)*(1+exp(I*x)))^2*csgn(I*(exp(I*x)-1))*Pi-I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^2*csgn(I*exp(-I*x))
*Pi+I*Pi-I*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+
exp(-I*x)))^2*Pi-I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^3*Pi-I*csgn((1+exp(I*x))*(-1+exp(-I*x)))^3*Pi+2*ln(exp(
I*x))-2*ln(exp(I*x)-1)-2*ln(1+exp(I*x))+2*ln(2)))+sin(x))*2^(1/2)-1/2*I*2^(1/2)*csgn(I*(exp(I*x)-1)*(1+exp(I*x
)))^3*Pi+1/2*I*2^(1/2)*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^3*Pi+1/2*I*2^(1/2)*csgn((1+exp(I*x))*(-1+exp(-I*x))
)^3*Pi+1/2*I*2^(1/2)*csgn((1+exp(I*x))*(-1+exp(-I*x)))^2*Pi-2*ln(exp(I*x))+I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))
^2*csgn(I*(exp(I*x)-1))*Pi+I*csgn(I*(exp(I*x)-1)*(1+exp(I*x)))^2*csgn(I*(1+exp(I*x)))*Pi+I*csgn(I*(exp(I*x)-1)
*(1+exp(I*x)))*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^2*Pi+I*csgn(I*(1+exp(I*x))*(-1+exp(-I*x)))^2*csgn(I*exp(-I*
x))*Pi+2*ln(exp(I*x)-1)-2^(1/2)*ln(exp(I*x))+2^(1/2)*ln(exp(I*x)-1)+2^(1/2)*ln(1+exp(I*x))-2^(1/2)*ln(2)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 34, normalized size = 1.31 \[ \frac {\sqrt {2} \log \left (\sin \relax (x)\right )}{\sqrt {2} - 1} - \frac {\log \left (\sin \relax (x)^{\left (\sqrt {2}\right )} + \sin \relax (x)\right )}{\sqrt {2} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*log(sin(x))/(sqrt(2) - 1) - log(sin(x)^sqrt(2) + sin(x))/(sqrt(2) - 1)

________________________________________________________________________________________

mupad [B]  time = 3.08, size = 29, normalized size = 1.12 \[ \ln \left (\sin \relax (x)\right )\,\left (\sqrt {2}+2\right )-\frac {\ln \left (\sin \relax (x)+{\sin \relax (x)}^{\sqrt {2}}\right )}{\sqrt {2}-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(sin(x))*(2^(1/2) + 2) - log(sin(x) + sin(x)^(2^(1/2)))/(2^(1/2) - 1)

________________________________________________________________________________________

sympy [B]  time = 1.07, size = 82, normalized size = 3.15 \[ \frac {\sqrt {2} \log {\left (\sin {\relax (x )} + \sin ^{\sqrt {2}}{\relax (x )} \right )}}{-3 + 2 \sqrt {2}} - \frac {\log {\left (\sin {\relax (x )} + \sin ^{\sqrt {2}}{\relax (x )} \right )}}{-3 + 2 \sqrt {2}} + \frac {\sqrt {2} \log {\left (\sin {\relax (x )} \right )}}{-3 + 2 \sqrt {2}} - \frac {2 \log {\left (\sin {\relax (x )} \right )}}{-3 + 2 \sqrt {2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*log(sin(x) + sin(x)**(sqrt(2)))/(-3 + 2*sqrt(2)) - log(sin(x) + sin(x)**(sqrt(2)))/(-3 + 2*sqrt(2)) +
sqrt(2)*log(sin(x))/(-3 + 2*sqrt(2)) - 2*log(sin(x))/(-3 + 2*sqrt(2))

________________________________________________________________________________________