The Student Room Group

Showing a root exists formalism

Formalising

Basically, when doing numerical methods proof of a root in an equation; for example:

"f(x)=2sin(x2)+x2f(x) = 2\sin (x^2) + x -2

Show that f(x)=0f(x) = 0 has a root α\alpha, between x=0.75x = 0.75 and x=0.85x = 0.85"

There are problems I have with the method that aren't really mentioned. For an interval [a,b][a, b] the fact that there is a change in sign of a function from one bound to the other, in no way implies that a root exists. I brought this up to my maths teacher with the example of f(x)=1xf(x) = \frac{1}{x} and he said, well the function has to be continuous -- which made more sense. However, there are still cases in which a function can be discontinuous across an interval and yet a change of sign still correctly implies that a root exists. As well, shouldn't we state an assumption that the function is continuous within the interval when answering the question, if this is the case?

For example, the graph of f(x)=x+1(x1)(x2)f(x) = \frac{x+1}{(x-1)(x-2)}
From -5 to 0, the function is continuous and the change in sign implies a root of f(x) = 0; which turns out to be true. From 0 to 1.5, the change in sign does not imply a root because it is not continuous -- fits in with my teacher's statement. From -5 to 5, however, the change in sign correctly implies a root, yet the function is not continuous... so what ARE the requirements to correctly imply a root?

What I typically say is:There is a change in sign across the interval, therefore a root must exist in the interval.But despite getting the marks, it annoys me because it isn't true. So, how could I formally answer the question, using complicated maths notation [because it looks cool], that is rigorously true?

And I know the markers probably won't care; It's for my own peace of mind :redface:

Neatening it up

It's especially painful when they ask to show, for example, that α=0.23512 \alpha = 0.23512 [not relating to the question above] is correct to 5 decimal places... then I have to write out 7 digit numbers over and over; it's a petty pet peeve but I'm all about efficiency. So, is there another way I can refer to the interval's lower\upper bound without having to keep using the numerical value over and over again, or would it be fine denoting my own notation at the start?

e.g. Let s=0.75,t=0.85 and I=[s,t]\mathrm{Let\ }s=0.75,t=0.85\mathrm{\ and\ }I=[s,t], then I can atleast recite ss and tt instead of lengthy values

Finally, is there a way to indicate that there is a change in sign, that is concise and mathematical, instead of writing, "There is a change in sign across the interval therefore a root must exist"

I could say that sgn(f(0.75))sgn(f(0.85))sgn(f(0.75)) \neq sgn(f(0.85)) or I could say f(0.75)f(0.85)<0f(0.75)\cdot f(0.85) < 0, but technically speaking, couldn't there exist a root at x = 0.85 or x = 0.75, since the question only asks to show that a root lies 'between' these boundaries; in which case, the product would equal 0, and the sign would be undefined.

Thanks for any help if you actually managed to trawl through all of this and you're still alive. :colondollar:
Reply 1
Original post by Callum Scott
Formalising

Basically, when doing numerical methods proof of a root in an equation; for example:

"f(x)=2sin(x2)+x2f(x) = 2\sin (x^2) + x -2

Show that f(x)=0f(x) = 0 has a root α\alpha, between x=0.75x = 0.75 and x=0.85x = 0.85"

There are problems I have with the method that aren't really mentioned. For an interval [a,b][a, b] the fact that there is a change in sign of a function from one bound to the other, in no way implies that a root exists. I brought this up to my maths teacher with the example of f(x)=1xf(x) = \frac{1}{x} and he said, well the function has to be continuous -- which made more sense. However, there are still cases in which a function can be discontinuous across an interval and yet a change of sign still correctly implies that a root exists. As well, shouldn't we state an assumption that the function is continuous within the interval when answering the question, if this is the case?

