How would you integrate $\sin(1/x)$? I have found out that if i use u-substitution here's what i get :
$$\int ( \sin(u) ) \, dx$$
\begin{align*} 
u &= 1/x = x^{-1}, \\
du / dx &= -x^{-2}, \\
dx / du &= -x^2, 
\end{align*}
$$\int ( -\sin (u)x^2) \, du$$
$$= \text{?}$$
as you can see this cannot be equal to $\cos u$ because there is the term in $x$ as well. i know that we should generally divide by the derivative of the function but here the derivative is not a constant. my question is : what to do when the derivative is not a constant?
 A: You can briefly continue by making the substitution $x^2=\frac{1}{u^2}$:
$$\int -\frac{\sin u}{u^2} du = -\int \frac{\sin u}{u^2} du$$
The only problem is that you won't be able to express $\int \frac{\sin u}{u^2} du$ using elementary functions.
A: Here are a few basic ways to integrate. I will use sine and cosine properties like their expansions. The first step uses integration by parts and a series expansion switching it and the integral by integrating term by term:
$$\mathrm{\int sin\left(\frac1x\right)dx=x\, sin\left(\frac1x\right)+\int\frac{cos\left(\frac1x\right)}{x}dx= x\,sin\left(\frac1x\right)+\int\frac1x\sum_{n=0}^\infty \frac{(-1)^n\left(\frac1x\right)^{2n}}{(2n)!}= x\,sin\left(\frac1x\right)+\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}\int x^{-2n-1}dx= C+x\,sin\left(\frac1x\right)+\sum_{n=0}^\infty \frac{(-1)^n\left(\frac1x\right)^{2n}}{2n(2n)!}}$$
This matches the main definition given for the Cosine Integral Ci(y). This means we have the special function closed form of:
$$\mathrm{\int sin\left(\frac1x\right)dx=C+ x\,sin\left(\frac1x\right)-Ci\left(\frac1x\right)}$$
There is also a way to use a sine series right away without integration by parts:
$$\mathrm{\int sin\left(\frac1x\right)dx=C+ x\,sin\left(\frac1x\right)-Ci\left(\frac1x\right)=\int\sum_{n=0}^\infty \frac{(-1)^n\left(\frac1x\right)^{2n+1}}{(2n+1)!}dx=C-\sum_{n=0}^\infty \frac{(-1)^n}{2n(2n+1)!x^{2n}}}$$
Here is a beautiful complex plot of the function. Please correct me and give me feedback!
