Is there a function $f(x)$ such that $\lim_{x\rightarrow x_0}f(x)=\infty$ for all $x_0$ in some interval?

Assuming that "domain in $\Bbb R$" means $f:\Bbb R\to\Bbb R$: No. Say $f:[a,b]\to\Bbb R$. For $n\in\Bbb Z$ let $$E_n=\{x\in[a,b]:f(x)\le n\}.$$Then $$[a,b]=\bigcup_{n\in\Bbb Z} E_n.$$Since $[a,b]$ is uncountable this shows that there exists $n$ such that $E_n$ is infinite. So $E_n$ has an accumulation point $x_0\in[a,b]$, and hence $f$ does not tend to infinty at $x_0$.


Short answer: Yes.

While David C. Ullrich has given what seems to be a good answer, there's a fatal flaw. It assumes that $f$ is defined everywhere in some interval. The question, however, only says that the domain is in $\Bbb{R}$, and makes no other assertions.

The function:

In fact, there is a function $f$ which is defined on the rationals that has the property you want. In fact, it has the property that for all $x_0\in\Bbb{R}$ it has $$\lim_{x\to x_0} f(x)= \infty.$$

Define $f:\Bbb{Q}\to \Bbb{R}$ by $f(p/q)=q$, where $p/q$ is the expression of the rational number in least terms.

Then for any $n$, the set of points at which $f$ has value less than or equal to $n$ is a subset of $\bigcup_{k=1}^n\frac{1}{k}\Bbb{Z}$, which is a finite union of discrete subsets of $\Bbb{R}$, and hence itself a discrete subset of $\Bbb{R}$.

Thus every point of $\Bbb{R}$ has a punctured neighborhood disjoint from this set, and hence for every $n\in\Bbb{N}$, and every $x_0\in\Bbb{R}$ there exists $\epsilon > 0$ such that for all $q\in \Bbb{Q}$ with $0<|x_0-q|<\epsilon$ $f(q) > n$. However, this is exactly what it means for $$\lim_{x\to x_0} f(x) = \infty.$$