1
$\begingroup$

Attempt to find the indefinite integral:

$$\int \frac{1}{\sin x+\cos x}\, dx$$

WolframAlpha gives an unsatisfactory answer (this is one of the integrals that couldn't give the best answer):

$$(-1-i)(-1)^{\frac{3}{4}}\operatorname{arctanh}\frac{\tan(\frac{x}{2})-1}{\sqrt{2}}+C$$

Substitution also does not appear to work.

  • 0
    use the tan-half angle substitution2017-02-01
  • 0
    Actually that's what WolframAlpha did haha2017-02-01
  • 0
    Hint: what's $(-1)^\frac{3}{4}$?2017-02-01
  • 0
    That's the result the computer gave2017-02-01
  • 0
    **Wolfram Alpha** gave an unsimplified result from symbolic manipulation. Taking the principal value, $$(-1-i)(-1)^{\frac{3}{4}}=\sqrt{2}$$ or try a more general case of $$\int \frac{dx}{a\sin x+b\cos x}$$ See the result [**here**](http://www.wolframalpha.com/input/?i=integrate%5B1%2F(a+sin(x)%2Bb+cos(x)),x%5D)2017-02-01
  • 0
    ^ True, but the answer below is far superior to the one WolframAlpha gives.2017-02-01
  • 0
    check out a similar problem http://math.stackexchange.com/questions/2087128/an-indefinite-integral-int-fracdx-sinx-sqrt-sin2x-alpha2017-02-01

4 Answers 4

3

$$\int\frac{dx}{\sin x+\cos x}=\frac{\sqrt2}2\int\dfrac{dx}{\frac{\sqrt2}2\cos x+\frac{\sqrt2}2\sin x}=\frac{\sqrt2}2\int\sec(x-\frac{\pi}4)dx$$

Does this help?

  • 0
    Yup exactly what I'm looking for. :P2017-02-01
2

For $$I=\int\dfrac{dy}{A\sin2y+B\cos2y}=\int\dfrac{\sec^2y\ dy}{2A\tan y+B(1-\tan^2y)}$$

use Weierstrass substitution $t=\tan y$ to find $$I=\int\dfrac{dt}{2At+B(1-t^2)}=B\int\dfrac{dt}{B^2-A^2-(Bt+A)^2}$$

Here $2y=x$

  • 0
    An interesring similar problem please check it out http://math.stackexchange.com/questions/2087128/an-indefinite-integral-int-fracd2017-02-01
  • 0
    @navinstudent, Posted an answer there.2017-02-02
0

It is a bit unclear if you ask for another suggestion, or how to complete the calculation with $u=\tan(x/2)$.

I suggest that you instead let $u=\cos x-\sin x$. You will end up with $$ -\int\frac{1}{2-u^2}\,du, $$ which I suppose you can handle.

  • 0
    Then when you differentiate u you will get $\frac{du}{dx}=-sinx-cosx$ which would lead to further complications which are quite unnecessary.2017-02-01
  • 0
    I don't think they are complicated nor unnecessary. But I respect that you don't like the solution I gave.2017-02-01
0

Hint $\int \frac{1+tan^2x/2}{2tanx/2 + 1-tan^2x/2}dx$ which is same as $\int \frac{sec^2x/2}{1+2tanx/2-tan^2x/2}dx$ Now put $tanx/2=t $ and proceed.

  • 0
    Yup as mentioned WolframAlpha tried to use this half angle substitution and it gave the result shown above which is not satisfactory.2017-02-01