Understanding O(h): Examining Functions with h as an Input

  • Context: MHB 
  • Thread starter Thread starter lemonthree
  • Start date Start date
  • Tags Tags
    Functions Input
Click For Summary

Discussion Overview

The discussion centers around the classification of various functions as O(h) for values of h where |h| < 1. Participants examine specific functions, analyze their behavior as h approaches 0, and explore the implications of the Big O notation in this context.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant asserts that f(h) = O(h) if |f| ≤ C |h| for some constant C independent of h, and successfully identifies -4h as O(h).
  • Another participant suggests that the condition for O(h) only needs to hold as h approaches infinity, which is challenged by others.
  • A different viewpoint posits that the limit of h is not specified, implying that h should approach 0, leading to the conclusion that -4h is O(h) when h approaches 0.
  • One participant demonstrates that h + h^2 is O(h) by showing |h + h^2| ≤ 2|h| when |h| < 1.
  • It is argued that |h|^{0.5} is not O(h) because it cannot satisfy the condition for any constant C as h approaches 0.
  • Discussion on h + cos(h) includes a participant using Taylor series to argue that it is not O(h), leading to a contradiction when analyzing limits.
  • Another participant challenges the use of Taylor series and provides a different argument based on the behavior of cos(h) to show that |h + cos(h)| cannot be bounded by C|h| for small h.

Areas of Agreement / Disagreement

Participants express differing views on the classification of h + cos(h) and |h|^{0.5} as O(h), leading to unresolved disagreements regarding these functions. There is no consensus on the implications of the limit of h in the context of Big O notation.

Contextual Notes

Participants note that the limit of h is not explicitly defined in the problem, which may affect the analysis of the functions. The discussion also reveals varying interpretations of the conditions under which O(h) is applied.

Who May Find This Useful

This discussion may be of interest to those studying asymptotic analysis, particularly in the context of mathematical functions and their growth rates as they approach specific limits.

lemonthree
Messages
47
Reaction score
0
Let $$ \mid h \mid $$< 1. Which of the following functions are O(h)? Explain.
$$ -4h $$
$$h+h^2 $$
$$ \mid h \mid ^{0.5} $$
$$h + cos (h) $$

Based on my notes, f(h) = O(h) only if $$ \mid f \mid $$ ≤ C $$ \mid h \mid $$, where C is a constant independent of h.

I can only solve for the first function -4h, as I can take C = -4 to give $$ \mid f \mid $$ = -4 $$ \mid h \mid $$
For the rest, I am not very sure how I should go about solving since I cannot get C to be a constant independent of h. Are there any tips to solving them? Although I am guessing that the remaining functions are not O(h) anyways...

I tried searching the net but the results led me to general cases of O(h), O(log(h)) type which does not go into detail the math part behind it.
 
Physics news on Phys.org
The condition only has to hold for h taken to infinity.
 
I think the concept of $O(h)$ is defined not only for $h\to\infty$, but $h$ does have to tend somewhere, whether to a finite or infinite limit. In this problem the limit of $h$ is not given, which is a mistake. But since $|h|<1$, one may suggest that $h\to0$. Then indeed $\lvert-4h\rvert=4|h|$ (note that $\lvert-4h\rvert=-4|h|$ is incorrect), so $-4h=O(h)$ when $h\to0$.

Next $|h+h^2|\le|h|+|h^2|\le2|h|$ because $|h^2|<|h|<1$, so $h+h^2$ is also $O(h)$ when $h\to0$.

$|h|^{0.5}$ is not $O(h)$. If there were a $C$ such that $\sqrt{|h|}\le C|h|$ for all $h$ in some neighborhood of $0$, then $\sqrt{|h|}/|h|\le C$ in that neighborhood, but $\lim_{h\to0+}1/\sqrt{h}\to\infty$.

What do you think about $h+\cos h$?
 
$\left | h + cos(h) \right | \leq C \left | h \right |$ And by taylor series, I know that $ h + cos(h) = h + (1-\frac{h^2}{2!}...) $

So solving for the equation, as h tends to 0, lhs tends to infinity while rhs is a constant. This is a contradiction, so h + cos h is not O(h)
 
lemonthree said:
So solving for the equation, as h tends to 0
Which equation and what do you want to find from that equation?

lemonthree said:
lhs tends to infinity while rhs is a constant.
What exactly tends to infinity?
 
Evgeny.Makarov said:
Which equation and what do you want to find from that equation?

What exactly tends to infinity?
$\left | h + cos(h) \right | \leq C \left | h \right | $can be written as
$\left |h + (1-\frac{h^2}{2!}...) \right | \leq C \left | h \right |$
$\frac{\left |h + (1-\frac{h^2}{2!}...) \right |}{ \left | h \right | } \leq C$

The $\frac{1}{\left | h \right |}$ part in the left hand side equation tends to infinity, while right hand side C is a constant...
So there is a contradiction here.
 
This is correct, though I would not use Taylor series and division. It is know that $\cos h\ge\sqrt{3}/2>4/5$ when $|h|<1/2<\pi/6$. Therefore $|h+\cos h|\ge 4/5-1/2=3/10$ when $|h|<1/2$. If there exist constants $C>0$ and and $\delta>0$ for which $|h+\cos h|\le C|h|$ for all $-\delta<h<\delta$, then $3/10\le|h+\cos h|\le C|h|$ for all $-\min(\delta,1/2)<h<\min(\delta,1/2)$, which is a contradiction.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 36 ·
2
Replies
36
Views
8K
  • · Replies 53 ·
2
Replies
53
Views
6K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K