# Square-root accurate, primitives and step functions

Let $L(x)$ a real continuos function (my example is a primitive), and $\pi (x)$ a real step function (has jumps in a enumerable set, as an infinite subset of positive integers), to fix ideas we can assume that have domains in positive reals $2\leq r$.

Question. It is possible to prove, that assuming $$|L(x)-\pi(x)|\leq \sqrt{x}\log x,\quad\forall x>2.01$$ then we can claim that there exists a real $0<\theta<1$ and a real function $\delta(x)$ with same domain satisfying the (both) following conditions $$|L(x)-\delta(x)|\leq \theta\sqrt{x}\log x,\quad\forall x>2.01,$$ and $$|\delta(x)-\pi(x)|\leq (1-\theta)\sqrt{x}\log x,\quad\forall x>2.01?$$ Thanks in advance.

Appendix: To give context, my thoughts were about the integral logarithm $Li(x)=\int_{2}^{x}\frac{dt}{\log t}$, and $\pi(x)$ the prime counting function, related with an unsolved problem.

Another possibility is same question starting with the assumption that for all $\epsilon>0$ holds that $\pi(x)=\int_2^x\frac{dt}{\log t}dt+O(x^{\frac{1}{2}+\epsilon})$. I say this, if you prefer that your answer is about (essentially) square-root accurate. I have questions as previous Question that now, perhaps is obvious but I don't know to think in it, I am trying refresh my mathematics, perhaps is this is feasible is a good exercise of calculus.

Let $\delta = L + \theta ( \pi - L)$.
Then $|L(x)-\delta(x)| = \theta |L(x)-\pi(x)| \le \theta \sqrt{x} \log x$, and similarly $|\delta(x) - \pi(x)| \le (1-\theta) \sqrt{x} \log x$.
Sure. Take $\delta(x) = \theta L(x) + (1-\theta)\pi(x)$. Then
\begin{align} L(x)-\delta(x) &= (1-\theta)\left(L(x)-\pi(x)\right)\\ \delta(x)-\pi(x) &= \theta\left(L(x)-\pi(x)\right). \end{align}