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

Any hints please? Could'nt think of any approach till now...


closed as off-topic by JonMark Perry, user91500, Davide Giraudo, Michael Albanese, Zain Patel Aug 4 '16 at 19:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – JonMark Perry, user91500, Davide Giraudo, Michael Albanese, Zain Patel
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Partial fraction $\endgroup$ – Kenny Lau Aug 2 '16 at 6:55
  • $\begingroup$ @KennyLau Thanks.Its done ! $\endgroup$ – user220382 Aug 2 '16 at 7:03

When I have a rational function I usually start by making a part of the denominator "appear" in the numerator, and since we're dealing with trigonometric function, the following identity is quite handy: $$\frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)}=\frac{x^2\cos^2x+x^2\sin^2x}{(x \cos x - \sin x )(x \sin x + \cos x)} $$ $$\frac{x^2\cos^2x-x\sin x\cos x+x\sin x\cos x+x^2\sin^2x}{(x \cos x - \sin x )(x \sin x + \cos x)}=\frac{x\cos x(x\cos x-\sin x)+x\sin x(\cos x+x\sin x)}{(x \cos x - \sin x )(x \sin x + \cos x)} $$

$$ = \frac{x \cos x}{ x \sin x + \cos x } + \frac{x \sin x}{x \cos x - \sin x} $$ Let's treat each part separately:

$$I_1=\int \frac{x \cos x}{ x \sin x + \cos x }dx$$ Let $u=x \sin x + \cos x$ then $du=x \cos xdx$ then $$I_1\int \frac {du}u=\ln(u)+c_1$$

Acting similarly on the second term, yields: $$\int \frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)}dx=\ln( x \sin x + \cos x)-\ln(x \cos x - \sin x)+c$$


$$ \begin{aligned} \int\frac{x^{2}}{(x\cos x - \sin x)(x\sin x + \cos x)}\,\mathrm{d}x&=\int\left(\frac{x\sin x + \cos x}{x\cos x - \sin x}\right)^{-1}\frac{x^{2}}{(x\cos x - \sin x)^{2}}\,\mathrm{d}x\\&=\int\left(\frac{x\sin x + \cos x}{x\cos x - \sin x}\right)^{-1}\,\mathrm{d}\!\left(\frac{x\sin x + \cos x}{x\cos x - \sin x}\right)\\ &=\log\left|\frac{x\sin x + \cos x}{x\cos x - \sin x}\right|+C. \end{aligned} $$

  • $\begingroup$ I think, it is the best answer. +1 $\endgroup$ – user2312512851 Apr 15 '17 at 18:45

$$ \frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)} = \frac{x \cos x}{ x \sin x + \cos x } + \frac{x \sin x}{x \ cos x - \sin x} $$

Why I get this:

$$\frac{x^2}{(x \cos x - \sin x)(x \sin x + \cos x)} = \frac{A(x)}{ x \sin x + \cos x } + \frac{B(x)}{x \ cos x - \sin x} \\\ \implies A(x)( x \cos(x)- \sin(x))+ B(x) (x \sin x + \cos x) = x^2$$

So $ A(x) = ax+b, B(x) = cx + d$.

$(ax+b)(x \cos(x) - \sin(x)) + (cx+d) ( x \sin x + \cos x) = x^2\\\ \implies ax^2 \cos(x) - ax \sin(x) -b\sin(x) + bx \cos(x) + cx ^2 \sin(x) +\\ cx \cos(x) + dx \sin(x) +d \cos(x) = x^2 \implies$

$$ a\cos(x) +c\sin(x) = 1 \tag{1}$$ $$d \cos(x) - b\sin(x) = 0 \tag{2}$$ $$ -a\sin(x)+b\cos(x)+c \cos(x)+ d \sin(x) = 0 \tag{3}$$ $\forall x \in R$

