# Order of Error - Confusion: Clarifying Constraints on Constants and Determining Order of Error

I'm struggling to determine the order of error when considering the error value denoted by $$\text{err}$$ in relation to the variable $$h$$. Specifically, I aim to ascertain the value of $$x$$ in the expression $$\text{err}=O(h^x)$$. Assuming $$\text{err}=ch^x$$, I attempted to use the logarithm with base $$h$$ as follows:

$$\log_h{\text{err}}=x+\log_h{c}$$

However, I'm uncertain about the constraints that should be imposed on the constant $$c$$. For instance, should it be that $$c or $$c<1$$ or $$c<1$$ or what? I'm seeking clarification on this matter.

For a practical example, let's consider $$\text{err}=4.380691283796996\times10^{-9}$$ and $$h=0.0625$$. What would be the correct order of error? Here are some possibilities:

• If we assume $$\text{err}=O(h^5)$$, then we get $$\text{err}\approx 0.0045\times h^5$$.
• If we assume $$\text{err}=O(h^6)$$, then we get $$\text{err}\approx 0.0735\times h^6$$.
• If we assume $$\text{err}=O(h^7)$$, then we get $$\text{err}\approx 1.1759\times h^7$$.

Could you help me determine which assumption is correct?

• Please avoid double and cross posts. The error order is a number that describes the shape of a function, the error as function of $h\approx 0$. You need more than one point to get useful estimates. Commented Jan 8 at 6:23
• Taking the log of $ch^x$ does not result in $x + \log_h c$... Commented Jan 8 at 23:49
• @WolfgangBangerth : The formula is correct, as $\log_hh=1$. But it is not optimal for starting a regression analysis. Commented Jan 10 at 10:39