Integration of $\int\frac{\sin^4x+\cos^4x}{\sin^3x+\cos^3x}dx$

How can we integrate:

$$\int\frac{\sin^4x+\cos^4x}{\sin^3x+\cos^3x}dx$$

Using simple algebraic identities I deduced it to

$$\int\frac{1-2\sin^2x\cdot\cos^2x}{(\sin x+\cos x)(1-\sin x\cdot\cos x)}dx$$ but can't proceed further. Please provide some directions?

• Hint : Divide the numerator and denominator by ${cos}^2 x$ , you ll get the $1 + tanx$ term getting cancelled out. – Akshay Pratap Singh Feb 15 '16 at 18:07
• From Wolfram Alpha $$I=\sin(x)-\cos(x)+ \frac{1}{3\sqrt{2}} \tanh^{-1}\left(\frac{\tan(x/2)-1}{\sqrt{2}}\right)+\frac{2}{3} \tan^{-1}\left(\cos(x)-\sin(x)\right)+C$$ – ParaH2 Feb 15 '16 at 18:11
• @AkshayPratapSingh How it gets cancelled out. We don't have $1+tanx$ in numerator? – H.P. Das Feb 15 '16 at 18:15
• – Dr. Sonnhard Graubner Feb 15 '16 at 18:28
• @H.P. Das you ll get it when proceed with the division. – Akshay Pratap Singh Feb 15 '16 at 18:47

$\displaystyle\frac{\sin^4x+\cos^4x}{\sin^3x+\cos^3x}=\sin x+\cos x-\frac{\sin x\cos x}{\sin^3 x+\cos^3x}=\sin x+\cos x-\frac{\sin x\cos x}{(\sin x+\cos x)(1-\sin x\cos x)}$,

and $\;\;\displaystyle\frac{\sin x\cos x}{(\sin x+\cos x)(1-\sin x\cos x)}=A\left(\frac{\sin x+\cos x}{1-\sin x\cos x}\right)+B\left(\frac{1}{\sin x+\cos x}\right)$

where $\sin x\cos x=A(\sin x+\cos x)^2+B(1-\sin x\cos x)=(A+B)+(2A-B)\sin x\cos x$.

Then $A=\frac{1}{3}$ and $B=-\frac{1}{3}$,

so $\displaystyle\int\frac{\sin^4x+\cos^4x}{\sin^3x+\cos^3x}dx=\int\left(\sin x+\cos x-\frac{1}{3}\cdot\frac{\sin x+\cos x}{1-\sin x\cos x}+\frac{1}{3}\cdot\frac{1}{\sin x+\cos x}\right)dx$

$\displaystyle=-\cos x+\sin x-\frac{1}{3}\int\frac{2\sin x+2\cos x}{2-2\sin x\cos x}dx+\frac{1}{3}\int\frac{1}{\sqrt{2}\sin(x+\frac{\pi}{4})}dx$

$\displaystyle=-\cos x+\sin x-\frac{2}{3}\int\frac{\sin x+\cos x}{1+(\sin x-\cos x)^2}dx+\frac{1}{3\sqrt{2}}\int\csc\left(x+\frac{\pi}{4}\right)dx$

$\displaystyle=-\cos x+\sin x-\frac{2}{3}\arctan(\sin x-\cos x)+\frac{1}{3\sqrt{2}}\ln\big|\csc\left(x+\frac{\pi}{4}\right)-\cot\left(x+\frac{\pi}{4}\right)\big|+C$

$\displaystyle=-\cos x+\sin x-\frac{2}{3}\arctan(\sin x-\cos x)+\frac{1}{3\sqrt{2}}\ln\left\vert\frac{\sqrt{2}-\cos x+\sin x}{\sin x+\cos x}\right\vert+C$