By $(2)$, $d = b = 0$,By $(1)$ and (3), $\cos(x) = a, c = \sin(x)$

  • $\begingroup$ I found this using Kenny's comment at the same moment you posted this answer :-)!However I did the partial fraction by just guesswork.Did you use any formal method? $\endgroup$ – user220382 Aug 2 '16 at 7:03
  • $\begingroup$ @SanchayanDutta Look what I added. $\endgroup$ – Zack Ni Aug 2 '16 at 7:14
  • $\begingroup$ Some doubts.How did you know b=d=0? $\endgroup$ – user220382 Aug 2 '16 at 7:23
  • 1
    $\begingroup$ @SanchayanDutta "forall" statement, let cos(x) = 1, sin(x) =0, then d = 0, let sin(x) = 1, cos(x) = 0, then b = 0. One can also try the $wsin(x)+vcos(x) = \sqrt{} \text{blah blah blah}$ formula. $\endgroup$ – Zack Ni Aug 2 '16 at 7:26

Let $$I = \int\frac{x^2}{(x\sin x+\cos x)\cdot (x\cos x-\sin x)}dx$$

$\displaystyle \bullet\;\; x\sin x+1\cdot \cos x = \sqrt{x^2+1}\left[\sin x\cdot \frac{x}{\sqrt{1+x^2}}+\cos x\cdot \frac{1}{\sqrt{1+x^2}}\right]$

$$=\sqrt{x^2+1}\sin \left(x+\alpha\right)$$

Where $\displaystyle \cot \alpha = x\Rightarrow \alpha = \cot^{-1}(x) = \frac{\pi}{2}-\tan^{-1}(x)$

$\displaystyle \bullet\;\; x\cos x-1\cdot \sin x = -\sqrt{x^2+1}\left[\sin x\cdot \frac{1}{\sqrt{1+x^2}}-\cos x\cdot \frac{x}{\sqrt{1+x^2}}\right]$

$$=-\sqrt{x^2+1}\sin \left(x-\beta\right)$$

Where $\tan \beta = x\Rightarrow \beta = \tan^{-1}(x)$

So $$I = -\int\frac{1}{1\cos(x- \tan^{-1}{x})\cdot \sin (x-\tan^{-1}(x))}\cdot \frac{1}{1+x^2}dx$$

Now Put $x-\tan^{-}(x)=t\;,$ Then $\displaystyle \frac{1}{1+x^2}dx = dt$

So $$I = -\int\frac{\sin^2 t+\cos^2 t}{\sin t \cdot \cos t }dt = -\int \tan t dt-\int \cot t dt$$

So $$I = \ln |\cos t|-\ln |\sin t|+\mathcal{C} = -\ln |\tan t|+\mathcal{C}$$

So $$I =-\ln \left|\tan \left(x-\tan^{-x}(x)\right)\right|+\mathcal{C} = -\ln \left|\frac{\tan x-x}{1+x\tan x}\right|+\mathcal{C}$$

So $$I = \ln \left|\frac{\cos x+x\sin x}{\sin x-x\cos x}\right|+\mathcal{C}$$


Let $$I = \int\frac{x^2}{(x\sin x+\cos x)(x\cos x-\sin x)}dx$$ Now Put $x=2y\;,$ Then $dx = 2dy$

So $$I = \int \frac{2y^2}{(2y\sin 2y+\cos 2y)(2y\cos 2y-\sin 2y)}dy$$

So $$I = \int\frac{2y^2}{(y^2-1)\sin 2y+2y \cos 2y}dy$$

$$\bullet\; (y^2-1)\sin 2y+2y\cos 2y = (y^2+1)\left[\cos 2y\cdot \frac{2y}{1+y^2}+\sin 2y\cdot \frac{y^2-1}{1+y^2}\right]$$

$$\displaystyle = (y^2+1)\cos \left(2y-\alpha\right) = (y^2+1)\cos \left(2y-\tan^{-1}\left(\frac{y^2-1}{2y}\right)\right)$$

So $$I = \int \sec \left(2y-\tan^{-1}\left(\frac{y^2-1}{2y}\right)\right)\cdot \frac{2y^2}{1+y^2}dy$$

Now Put $\displaystyle \left(2y-\tan^{-1}\left(\frac{y^2-1}{2y}\right)\right)=z\;,$ Then $\displaystyle \frac{2y^2}{y^2+1}dy = dz$

So $$I = \int \sec z dz = \ln \left|\sec z+\tan z\right|+\mathcal{C} = \ln \left|\tan \left(\frac{\pi}{4}+\frac{z}{2}\right)\right|+\mathcal{C}$$