The difference between the below notations

calculusdefinite integralsindefinite-integralsintegration

I've often come across two ways of integrating which I think mean the same thing.

1. $$\displaystyle \int f(x) dx$$
2. $$\displaystyle \int_{-\infty}^\infty f(x) dx$$

Do these two mean the same thing because, both seem to integrating the function over the whole domain. If yes, then why don't we just use one of the two? And if no, then what's the difference?

$$\int f(x)dx$$, without bounds, is taken to mean the antiderivative of $$f$$. It yields a family of functions, all of which have $$f$$ as their derivative. It's often called "indefinite integral", and uses integral notation, because of its close connection to (definite) integrals through the fundamental theorem of calculus.
$$\int_{-\infty}^\infty f(x)dx$$, with bounds (finite or infinite, or even just a domain, like so: $$\int_{\Bbb R}f(x)dx$$), is a (definite) integral, and yields a single number (assuming the integral exists).