What is the error term in Chebyshev's $\theta$ function? What are possible error terms in Chebyshev's $\theta$ function? Chebyshev's $\theta$ function is given by $$\theta(x)=\sum_{p\leq x}\log(p),$$ where $\log(p)$ is the natural log of primes $p$. Specifically, if $$\theta(x)=x+O(f(x)),$$ then what could $f(x)$ be? Also, is $\theta(x)\sim x$, i.e., is $\theta(x)$ asymptotic to $x$? Plenty of online sources, such as wikipedia, and sources in literature consider it to be true that $\theta(x)\sim x$. However, other sources in literature (see E. Bach, J. Shallit, Algorithmic Number Theory, vol. 1: Efficient Algorithms.Cambridge, MA: MIT Press, (1996).) note that $\theta(x)\sim x$ is not given despite that it is reasonable.
 A: Yes, $\vartheta(x) \sim x$. This is a well known statement equivalent to the prime number theorem.
One way to prove this and to answer your question is to note that
$$ \vartheta(x) = \pi(x) \log x - \int_2^x \frac{\pi(t)}{t} dt. \tag{1}$$
To prove this, let $P(x)$ be the prime indicator function, so that $P(n) = 1$ if $n$ is prime and $P(n) = 0$ otherwise. Then from
$$ \pi(x) = \sum_{p \leq x} 1 = \sum_{1 < n \leq x} P(n)$$
and
$$ \vartheta(x) = \sum_{p \leq x} \log p = \sum_{1 < n \leq x} P(n) \log n,$$
we have from partial summation/Riemann-Stieltjes integration by parts that
$$ \vartheta(x) = \sum_{1 < n \leq x} P(n) \log n = \big(\pi(x) \log x - \pi(1) \log 1\big) - \int_1^x \frac{\pi(t)}{t} dt.$$
This proves $(1)$.
This also shows that error terms for the prime number theorem and for $\vartheta(x)$ are strongly connected.
If we suppose further that $\pi(x) = \mathrm{li}(x) + R(x)$ for some remainder term $R(\cdot)$ and where
$$ \mathrm{li}(x) = \int_2^x \frac{1}{\log t} dt, $$
then we have from $(1)$ that
$$\begin{align}
\vartheta(x) &= (\mathrm{li}(x) + O(R(x))) \log x - \int_2^x \frac{\mathrm{li}(t) + O(R(t))}{t} dt \\
&= (\mathrm{li}(x) + O(R(x))) \log x - \big( \mathrm{li}(t) \log t \big|_2^x + \int_2^x 1 dt + O\Big( \int_2^x \frac{R(t)}{t} dt \Big) \\
&= O(R(x) \log x) + x + O \Big( \int_2^x \frac{R(t)}{t} dt \Big) + O(1).
\end{align}$$
The end effect is that
$$ \vartheta(x) - x = O(R(x) \log x), $$
where $R(x)$ is the error term in the prime number theorem.
