3.1 \(\int \frac{1}{\sqrt{2}+\cos (z)+\sin (z)} \, dz\)

Optimal. Leaf size=22 \[ -\frac{1-\sqrt{2} \sin (z)}{\cos (z)-\sin (z)} \]

[Out]

-((1 - Sqrt[2]*Sin[z])/(Cos[z] - Sin[z]))

________________________________________________________________________________________

Rubi [A]  time = 0.135323, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3114} \[ -\frac{1-\sqrt{2} \sin (z)}{\cos (z)-\sin (z)} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[2] + Cos[z] + Sin[z])^(-1),z]

[Out]

-((1 - Sqrt[2]*Sin[z])/(Cos[z] - Sin[z]))

Rule 3114

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> -Simp[(c - a*Sin
[d + e*x])/(c*e*(c*Cos[d + e*x] - b*Sin[d + e*x])), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[a^2 - b^2 - c^2, 0]

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{2}+\cos (z)+\sin (z)} \, dz &=-\frac{1-\sqrt{2} \sin (z)}{\cos (z)-\sin (z)}\\ \end{align*}

Mathematica [C]  time = 0.0607091, size = 77, normalized size = 3.5 \[ \frac{\left ((1+i)-i \sqrt{2}\right ) \sin \left (\frac{z}{2}\right )-\left (\sqrt{2}+(1+3 i)\right ) \cos \left (\frac{z}{2}\right )}{i \left (\sqrt{2}+(-1-i)\right ) \sin \left (\frac{z}{2}\right )+\left (\sqrt{2}+(1+i)\right ) \cos \left (\frac{z}{2}\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[2] + Cos[z] + Sin[z])^(-1),z]

[Out]

(-(((1 + 3*I) + Sqrt[2])*Cos[z/2]) + ((1 + I) - I*Sqrt[2])*Sin[z/2])/(((1 + I) + Sqrt[2])*Cos[z/2] + I*((-1 -
I) + Sqrt[2])*Sin[z/2])

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 21, normalized size = 1. \begin{align*} -2\,{\frac{1}{ \left ( \sqrt{2}-1 \right ) \left ( \tan \left ( z/2 \right ) +\sqrt{2}+1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(2^(1/2)-1)/(tan(1/2*z)+2^(1/2)+1)

________________________________________________________________________________________

Maxima [A]  time = 1.43676, size = 27, normalized size = 1.23 \begin{align*} -\frac{2}{\frac{{\left (\sqrt{2} - 1\right )} \sin \left (z\right )}{\cos \left (z\right ) + 1} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/((sqrt(2) - 1)*sin(z)/(cos(z) + 1) + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.02825, size = 82, normalized size = 3.73 \begin{align*} \frac{\sqrt{2} \cos \left (z\right ) + \sqrt{2} \sin \left (z\right ) - 2}{2 \,{\left (\cos \left (z\right ) - \sin \left (z\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(sqrt(2)*cos(z) + sqrt(2)*sin(z) - 2)/(cos(z) - sin(z))

________________________________________________________________________________________

Sympy [B]  time = 6.84537, size = 51, normalized size = 2.32 \begin{align*} - \frac{2 \tan{\left (\frac{z}{2} \right )}}{- \tan{\left (\frac{z}{2} \right )} + \sqrt{2} \tan{\left (\frac{z}{2} \right )} + 1} + \frac{2 \sqrt{2} \tan{\left (\frac{z}{2} \right )}}{- \tan{\left (\frac{z}{2} \right )} + \sqrt{2} \tan{\left (\frac{z}{2} \right )} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*tan(z/2)/(-tan(z/2) + sqrt(2)*tan(z/2) + 1) + 2*sqrt(2)*tan(z/2)/(-tan(z/2) + sqrt(2)*tan(z/2) + 1)

________________________________________________________________________________________

Giac [A]  time = 1.1178, size = 24, normalized size = 1.09 \begin{align*} -\frac{2 \,{\left (\sqrt{2} + 1\right )}}{\sqrt{2} + \tan \left (\frac{1}{2} \, z\right ) + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(sqrt(2) + 1)/(sqrt(2) + tan(1/2*z) + 1)