2

I am trying to evaluate $$\int \frac{2(\sin(x)\cos(x)-1)}{1-\cos(x)-\sin(x)+\sin(x)\cos(x)}dx$$

There were some methods I could think of (none of them seemed to work).

First is obviously using tangent half-angle formulas, and turns out WolframAlpha evaluates the integral by this method too. But I really couldn't factor things the way W|A did.

The second thing I thought of was using the substitution

$\sin x+\cos x=u$,$x+\pi/4-n\pi=\arcsin\frac{u}{\sqrt{2}}$ or, $dx=\frac{1}{\sqrt{2-u^2}}du$

The integral transforms to $$\int \frac{u^2-3}{(1-2u+u^2)(\sqrt{2-u^2})}du$$ This substitution seems to have failed miserably.

Another way I thought about the problem was to factor the denominator in the original integral. i.e.

$$\int \frac{2(\sin(x)\cos(x)-1)}{(1-\cos(x))(1-\sin(x))}dx$$ I'm not sure on how to solve with this method either. May I ask for help on how to proceed?

RobPratt
  • 50,938
Aniii
  • 155
  • 9

6 Answers6

4

Here is another (easier) way to evaluate your integral.

It results that

$\displaystyle\int\dfrac{2\big[\sin(x)\cos(x)-1\big]}{1-\cos(x)-\sin(x)+\sin(x)\cos(x)}\,\mathrm dx=$

$\!\!\!\!\!\!=\!\!\!\displaystyle\int\!\dfrac{2\big[\color{blue}{1\!\!-\!\!\cos(x)\!\!-\!\!\sin(x)\!\!+\!\!\sin(x)\!\cos(x)}\!\!+\!\!\color{red}{\cos(x)\!\!+\!\!\sin(x)\!\!-\!\!2}\big]}{\color{blue}{1-\cos(x)-\sin(x)+\sin(x)\cos(x)}}\mathrm dx\!=$

$=\displaystyle2\int\left[1+\dfrac{\color{brown}{\cos(x)-1}+\color{green}{\sin(x)-1}}{\big(\color{green}{\sin(x)-1}\big)\big(\color{brown}{\cos(x)-1}\big)}\right]\mathrm dx=$

$=\displaystyle2\int\left[1+\dfrac1{\sin(x)-1}+\dfrac1{\cos(x)-1}\right]\mathrm dx=$

$\!\!\!\!\!=\!\displaystyle2\!\left[\int\!1\,\mathrm dx\!+\!\!\int\!\!\dfrac1{\sin(x)\!-\!1}\mathrm dx\!+\!\!\int\!\!\dfrac1{\cos(x)\!-\!1}\mathrm dx\right]\!\underset{\overbrace{\color{brown}{\text{ by letting }\,u=\cot\left(\!\frac x2\!\right)\;}\\\quad\color{brown}{x=2\,\mathrm{arccot}\,u}}}{=}$

$\!\!\!\!=\!\displaystyle2\!\left[x+\!\!\int\!\dfrac1{\frac{2u}{1+u^2}\!-\!1}\left(\!\dfrac{-2}{1\!+\!u^2}\!\right)\!\mathrm du\!+\!\!\int\!\dfrac1{\frac{u^2-1}{1+u^2}\!-\!1}\left(\!\dfrac{-2}{1\!+\!u^2}\!\right)\!\mathrm du\right]\!=$

$=\displaystyle2\!\left[x+\!\!\int\!\dfrac2{(u-1)^2}\,\mathrm du+\!\int1\,\mathrm du\right]=$

$=2\left[x-\dfrac2{u-1}+u\right]+C=$

$=2\left[x-\dfrac2{\cot\left(\frac x2\right)\!-\!1}+\cot\left(\dfrac x2\right)\right]+C\;.$

Angelo
  • 13,952
2

Rationalize the denominator. That is multiply the numerator and denominator by $(1+\cos(x))$ and $(1+\sin(x))$.

Your integral can be written as:

$$\int\frac{\sin(2x)-2}{(1-\cos(x))(1-\sin(x))}dx$$

Now multiply the numerator and denominator by $(1+\cos(x))$ and $(1+\sin(x))$

That is your integral will become

$$\int\frac{\sin(2x)-2)(1+\cos(x))(1+\sin(x))}{\sin^{2}(x)×\cos^{2}(x)}dx$$