For example, the graph of f(x)=x+1(x1)(x2)f(x) = \frac{x+1}{(x-1)(x-2)}
From -5 to 0, the function is continuous and the change in sign implies a root of f(x) = 0; which turns out to be true. From 0 to 1.5, the change in sign does not imply a root because it is not continuous -- fits in with my teacher's statement. From -5 to 5, however, the change in sign correctly implies a root, yet the function is not continuous... so what ARE the requirements to correctly imply a root?

What I typically say is:There is a change in sign across the interval, therefore a root must exist in the interval.But despite getting the marks, it annoys me because it isn't true. So, how could I formally answer the question, using complicated maths notation [because it looks cool], that is rigorously true?

And I know the markers probably won't care; It's for my own peace of mind :redface:

Neatening it up

It's especially painful when they ask to show, for example, that α=0.23512 \alpha = 0.23512 [not relating to the question above] is correct to 5 decimal places... then I have to write out 7 digit numbers over and over; it's a petty pet peeve but I'm all about efficiency. So, is there another way I can refer to the interval's lower\upper bound without having to keep using the numerical value over and over again, or would it be fine denoting my own notation at the start?

e.g. Let s=0.75,t=0.85 and I=[s,t]\mathrm{Let\ }s=0.75,t=0.85\mathrm{\ and\ }I=[s,t], then I can atleast recite ss and tt instead of lengthy values

Finally, is there a way to indicate that there is a change in sign, that is concise and mathematical, instead of writing, "There is a change in sign across the interval therefore a root must exist"

I could say that sgn(f(0.75))sgn(f(0.85))sgn(f(0.75)) \neq sgn(f(0.85)) or I could say f(0.75)f(0.85)<0f(0.75)\cdot f(0.85) < 0, but technically speaking, couldn't there exist a root at x = 0.85 or x = 0.75, since the question only asks to show that a root lies 'between' these boundaries; in which case, the product would equal 0, and the sign would be undefined.

Thanks for any help if you actually managed to trawl through all of this and you're still alive. :colondollar:



..
Original post by TeeEm
..


We have our first survivor! :console:
Original post by Callum Scott
...


(sign change \land function continuous on interval) \Rightarrow root in interval.
Continuity is usually trivial so is often omitted as you say. You can use sgn notation if you want, or you can just write sign change.
(edited 8 years ago)
Original post by morgan8002
(sign change \land function continuous on interval) \Rightarrow root in interval.
Continuity is usually trivial so is often omitted as you say. You can use sgn notation if you want, or you can just write sign change.


continuous within the interval.... so obvious god dammit. :colonhash:

Am I right in reading that as:
If there's a change in sign and the function is continuous on the interval then there is a root in the interval? I've never seen the \land notation before, is all
Original post by Callum Scott
continuous within the interval.... so obvious god dammit. :colonhash:

Am I right in reading that as:
If there's a change in sign and the function is continuous on the interval then there is a root in the interval? I've never seen the \land notation before, is all


Yes.
Original post by morgan8002
Yes.


Ok, so I've written this, it hopefully conveys what I'm trying to say beneath it, does it make sense? *crosses fingers*

for an interval,I=[a,b]:f(a),f(b)0[br][br]([sgn(f(x))]ba=2  f:IR)(αI:f(α)=0)\mathrm{for\ an\ interval}, I = [a, b] : f(a), f(b) \neq 0[br][br]( \lvert\left[ \mathrm{sgn}(f(x)) \right]_b^a\rvert = 2\ \land\ f:I \mapsto \mathbb{R}) \Rightarrow ( \alpha\in I: f(\alpha) = 0)

For an interval I, from [and including] a to b, given f(a) and f(b) don't equal 0:
If the magnitude of the sign of f(a) minus the sign of f(b) is equal to 2 AND every value along the interval I maps to a real number, then there exists an α\alpha within the interval I such that f(α\alpha) is equal to 0.

Spoiler

(edited 8 years ago)
Original post by Callum Scott
...so what ARE the requirements to correctly imply a root?...


