1

I think the hardest part of numerical analysis for me is understand what constitutes an "upper bound", and this has caused me alot of strife because often times my answer differs from the book, but I'm still "correct", which would imply to me that there are many upper bounds.

For example solving trapezoidal quadrature:

if $$f(x) = ((sinx)^2−2xsinx+1)$$

then

$$f''(x) = 2cos^2x - 2sin^2x + 2xsinx - 4cosx $$ on $ \xi \in (0.75,1.3)$ has an error bound of 0.02444080544 as I have found in this question.

However, it appears I can also just say that

$$sin,cos \le 1 \forall x$$

and $x$ is increasing on the domain $(0.75,1.3)$

so

$$-4\sin{2\xi}+6\sin(\xi)+2(\xi)sin(\xi)$$ can be written as $$-4 + 6 + 2(1.3)$$ which is $4.6$.

Plugging this into the error bound for the trapezoidal rule error gives us

$$|\frac{(0.55)^3}{12}(4.6)| = 0.0637770833333$$

Which also appears correct. However, how do I know if my error bound is correct? I guess thats the part I'm struggling on. What is the indicator that I'm approach the bound correctly? How do I know if I have the correct bound?

Steve
  • 13
  • You have $-1\leq \sin \leq 1$, which only tells you $|-4\sin 2\xi + 6\sin\xi + 2\xi\sin\xi| \leq 4 + 6 + 2.6 = 12.6$. In this case, your error bound is only $0.17$. – BaronVT Nov 24 '14 at 23:54

1 Answers1

0

BaronVT already pointed out an error in your estimate for $-4\sin{2\xi}+6\sin(\xi)+2(\xi)\sin(\xi)$: the estimation process is not as simple as "replace all $\sin$ and $\cos$ with $1$". E.g., $\sin 2\xi\le 1$ does not imply $-4\sin 2\xi\le -4$; rather it's $-4\sin 2\xi\ge -4$. With the help of triangle inequality you can get a correct bound.

To your main question

How do I know if I have the correct bound?

There is no such thing as the correct upper bound. There is the smallest one (infimum), but it's usually impossible to find without knowing the exact result of integration -- and if we knew that, why would we need a numerical method in the first place?

If $0.02444$ is an upper bound for the error, then so are $0.03$, and $0.7$, and $42$, and $10^{78}$ -- these are upper bounds too. They are no less correct than $0.02444$. Some of them may be less useful, or in fact totally useless. But usefulness is somewhat subjective; there is no mathematical definition of it.

In practical terms: if you are taking a course in numerical analysis, then correct means "what your professor expects of you" (within some margin), and your indicator that an answer is correct is "it's close to the answer at the end of the book".

If an estimate calls for an upper bound on, say, $x\sin x+x^2\cos x$ on $[0,\pi/2]$, then it's reasonable to do
$$x\sin x+x^2\cos x\le x+x^2 \le (\pi/2)+(\pi/2)^2$$ But someone with more patience and energy can spend a few more minutes and come up with a better (smaller) bound. Or spend an hour and come up with a yet better bound. Or spend a day... you get the idea. What you need is a reasonably good bound obtainable with reasonable amount of effort, that's all.

  • Thank you for this! You have certainly helped me out. Coming from computer science this makes sense to me. However, if you wouldn't mind, could you explain to me how you would use the triangle inequality to get the correct bound? Thanks again! – Steve Nov 25 '14 at 03:19
  • $|a+b+c|\le |a|+|b|+|c|$, and now everything is nonnegative, so using $|\sin|\le 1$ and $|\cos|\le 1$ gives an estimate. –  Nov 25 '14 at 03:21