$$=\int\frac{\sin(2x)(1+\sin(x)(1+\cos(x))}{\sin^{2}(x)×\cos^{2}(x)}- [2\int\frac{(1+\cos(x))(1+\sin(x))}{\sin^{2}(x)×\cos^{2}(x)}]$$

Now try to integrate.

I have given enough hints

  • Just multiply, then divide and integrate. I think it will be simple now. –  Aug 25 '24 at 16:17
  • For integral of $\int\frac{1}{\sin(x)×\cos(x)}dx$, multiply the numerator and denominator by $2$ and then integrate $\csc(2x)$ and for integral of $\int\frac{1}{\sin^{2}(x)×\cos^{2}(x)}dx$ multiply the numerator and denominator by $4$. Then try to integrate $\csc^{2}(2x)$ –  Aug 25 '24 at 16:20
  • Have u understood @Aniii? –  Aug 25 '24 at 16:30
  • Thanks for the answer. How to evaluate $\int\frac{(1+cosx)(1+sinx)}{sin^2xcos^2x}dx$ though? – Aniii Aug 25 '24 at 17:04
  • No need of Thank You. It's my duty to help others @Aniii –  Aug 25 '24 at 17:45
2

\begin{align} &\int \frac{\sin x\cos x-1}{(1-\cos x)(1-\sin x)}dx\\ = &\int \frac{(\sin x\cos x-1)(1+\cos x)(1+\sin x)}{(1-\cos^2 x)(1-\sin^2x)}dx\\ = &\int \frac{\sin^2x\cos^2x-\sin^3x-\cos^3x-\sin^2x-\cos^2x}{\sin^2 x\cos^2x}dx\\ =&\int \left(1-\tan x\sec x-\cot x \csc x-\sec^2 x-\csc^2x\right)dx\\ =& \ x -\sec x + \csc x -\tan x +\cot x + C \end{align}

Quanto
  • 120,125
  • Thanks, this method seems quite similar to Subha Sankar Roy's, though it's definitely clearer to me. – Aniii Aug 26 '24 at 12:25
1

The substitution doesn't completely fail, you just need to do an Euler substitution and you're done. $$\text{Hint: }\sqrt{2-u^2}=ut-\sqrt{2}$$ $$\text{Then: }u = \frac{2t\sqrt{2}}{t^2+1}$$ But because the substitution is a bit ugly, we can just ditch that approach, unless you're patient enough.

For this answer, I'm going for the most obvious solution, which Bowei Tang also pointed it out in the comment, tangent half-angle substitution.

Set $t = \tan (\frac{x}{2})$, then: $$I = -2\int\frac{t^4+2t^3+2t^2-2t+1}{t^6-2t^5+2t^4-2t^3+t^2}\,dt = -2\int\frac{t^4+2t^3+2t^2-2t+1}{t^2(t^2+1)(t-1)^2}\,dt$$ Since you also asked how to do partial fraction decomposition, I should also point it out here: $$\text{Suppose the final form after decomposition is: } f(t) = \frac{A}{t}+\frac{B}{t^2}+\frac{C}{t-1}+\frac{D}{(t-1)^2}+\frac{Ex+F}{t^2+1}$$

You can multiply with the least common denominator but I wouldn't recommend this method because it's too long. A more effective alternate method is Heaviside cover-up method. You can search how it works on here, and search some of my old posts to see how to use it for repeated roots.

Once you've done with the partial fractions, it's easier now. I think you can proceed on your own from here.

  • Thanks. I'm already familiar with the Heaviside cover-up method. I couldn't quite wrap my head around the factors of the denominator. It's all good now. – Aniii Aug 26 '24 at 14:46
0

$\int \frac{1}{\cos^{2}(x)×\sin(x)}dx= \frac{1}{2}[\int\frac{(1+\cos(x))-(1-\cos(x))}{(1+\cos(x))(1-\cos(x))\cos(x)}]dx=\frac{1}{2}[\int\frac{1}{(1-\cos(x))\cos(x)}dx-\int\frac{1}{(1+\cos(x))\cos(x)}dx]$

Now kindly try yourself.

0

You've missed a factor of $2$ while performing the substitution $u=\sin x+\cos x$. It hasn't failed although it makes the computation of the integral somewhat lengthy. I'll give an answer that is completely free from any Euler substitution and PFD nonsense, which I personally think is much cleaner and easier.

$$\begin{align}2\int\frac{u^2-3}{(u-1)^2\sqrt{2-u^2}}\mathrm du&=2\int\frac{(u-1)^2+2(u-1)-2}{(u-1)^2\sqrt{2-u^2}}\mathrm du\\&=2\int\frac{\mathrm du}{\sqrt{2-u^2}}+4\int\frac{\mathrm du}{(u-1)\sqrt{2-u^2}}-4\int\frac{\mathrm du}{(u-1)^2\sqrt{2-u^2}}\end{align}$$

The second and the third integrals can be integrated by the substitution $u-1=\frac1{t}$.

Integreek
  • 8,530