Continuity is a sufficient condition for there to be a root (or roots) in the interval concerned; so when you apply a root finding method in practice, the first thing you should check is whether the function is continuous.

However, you may ask whether continuity is a necessary condition for there to be a root. Here's a hint to set you off investigating: look at functions with the so-called "intermediate value property", otherwise known as Darboux functions.
Original post by Callum Scott
Ok, so I've written this, it hopefully conveys what I'm trying to say beneath it, does it make sense? *crosses fingers*

for an interval,I=[a,b]:f(a),f(b)0[br][br]([sgn(f(x))]ba=2  f:IR)(αI:f(α)=0)\mathrm{for\ an\ interval}, I = [a, b] : f(a), f(b) \neq 0[br][br]( \lvert\left[ \mathrm{sgn}(f(x)) \right]_b^a\rvert = 2\ \land\ f:I \mapsto \mathbb{R}) \Rightarrow ( \alpha\in I: f(\alpha) = 0)

For an interval I, from [and including] a to b, given f(a) and f(b) don't equal 0:
If the magnitude of the sign of f(a) minus the sign of f(b) is equal to 2 AND every value along the interval I maps to a real number, then there exists an α\alpha within the interval I such that f(α\alpha) is equal to 0.

Spoiler



[sgn(f(x))]ba=2|\left[\mathrm{sgn}(f(x))\right]_b^a| = 2 is right, but isn't very clear. You want whoever's reading your work to be able to understand it as easily as possible. sgn(f(a))sgn(f(b))\mathrm{sgn}(f(a)) \neq \mathrm{sgn}(f(b)) is much clearer.

f:IRf:I \mapsto \mathbb{R} is incorrect use of \mapsto. It should be \rightarrow. Also, this statement is not equivalent to continuity on the interval, for example the sgn function satisfies this on [-1,1] and is not continuous on that interval.

There should also be a statement of existence on the RHS.

eg.
(sgn(f(a))sgn(f(b))f continuous on [a,b])α[a,b]:f(α)=0(\mathrm{sgn}(f(a)) \neq \mathrm{sgn}(f(b)) \land f \text{ continuous on } [a, b]) \Rightarrow \exists \alpha \in [a, b] : f(\alpha) = 0
Original post by morgan8002
[sgn(f(x))]ba=2|\left[\mathrm{sgn}(f(x))\right]_b^a| = 2 is right, but isn't very clear. You want whoever's reading your work to be able to understand it as easily as possible. sgn(f(a))sgn(f(b))\mathrm{sgn}(f(a)) \neq \mathrm{sgn}(f(b)) is much clearer.

f:IRf:I \mapsto \mathbb{R} is incorrect use of \mapsto. It should be \rightarrow. Also, this statement is not equivalent to continuity on the interval, for example the sgn function satisfies this on [-1,1] and is not continuous on that interval.

There should also be a statement of existence on the RHS.

eg.
(sgn(f(a))sgn(f(b))f continuous on [a,b])α[a,b]:f(α)=0(\mathrm{sgn}(f(a)) \neq \mathrm{sgn}(f(b)) \land f \text{ continuous on } [a, b]) \Rightarrow \exists \alpha \in [a, b] : f(\alpha) = 0


I was reading from the Wikipedia page that a function is continuous if every value of x maps to a real number, and it used that/similar notation, as well as the fact that the intermediate value theorem is only true if the function is continuous. But I recently realised that a piecewise function could still easily be continuous, by this definition, and yet the IMT couldn't possibly be true -- so I kind of got the gist it wasn't right. I guess I'll read more up on continuity and differentiability next time :P

I have no idea why I didn't think of that way of representing the change in sign xD but thanks

