I'm wondering if a classification of analytic functions, $f\,$ (it may be that $C^1$ is enough, but I'm not taking any chances, if you have a reason why I only need to consider a larger class of functions, I would enjoy that as well) with the property $F(x):=\int f(x) dx = \mathcal{O}(xf(x))$ as $x\to\infty$ AND $xf(x)=\mathcal{O}(F(x))$ where $\mathcal{O}$ is big-O notation. I'm not sure if it's standard or not, but I'll denote this condition by 


$$\mathcal{O}(F(x))=\mathcal{O}(xf(x))\qquad (\*)$$


I'm motivated by the naïve notion of integration from the mistake many first semester students in calculus make when trying to take anti-derivatives and keep on thinking the same thing over and over: the power rule.


It is straightforward to check that $f(x)=x^n\quad n\ne -1$ and $f(x)=\log^n x\quad n\ge 0$ satisfy the condition $(\*)$, the first just by checking and the second by induction on $n$ and integration by parts. It's also easy to see that this is not the case for $x^ne^x,\; n\in\mathbb{Z}$ again by integration by parts.


A preliminary investigation yields some interesting first starts:


1) A valid refomulation of the problem is ${F\over f}$ has a slant asymptote, i.e. ${F\over f}=kx+\mathcal{o}(1)$, and if you know that the derivative of this little o function is also little o of 1, and say $k=1$ then you can rephrase this as $1-{d\over dx}(\log f(x))\cdot {F\over f}(x)=1+\mathcal{o}(1)$


2) If the function is increasing we can get half of this inequality since $F(x)\le xf(x)$ since $F(x)=\int\_a^xf(x)$, but the other half fails.


3) A convex $\mathcal{o}(1)$ in (1) might imply that the derivative is also $\mathcal{o}(1)$



Functions whose antiderivative behaves like xf(x)
Note: This is a major rewrite of my earlier answer, to include necessary and sufficient conditions applicable to an even wider class of functions. 


Instead of expanding to the class of all analytic functions (where the asymptotics can be hard to get control over, due to oscillatory behavior), my inclination would be to focus on large classes of functions with well-behaved asymptotics, including all the functions that arise in ordinary asymptotic analysis. The usual buzz phrase for this is "Hardy field" (mentioned for example in my answer [here](https://mathoverflow.net/questions/45284/examples-of-sequences-whose-asymptotics-cant-be-described-by-elementary-function/45368#45368)), which by definition is an ordered field of germs at infinity of $C^\infty$ functions. 


I will describe several classes of such functions. The first is the class of all functions which are first-order definable in the structure $(\mathbb{R}, +, \cdot, <, \exp)$ together with all real numbers adjoined as constants. This class contains all functions that are constructible from polynomials, $\exp$, $\log$ and closed under the usual arithmetic operations and composition. It thus contains all the functions that usually arise in asymptotic analysis, and many more besides. This class enjoys the following strong model-theoretic property (as developed more fully in the [theory of o-minimal structures](http://en.wikipedia.org/wiki/O-minimal_theory)): 



> 
> (O) The zero set of any function $F: [a, \infty) \to \mathbb{R}$ in this class is a finite union of points and intervals (finite or infinite in extent). 
> 
> 
> 


Condition O ensures that every such function $F$ is either eventually positive ($F(x) > 0$ for all sufficiently large $x$), eventually zero, or eventually negative. As a result, the ring of germs at infinity of the definable functions in this class forms an ordered field, i.e., is a Hardy field. 


Also, if $F$ is definable, then $F'$ is also first-order definable (and its domain can be shown to be the domain of $F$ save for finitely many points). Applying condition O to $F'$, every definable $F$ in this class is either eventually increasing, eventually decreasing, or eventually constant. 


**Proposition:** A function $F$ in this class satisfies $F(x) = O(xF'(x))$ and $xF'(x) = O(F(x))$ if and only if there exist $n, N$, both positive or both negative, for which $x^n < |F(x)| < x^N$ for all sufficiently large $x$. 


**Proof:** WLOG we may assume $F$ is eventually positive, and is not eventually constant. Thus $F$ is either eventually increasing or eventually decreasing, say eventually increasing. If $F$ is eventually bounded above by some $x^N$, $N > 0$, then by increasing $N$ if necessary we may assume $F(x)/x^N$ tends to zero, whence it is eventually decreasing. Taking the derivative, we conclude that eventually 


$$x^N F'(x) - Nx^{N-1}F(x) < 0$$ 


whence $xF'(x) < NF(x)$, i.e., $|xF'(x)| < N|F(x)|$ or $xF'(x) = O(F(x))$. However, if $F(x)$ is eventually bounded above by *every* positive-power function $x^N$ (think $N$ small!), this also shows $xF'(x) = o(F(x))$, so that $F(x)$ is not $O(xF'(x))$. 


By a similar argument, if $F(x)$ is eventually bounded below by some positive-power function $x^n$, we get $nF(x) < xF'(x)$ eventually, so that $F(x) = O(xF'(x))$. This also shows that if $F(x)$ is bounded below by *every* positive-power function (think $n$ large!), then $F(x) = o(xF'(x))$, so $xF'(x)$ is not $O(F(x))$. 


Thus, if $F(x)$ is positive and eventually increasing, a necessary and sufficient condition that $F'$ satisfy condition ($\ast$) in the question is that there exist two positive-power functions that $F$ is eventually squeezed between. An entirely similar analysis shows that if $F(x)$ is positive and eventually decreasing, a necessary and sufficient condition that $F'$ satisfy condition ($\ast$) is that there exist two negative-power functions that $F$ is eventually squeezed between. Thus the proposition is proved. 




---


The almost freshman-level triviality of this proof testifies to the great power of condition O (which is a special case of the o-minimality axiom), from which all flows. 
Thus it is of interest to know of classes of functions which satisfy it. I will mention an extraordinary result in this regard, due largely to Patrick Speissegger (The Pfaffian closure of an o-minimal structure, J. Reine Angew. Math. 508 (1999), 189--211): 


There is an o-minimal expansion of the ordered exponential field $\mathbb{R}$ (thus, including the class of functions described above) so large that


* The structure includes the restriction of any analytic function to a compact box,
* If $f: [a, \infty) \to \mathbb{R}$ is first-order definable within this structure, then so is any antiderivative $F$ (even though general antiderivatives are not definable by a first-order construction),


This may fit better with Adam Hughes's formulation in terms of antiderivatives. Since condition O is satisfied (according to the more general o-minimality condition), the same analysis as above applies. 


