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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0490014, antiderivative size = 26, normalized size of antiderivative = 1., 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 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])

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 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 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]

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.0416734, size = 26, normalized size = 1. \[ \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])]

________________________________________________________________________________________

Maple [C]  time = 0.566, size = 1856, normalized size = 71.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-I*Pi-1/2*I*2^(1/2)*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)-1))*csgn(I*(exp(I*x)+1))+1/2*I*2^(1/
2)*Pi*cs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*(exp(I*x)-1))*csgn(I*(exp(I*x)+1))+I*Pi-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp
(I*x)+1))-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp(I*x)-1))+I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)
))*csgn((exp(I*x)+1)*(-1+exp(-I*x)))^2-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x
)))*csgn(I*exp(-I*x))-I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2*csgn(I*exp(-I*x))-I*Pi*csgn((exp(I*x)+1)*(-1+
exp(-I*x)))^2-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2+2*ln(2)+2*ln(exp(I*
x))-2*ln(exp(I*x)-1)-2*ln(exp(I*x)+1)))+sin(x))-I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(I*x)+1)*(-1
+exp(-I*x)))^2-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^3-I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(I*x
)+1)*(-1+exp(-I*x)))+1/2*I*2^(1/2)*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp(I*x)-1))+1/2*I*2^(1/2)*P
i*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp(I*x)+1))+1/2*I*2^(1/2)*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*
csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2+1/2*I*2^(1/2)*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2*csgn(I*exp(-I*x))
-1/2*I*2^(1/2)*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(I*x)+1)*(-1+exp(-I*x)))^2-1/2*I*2^(1/2)*Pi*csg
n(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(I*x)+1)*(-1+exp(-I*x)))-ln(exp(-1/2*2^(1/2)*(-I*Pi*csgn((exp(I*x)+1
)*(-1+exp(-I*x)))^3+I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(I*x)+1)*(-1+exp(-I*x)))-I*Pi*csgn(I*(ex
p(I*x)+1)*(-1+exp(-I*x)))^3+I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^3+I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*cs
gn(I*(exp(I*x)-1))*csgn(I*(exp(I*x)+1))+I*Pi-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp(I*x)+1))-I*P
i*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))^2*csgn(I*(exp(I*x)-1))+I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn((exp(
I*x)+1)*(-1+exp(-I*x)))^2-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))*csgn(I*ex
p(-I*x))-I*Pi*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2*csgn(I*exp(-I*x))-I*Pi*csgn((exp(I*x)+1)*(-1+exp(-I*x)))^2
-I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)+1)*(-1+exp(-I*x)))^2+2*ln(2)+2*ln(exp(I*x))-2*ln(exp(
I*x)-1)-2*ln(exp(I*x)+1)))+sin(x))*2^(1/2)+I*Pi*csgn(I*(exp(I*x)-1)*(exp(I*x)+1))*csgn(I*(exp(I*x)+1)*(-1+exp(
-I*x)))*csgn(I*exp(-I*x))-2^(1/2)*ln(2)-2^(1/2)*ln(exp(I*x))+2^(1/2)*ln(exp(I*x)-1)+2^(1/2)*ln(exp(I*x)+1)

________________________________________________________________________________________

Maxima [A]  time = 1.44062, size = 46, normalized size = 1.77 \begin{align*} \frac{\sqrt{2} \log \left (\sin \left (x\right )\right )}{\sqrt{2} - 1} - \frac{\log \left (\sin \left (x\right )^{\left (\sqrt{2}\right )} + \sin \left (x\right )\right )}{\sqrt{2} - 1} \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 2.42289, size = 99, normalized size = 3.81 \begin{align*} -{\left (\sqrt{2} + 1\right )} \log \left (\sin \left (x\right )^{\left (\sqrt{2}\right )} + \sin \left (x\right )\right ) +{\left (\sqrt{2} + 2\right )} \log \left (\sin \left (x\right )\right ) \end{align*}

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))

________________________________________________________________________________________

Sympy [B]  time = 1.26123, size = 82, normalized size = 3.15 \begin{align*} \frac{\sqrt{2} \log{\left (\sin{\left (x \right )} + \sin ^{\sqrt{2}}{\left (x \right )} \right )}}{-3 + 2 \sqrt{2}} - \frac{\log{\left (\sin{\left (x \right )} + \sin ^{\sqrt{2}}{\left (x \right )} \right )}}{-3 + 2 \sqrt{2}} + \frac{\sqrt{2} \log{\left (\sin{\left (x \right )} \right )}}{-3 + 2 \sqrt{2}} - \frac{2 \log{\left (\sin{\left (x \right )} \right )}}{-3 + 2 \sqrt{2}} \end{align*}

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))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (x\right )}{\sin \left (x\right )^{\left (\sqrt{2}\right )} + \sin \left (x\right )}\,{d x} \end{align*}

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)