What's the difference between the \mapsto and the other thin arrow notations? I haven't been taught any of this so I just assumed they all meant the same thing!? And am I right in thinking that {A:B}{AB}\{ A:B\} \equiv \{ A | B \} (the : and | notation mean the same, or are they slightly different?)
Original post by Callum Scott
I was reading from the Wikipedia page that a function is continuous if every value of x maps to a real number, and it used that/similar notation, as well as the fact that the intermediate value theorem is only true if the function is continuous. But I recently realised that a piecewise function could still easily be continuous, by this definition, and yet the IMT couldn't possibly be true -- so I kind of got the gist it wasn't right. I guess I'll read more up on continuity and differentiability next time :P

I have no idea why I didn't think of that way of representing the change in sign xD but thanks

What's the difference between the \mapsto and the other thin arrow notations? I haven't been taught any of this so I just assumed they all meant the same thing!? And am I right in thinking that {A:B}{AB}\{ A:B\} \equiv \{ A | B \} (the : and | notation mean the same, or are they slightly different?)


That definition isn't right.
The (limit) definition of continuity of a function of a point is that f(x) is continuous at x=a iff limxaf(x)=f(a)\displaystyle\lim_{x\rightarrow a} f(x) = f(a).
A function f is continuous on an interval I iff f is continuous at all aIa \in I.
You're right, the IVT doesn't work for the definition you've found.

Piecewise functions can be continuous, just few of them will be.

