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...
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...
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$$
$$ \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)$
$$ \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} $$
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}$$