# Integrate: \int\frac{x^2}{(x\cos x-\sin x)(x\sin x+\cos x)}dx

Integrate:
$$\displaystyle\int{\frac{{{x}^{{2}}}}{{{\left({x}{\cos{{x}}}-{\sin{{x}}}\right)}{\left({x}{\sin{{x}}}+{\cos{{x}}}\right)}}}}{\left.{d}{x}\right.}$$

• Questions are typically answered in as fast as 30 minutes

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Kayla Kline
My solution:
Let $$\displaystyle{I}=\int{\frac{{{x}^{{2}}}}{{{\left({x}{\sin{{x}}}+{\cos{{x}}}\right)}\cdot{\left({x}{\cos{{x}}}-{\sin{{x}}}\right)}}}}{\left.{d}{x}\right.}$$
So
$$\displaystyle{I}=\int{\frac{{{{\tan}^{{2}}\theta}\cdot{{\sec}^{{2}}\theta}}}{{{\left({\tan{\theta}}\cdot{\sin{{\left({\tan{\theta}}\right)}}}+{\cos{{\left({\tan{\theta}}\right)}}}\right)}\times{\left({\tan{\theta}}\cdot{\cos{{\left({\tan{\theta}}\right)}}}-{\sin{{\left({\tan{\theta}}\right)}}}\right)}}}}{d}\theta$$
So
$$\displaystyle{I}=\int{\frac{{{{\tan}^{{2}}\theta}\cdot{{\sec}^{{2}}\theta}{{\cos}^{{2}}\theta}}}{{{\left({\sin{\theta}}\cdot{\sin{{\left({\tan{\theta}}\right)}}}+{\cos{{\left({\tan{\theta}}\right)}}}\cdot{\cos{\theta}}\right)}}}}$$
So
$$\displaystyle{I}=\int{\frac{{{2}{{\tan}^{{2}}\theta}}}{{{2}{\cos{{\left(\theta-{\tan{\theta}}\right)}}}\cdot{\sin{{\left(\theta-{\tan{\theta}}\right)}}}}}}{d}\theta=\int{\frac{{{2}{{\tan}^{{2}}\theta}}}{{{\sin{{\left({2}\theta-{2}{\tan{\theta}}\right)}}}}}}{d}\theta$$
Now Let $$\displaystyle{\left({2}\theta-{2}{\tan{\theta}}\right)}={u}$$, then $$\displaystyle{\left({2}-{2}{{\sec}^{{2}}\theta}\right)}{d}\theta={d}{u}\Rightarrow{2}{{\tan}^{{2}}\theta}{d}\theta=-{d}{u}$$
So
$$\displaystyle{I}=-\int{\frac{{{1}}}{{{\sin{{u}}}}}}{d}{u}=-\int{\csc{{u}}}{d}{u}$$
$$\displaystyle=-{\ln{{\tan{{\left({\frac{{{u}}}{{{2}}}}\right)}}}}}+{\mathbb{{{C}}}}$$
$$\displaystyle=-{\ln{{\tan{{\left(\theta-{\tan{\theta}}\right)}}}}}+{\mathbb{{{C}}}}$$
So
$$\displaystyle{I}={\ln}{\left|{\frac{{{\cos{{\left(\theta-{\tan{\theta}}\right)}}}}}{{{\sin{{\left(\theta-{\tan{\theta}}\right)}}}}}}\right|}+{\mathbb{{{C}}}}$$
$$\displaystyle={\ln}{\left|{\frac{{{\cos{\theta}}\cdot{\left({\tan{\theta}}\right)}+{\sin{\theta}}\cdot{\sin{{\left({\tan{\theta}}\right)}}}}}{{{\sin{\theta}}\cdot{\sin{{\left({\tan{\theta}}\right)}}}}}}\right|}+{C}$$
So
$$\displaystyle\int{\frac{{{x}^{{2}}}}{{{\left({x}{\sin{{x}}}+{\cos{{x}}}\right)}\cdot{\left({x}{\cos{{x}}}-{\sin{{x}}}\right)}}}}{\left.{d}{x}\right.}={\ln}{\left|{\frac{{{x}{\sin{{x}}}+{\cos{{x}}}}}{{{x}{\cos{{x}}}-{\sin{{x}}}}}}\right|}+{C}$$
###### Not exactly what you’re looking for?
Heather Fulton
Another Solution:
Let $$\displaystyle{I}=\int{\frac{{{x}^{{2}}}}{{{\left({x}{\sin{{x}}}+{\cos{{x}}}\right)}\cdot{\left({x}{\cos{{x}}}-{\sin{{x}}}\right)}}}}{\left.{d}{x}\right.}$$
So $$\displaystyle{I}=\int{\frac{{{2}{x}^{{2}}}}{{{\left({x}^{{2}}-{1}\right)}{\sin{{2}}}{x}+{2}{x}{\cos{{2}}}{x}}}}{\left.{d}{x}\right.}$$
Now $$\displaystyle{\left({x}^{{2}}-{1}\right)}{\sin{{2}}}{x}+{2}{x}{\cos{{2}}}{x}=\sqrt{{{\left({x}^{{2}}-{1}\right)}^{{2}}+{\left({2}{x}\right)}^{{2}}}}\cdot{\left[{\left({\frac{{{x}^{{2}}-{1}}}{{{x}^{{2}}-{1}}}}\right)}{\sin{{2}}}{x}+{\left({\frac{{{2}{x}}}{{{x}^{{2}}+{1}}}}\right)}{\cos{{2}}}{x}\right]}$$
Now we can write $$\displaystyle{\left({x}^{{2}}-{1}\right)}{\sin{{2}}}{x}+{2}{x}{\cos{{2}}}{x}={\left({x}^{{2}}+{1}\right)}\cdot{\sin{{\left({2}{x}+\alpha\right)}}}$$
Where $$\displaystyle{\left({\frac{{{x}^{{2}}-{1}}}{{{x}^{{2}}+{1}}}}\right)}={\cos{\alpha}}$$ and $$\displaystyle{\left({\frac{{{2}{x}}}{{{x}^{{2}}+{1}}}}\right)}={\sin{\alpha}}$$
and so $$\displaystyle{\tan{\alpha}}={\left({\frac{{{2}{x}}}{{{x}^{{2}}-{1}}}}\right)}\Rightarrow\alpha={{\tan}^{{-{1}}}{\left({\frac{{{2}{x}}}{{{x}^{{2}}-{1}}}}\right)}}$$
So Integral $$\displaystyle{I}=\int{\csc{{\left({2}{x}+\alpha\right)}}}\cdot{\left({\frac{{{2}{x}^{{2}}}}{{{x}^{{2}}+{1}}}}\right)}{\left.{d}{x}\right.}$$
Now let $$\displaystyle{\left({2}{x}+\alpha\right)}={t}\Rightarrow{\left[{2}{x}+{{\tan}^{{-{1}}}{\left({\frac{{{2}{x}}}{{{x}^{{2}}-{1}}}}\right)}}\right]}={t}$$, then $$\displaystyle{\left({\frac{{{2}{x}^{{2}}}}{{{x}^{{2}}+{1}}}}\right)}{\left.{d}{x}\right.}={\left.{d}{t}\right.}$$
So integral $$\displaystyle{I}=\int{\csc{{t}}}{\left.{d}{t}\right.}={\ln}{\left|{\tan{{\frac{{{t}}}{{{2}}}}}}\right|}+{C}={\ln}{\left|{\tan{{\left({x}+{\frac{{\alpha}}{{{2}}}}\right)}}}\right|}+{C}$$
star233

HINT :
Rewrite the integrand
$$\frac{x^2}{(x\cos x-\sin x)(x\sin x+\cos x)}$$
as
$$\frac{x\cos x}{x\sin x+\cos x}+\frac{x\sin x}{x\cos x-\sin x}$$
then
$$\frac{\sin x+x\cos x-\sin x}{x\sin x+\cos x}+\frac{\cos x+x\sin x-\cos x}{x\cos x-\sin x}$$
Now let $$u=x\sin x+\cos x$$ and $$v=x\cos x-\sin x$$