2
$\begingroup$

Is anyone familiar with using Mathematica to determine whether a function is asymptotic (big O) to another.

A function $f$ is asymptotic to function $g$ if there are positive $c, n0$ such that $|f(n)| ≤ c|g(n)|$, for all $n ≥ n0$. This relationship is written $f(n) ∈ O(g(n))$.

Example

Determine whether the function $f(x) = 17x + 11$ satisfies $f(x) ∈ O(x^2)$.

My solution is True, because the determining factor in $f(x)$ is less than or equal to x^2.

I would like to use Mathematica to check my answer. How can I do that?

$\endgroup$
2
  • $\begingroup$ What is $g(x)$? $\endgroup$
    – C. E.
    Jun 13, 2017 at 6:59
  • $\begingroup$ @CaelHo, it may be helpful 8177 $\endgroup$
    – garej
    Jun 13, 2017 at 9:18

1 Answer 1

2
$\begingroup$

(As long as your functions are analytical at the point of comparison), you can use the Series command

Series[f[x]/g[x],{x,x0,0}]

If this is O[1] our smaller than f[x] is O[g[x]] (at x0).

In your example, (presuming this is asked at infinity)

Series[(17x+11)/x^2,{x,\[Infinity],0}]

returns

17/x + O[1/x]^2

and hence is O[1/x]. Consequently, 17x+11 is O[x].

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.