I'm trying to plot |sin(x)|/x in range x=[1e27,1e33].
x=np.logspace(27,33,1000000)
plt.plot(abs(np.sin(x))/x)
plt.xscale('log')
The answer has to be a smooth damping oscillator but this is what I get:

I guess this is because of the large numbers I'm working with, any suggestions ?
In
plt.plot(abs(np.sin(x))/x)you only specified the y-coordinates, hence matplotlib used integers for the x-coordinates. Since you have 1000000 x-points, matplotlib x-axis goes from 0 to 1e06.Try this: