Problem: Find $$\int\left(\frac{\sin{x}+\cos{x}}{x^2}+\frac{\cos{x}-\sin{x}}{x}\right)dx$$
The possible methods I thought were:
- Substitute $t=\tan{\left({x\over2}\right)}$: failed because of polynomials in the denominators
- Put $t={\pi\over2}-x$: failed because of polynomials in the denominators
- Substitute $t=\frac{\cos{x}-\sin{x}}{x}$: failed - it is difficult to express $\frac{\sin{x}+\cos{x}}{x^2}$ in terms of $t$.
- Partial integration: but I couldn't find the way to split into $f'$ and $g$.
- Using $\sin{x}+\cos{x}=\sqrt{2}\sin\left({x+{\pi\over4}}\right)$ and $\cos{x}-\sin{x}=\sqrt{2}\sin\left({x-{\pi\over4}}\right)$, but failed since I also don't know how to integral $\int\frac{\sin\left({x+{\pi\over4}}\right)}{x^2}$ and $\int\frac{\sin\left({x-{\pi\over4}}\right)}{x}$.
I wanted to focus on the fact that $$\cos{x}-\sin{x}=\left(\sin{x}+\cos{x}\right)'$$ but it also did not work well.
Is there a special idea to solve these types of integrals - when the fraction includes polynomials in the denominator and trigonometry functions in the numerator? Thanks.
Unfortunately, this integral requires nonelementary functions, such as $\text{Si}(x)$; there is no elementary way to describe it.
In case you accidentally missed a minus sign when transcribing your integral, observe that $$\frac{d}{dx} \frac{\sin x + \cos x}{x} = -\frac{\sin x + \cos x}{x^2} + \frac{\cos x - \sin x}{x}.$$