NUMERICAL METHODS Flashcards
Why do we need numerical methods ?
Because behind polynomial 4 there is no formula to solve roots, so to find roots and solve equations we need numerical methods
Change of sign method, what is it
What are the CONDTIONS
Thisnis when you habe values and you test for y, and if you get a CHANGE of sign this means there is ATLEAST 1 (could be more ) roots between these two x values
However this is only true when the CURVE IS CONTINOUS BETWEEN THESE TWO POINTS, if not, then there could be asymptotes or a discontinuity between , and still work, but no root
So change of sign digestion full
If there’s a change of sign AND the curve is CONTINOUS there is ATLEAST 1 ROOT between those two points
How to do the change of sign , all the steps
Get on to one side,
Must introduce a function , so LET F(X) = etc
- now can do f( a) = , f(b) =
As there is a change of sign AND the function is CONTINOUS between a and b, there must be atleast one root between a and b
If there is no change of sign and curve is CONTINOUS , does that mean there are NO roots between here?
NO, it means we don’t know, because there could be a root and as we have no change of sign our values too far,
Or no roots at all
How to show that root is correct to certain dp?
Take upper and lower bound and sub and show there is a sign change so CONTINOUS means there is a root between this interval therefore it’s correct to this number of dp
Assuming we don’t know it’s CONTINOUS, what are thus the 3 ways that change or sign fails
Spec points LEARN
1) if it’s not CONTINOUS and thus a vertical asymtope in between ( change of sign no root)
2)if there’s a repeated root ( never a change of sign but a root)
3) if the range is too large ( several roots, so no change of sign but hella roots)
How does fixed point iteration fail?
- either it doesn’t converge to root you want
- or jus diverges away and never hits
What condition means it will never converge at a root?
When the grsdient of the graph at root is not between -1 < grad <1 . When this happens it does not converge
When does staircase / cobeweb form?
When the gradient at root is negaitve cobweb , when positive staricade
How to do fixed point iteration, what to ALWAYS DO ONCE FOUND A ROOT TO DO IMPORTANT
1) make f (x) in form x = g(x) so roots of this are roots of f(x)
2) make recurrence , and start with x0
3) spam recurrence until get answer to dp
NOW MUST CHECK and verify using change of sign , go back to original f(x)
- if verified then calm, if not continue
Again what MUST YOU DO when finding root with fixed point
Verify using changing of sign ALWAYS
So how to try and converge at the other root?
The only way I’d to change the rearrangement originally, this will try converge ar other root, such that grsdient is now between -1 and 1!
How does Newton raphsom work?
Starting value, finds tangent, goes to x axis, goes back to y, tangent, keeps doing to home in
3 ways Newton raphsom fails ? LEARN
1) if you sub in a stationary point, this is when f prime x is =0, and thus you’ll get 1/0 undefined
2) using change of sign you know there’s a root between ( assuming CONTINOUS ). However , using these values homes in on OTHER ROOTS, and completely missed this one
3) asymtope or discontinuities like change of sign !
How to home in on right root, the only way?
Only way is to lick a value close to the root, but this could be hard to program
How to use Newton raphsom to find an approximation to stationary point?
Just let f (x) this time be dy / dx, we always set f(x) to 0 so setting it to 0 here is equivalent to the grsdient function and thus the roots of this are the STATIONARY POINTS
How to confirm your answer for Newton raphsom on calc?
Sub in the f(x), and use shift solve and enter the starting value
- now this will give you the answer if you spam answer!
How to state the error between two bounds if we know a root lies ( say 1, 2)
Can say the root is Half way. 1.5 with error +-0.05
How to show that equation has one real root only?
Differntiate and difnnd turning ooints ,
As bith turning points are below or above the x axis, means that there is only ONE ROOT!
Also the Newton rapshom ,au co oleltey diverge
When is this likely to happen
Symmetric graoh with root at x =0
Typically if your starting value is close to a dtatuonary poijt. It’s gonna shoot oof
Trapezium rule, what’s the relationship between ordinates and numbers of strips?
Always one more ordinate than number of strips, and number of strips is h in formula
How to do trapezium
1) find strips
2) then make table from a and add strip length each time until b.
3) fill out for y ( use calc)
Should get one more ordinate
Then use formula
4) can check using integration but might not necessarily be true. This becaude if curve increases too much then could be overestimate etc
How to increase accuracy for trapezium rule?
Run more strips
How to tell if trapezium is overestimate / underestimate
If Region of curve concave up means the trapeziums alwayd bigfer so overestimate
Vice verca
What if the concavity changes, how to say if over or underedtimate
If changed can’t tell
If the values of y give 0 what shape is it
A trinagle
Why do we use rectangles ?
We use them to find an UPPER OR LOWER BOUND to the area
What is the only time we can use rectangles to find an upper bound / lower bound
The only time is when there IS NO TURNING POINT, befaude if just goes one way the all the rectangles will be above or below and so can say upper snd lower, but if it changed then it mixes
Give answer to a degree of accuracy means what
Round ti number which agrees and state the dp
When do you use the traprexium rule to give you a better value for upper or lower bound?
When jtspurely concave up or down, no inflection, then that means your trleaixum method will obv give better approximation
However when point of inflection, trapezium will go down and then up so csntuse it to improve on bounds
How to show that we can’t tell underestimate overestimate
Find second derrivstive to see cincsvity, show that the Vinci with is so between the roots, suggesting it’s changed concavitirs, and hence the trapeziums before and after would be over and lower so we can’t tell if overall its and underestimate of overestimate
(To see what it changed from , I out left and right)