\rightarrow is used to specify the domain and codomain of a function, eg. f:RCf: \mathbb{R} \rightarrow \mathbb{C}(it's also used for limits in an unrelated way). \mapsto is used to give the rule to get from a specific value in the domain to a value in the codomain, eg. xxx\mapsto \sqrt{x}. Putting these two together, we have a full function definition, f:RC,xxf: \mathbb{R} \rightarrow \mathbb{C},x\mapsto \sqrt{x}.
| is the same as :. Sometimes one is preferred for example when you have a lot of modulus signs.
Original post by Callum Scott
~snip~
Yes, this is over the top, but I loooooove it.
I've got to be honest, as someone who used to teach this stuff, I find what you've written pretty horrible. (It could be said that morgan8002 started it).

Unless you are doing a course in formal logic, there is absolutely no benefit in replacing words with symbols. If you look at actual proper textbooks, they nearly always use words rather than symbols, at least when giving definitions and theorem statements.

To get back to the original question:

f is continuous on [0.75, 0.85], f(0.75) < 0, f(0.85) > 0, therefore (by the Intermediate Value Theorem), f has a root between 0.75 and 0.85.

This is a 1 line answer, uses virtually no symbols, and would be a completely satisfactory answer even at university level (in some contexts you might also be expected to justify the continuity of f, but we'll skip over that).

Why make life more complicated than it needs to be? People have enough trouble with Analysis without trying to make it look like someone spilled a bunch of arcane typography over the page.
Original post by DFranklin

----
Why make life more complicated than it needs to be? People have enough trouble with Analysis without trying to make it look like someone spilled a bunch of arcane typography over the page.


I'm not necessarily going to use this in exams, I agree that'd be way too risky, I just want to get a grasp of how formal logic works. I'd sit here and beg people to teach me formal logic, but somehow I think people do not want to do that; instead I'm just using this stuff and trying to get the gist of how it works from the graduates/professors on here. The fact that you've called it 'horrible' makes me think I'm better off watching lectures.

Answering this sort of question on the paper is no problem, but I spend a lot of my free time dealing with understanding the concepts, and what I interpreted of what my teacher said made no sense to me later on. I probably look retarded from your perspective, most likely with multiple errors I've made, limping around trying to look fancy with notation and crap, but lo and behold, I've learned about the intermediate value theorem, learned that my conception of continuity was wrong, learned about \land and \lor notation (not necessarily any good at it yet), leading me on to read about the distributive thing -- whatever I wrote along with the "this is probably way over the top thing"; the fact that morgan did use the notation has sort of helped me see how others use it better, so I thank him!

Idk... I appreciate it when people use fancy 'arcane typography' that I don't understand because then I know there's something I can learn. As well, I'd feel like an asshat if I pulled out formal logic in a mock test, for my teacher to mark, so I figure the internet's a decent place to look like a plonker and learn where I'm wrong
(edited 8 years ago)
Original post by Callum Scott
...I probably look retarded from your perspective, most likely with multiple errors I've made, limping around trying to look fancy with notation and crap...


I'd just like to jump in here and say that some of the questions you ask on this forum are really interesting and show precisely the sort of depth of inquiry that make me think you could turn into a professional mathematician in a few years time (if you wanted to!)

However, excessive formalism does tend to set off an immune response in us older folk. I can think of three reasons at least:

(a) It tends to obscure the underlying ideas; a picture is often worth a thousand latex symbols.

(b) connected to (a), we've seen many students get utterly lost and hence demotivated by excessive notation. Maths is hard enough for students as it is without adding to their difficulties.

(c) Some of us were trained in the era of the Bourbakian hegemony in mathematics: if it wasn't stated in its greatest generality in the most abstract way possible, then it wasn't proper mathematics. My poor head! We still bear the mental scars.The algebraic geometer Miles Read has some amusing things to say about this era.

Having said that, it is important that students get some familiarity with formalism sometime as a defensive measure at least. If you're going to read the literature, then you have to face up to the fact that there is a small proportion of academic writers who like writing as formally as possible. Funnily enough this often seems to happen in applied areas such as the computer science, engineering and statistics literature that I read...
(edited 8 years ago)
Original post by Callum Scott
I'm not necessarily going to use this in exams, I agree that'd be way too risky, I just want to get a grasp of how formal logic works. If you want to learn formal logic, I'd really strongly suggest you try using it for really simple stuff that you understand well. (e.g. things like if A, B are integers and AB is odd, then A and B must be odd). That way your only source of confusion is the "formal logic" side of things, not the mathematical topic you're trying to describe as well.

I'd sit here and beg people to teach me formal logic, but somehow I think people do not want to do that; instead I'm just using this stuff and trying to get the gist of how it works from the graduates/professors on here.
Well, I've never done a course (I typoed that as "curse" and I really wanted to leave it in, b.t.w.) in formal logic, so I'm certainly not the one to try to teach it.

But I'd also have to say that I can't recall any of the regular graduate posters making use of formal logic on here, so I'm not sure who you've been trying to pick it up from.

The fact that you've called it 'horrible' makes me think I'm better off watching lectures.
Well, no. The fact that I've called it 'horrible' means that I think it has no place in trying to understand a question about when we can deduce roots exist in an interval. To my mind introducing formal logic here is induces a classic case of being unable to see the wood for the trees.

I mean, when this started off we were talking about if f(x) =1/x then f(-1) = -1, f(1) = 1, but there is no root of f(x) in the interval [-1, 1], and we got that the reason is that f(x) isn't continuous on that interval, and round about there, the actual mathematics of the situation stopped, and everything got totally bogged down in how to write things in the most complicated and obscure way possible.

About 8 posts on into, it becomes clear you've using a very incorrect definition of continuity (which isn't your fault - it's not something you generally see before university), and someone gives a definition involving limits (which are something you don't know how to use properly before university).

So at this point you still don't really have any idea what a continuous function is, or how to decide if a function is continuous on an interval. So in terms of the original question, not a lot of progress. But we've learned how to use at least 3 symbols that I personally need to look up if I want to LaTeX them, so I guess that's good.

Seeing as there's a *load* of mathematics we could be talking about involving continuity and roots in an interval, I find this all a bit frustrating, but to be fair, reading your entire post it does seem you made it clear you were most interested in the notation side of things.
Original post by morgan8002
That definition isn't right.
The (limit) definition of continuity of a function of a point is that f(x) is continuous at x=a iff limxaf(x)=f(a)\displaystyle\lim_{x\rightarrow a} f(x) = f(a).
A function f is continuous on an interval I iff f is continuous at all aIa \in I.
You're right, the IVT doesn't work for the definition you've found.

Piecewise functions can be continuous, just few of them will be.

\rightarrow is used to specify the domain and codomain of a function, eg. f:RCf: \mathbb{R} \rightarrow \mathbb{C}(it's also used for limits in an unrelated way). \mapsto is used to give the rule to get from a specific value in the domain to a value in the codomain, eg. xxx\mapsto \sqrt{x}. Putting these two together, we have a full function definition, f:RC,xxf: \mathbb{R} \rightarrow \mathbb{C},x\mapsto \sqrt{x}.
| is the same as :. Sometimes one is preferred for example when you have a lot of modulus signs.


That makes much more sense! it seems I initially got the gist of what continuity was, then taught myself that it was something else and rammed the initial idea out of my own head :s-smilie: but thanks for clearing that up :biggrin:

Edit: Just to clarify, is it equivalent/does that notation inherently carry that limxa=f(a)limxa+=limxa \displaystyle\lim_{x \rightarrow a} = f(a) \Rightarrow \displaystyle\lim_{x \rightarrow a^+} = \displaystyle\lim_{x \rightarrow a^-}?
(is the lim(x -> a) equivalent to saying, the limit from both sides)
(edited 8 years ago)
Reply 16
Original post by Callum Scott
That makes much more sense! it seems I initially got the gist of what continuity was, then taught myself that it was something else and rammed the initial idea out of my own head :s-smilie: but thanks for clearing that up :biggrin:

Edit: Just to clarify, is it equivalent/does that notation inherently carry that limxa=f(a)limxa+=limxa \displaystyle\lim_{x \rightarrow a} = f(a) \Rightarrow \displaystyle\lim_{x \rightarrow a^+} = \displaystyle\lim_{x \rightarrow a^-}?
(is the lim(x -> a) equivalent to saying, the limit from both sides)


That implication is literally true, yes, but note that continuity is an even stronger condition because it tells us that our function is defined at a point 'a' as well as the limits of f(x) approaching a from both sides being equal to each other.

(I'm pretty sure you've got this, but I'm posting in case (a) you haven't (!) and (b) for the benefit of anyone trying to decipher some of the 'horrible' formalism in this thread who isn't clear on the definition themselves :smile: )

The best way to get to grips with a lot of these ideas is to make up your own examples and see how far you can get with them by adjusting the definitions slightly - making sure you start with simple examples that aren't obscured by notation!

So for example, we know that the function

f(x) = x is continuous and differentiable everywhere

You may well also know that the modulus function

f(x) = |x|

is continuous everywhere, and differentiable everywhere except at x = 0.

But now we can invent a new function g(x) defined by

g(x) = |x| for x not equal to 0
g(0) = 37

Then the limit of g(x) as x approaches 0 from either side is 0, but g(x) isn't continuous there because we've defined g(0) to have some random value not equal to the (two-sided) limit.
Reply 17
The intermediate value theorem, correct?

I did A-Level Maths and FM, but I study computer science at university, not mathematics - I might be missing something.
Original post by davros
That implication is literally true, yes, but note that continuity is an even stronger condition because it tells us that our function is defined at a point 'a' as well as the limits of f(x) approaching a from both sides being equal to each other.

(I'm pretty sure you've got this, but I'm posting in case (a) you haven't (!) and (b) for the benefit of anyone trying to decipher some of the 'horrible' formalism in this thread who isn't clear on the definition themselves :smile: )

The best way to get to grips with a lot of these ideas is to make up your own examples and see how far you can get with them by adjusting the definitions slightly - making sure you start with simple examples that aren't obscured by notation!

Then the limit of g(x) as x approaches 0 from either side is 0, but g(x) isn't continuous there because we've defined g(0) to have some random value not equal to the (two-sided) limit.


Yeah, I think I have it now, logic aside, :biggrin:
Thank you for your help in clearing it up, and hopefully I'll think of some weird convoluted function that I can ask about in the future :tongue:

Quick Reply

Latest