1

I'd really like to re-create this graph in latex but I have no idea how to figure out what the functions are to create it. And I don't quite know how to approximate the functions from simply looking at the graph.

If anyone can provide two functions that produce roughly the same graph it would be much appreciated. Thanks.

enter image description here

They're graphical representation of the Big-O definition, this is mostly used in computer science. The graph shows that $f(n)$ is bounded by $cg(n)$.

John
  • 167
  • Do you have some informations what these functions are supposed to model? This might help making an elaborated guess. – Cornman Nov 13 '20 at 01:24
  • @Cornman, I've edited the question to include some information. – John Nov 13 '20 at 01:37

1 Answers1

4

Here is a graph of $$ g(x) = x + \sin x \quad\text{and}\quad f(x) = \bigg(\frac{5/3}{x^2+1}+\frac{2}{3}\bigg) (x+\sin x) $$ from $x=0$ to $x=8$: enter image description here (Thought process: the function $g(x)$ looks like a small oscillation added to a straight line. The function $f(x)$ generally tracks with $g(x)$, but it is around twice as large at first and then maybe about $\frac34$ as large near the end of the graph; that suggests a multiplication factor of the form "constant plus function-decaying-to-zero", and some visual tweaking of numerical constants produced this particular choice.)

Greg Martin
  • 78,820