Why is the $e^x$ coefficient ignored? Shouldn't we have $e^x$ $O(h^2)$ rather than just $O(h^2)$? I was watching a video on derivatives and Big O notation, and at one point this happens:
$e^{x+h}=e^xe^h=e^x(1+h+O(h^2))=e^x+e^xh+O(h^2)$
I understand why we can ignore coefficients that are constants in Big O notation, but $e^x$ is not a constant, so why is it ignored here?
This is the link to the video in case you want to give it a look. What I am talking about happens at $8:33$.
 A: By the formal definition of the big O notation, you have that $f(x) = O(g(x))$ (as $x\to a$) if there exists a number $M>0$ and $\delta>0$ such that $|f(x)|\leq Mg(x), \forall x$ with $ |x-a|<\delta$.
In your case, note that the big O notation has functions of $h$ instead of $x$, so this might be confusing. Then we might want to change that for the sake of clarity and state the big O notation using $h$ instead: $f(h) = O(g(h))$ (as $h\to a$ for example with  $a=0$) if there exists a number $M>0$ and $\delta>0$ such that $|f(h)|\leq Mg(h), \forall h$ with $ |h-a|<\delta$.
Finally, note that if $f(h) = O(g(h))$ then $cf(h) = O(g(h))$ for some constant term $c>0$ (constant I mean, that doesn't depend on $h$, but may be parameterized with respect to other variable). This is because $|c f(h)| \leq aMg(h) = M'g(h)$ with $M$ found from $f(h) = O(g(h))$. Hence, there exists such $M'$ for $c f(h)$ too, with the same $g(h)$ and the same $\delta$ as with $f(h) = O(g(h))$.
Using this reasoning, $e^xO(h^2)$ is still $O(h^2)$ since $e^x$ is just a constant in $h$. Of course is a function of $x$, but we are interested in functions of $h$ instead.
Hope this helps!
