The Student Room Group

Numerical Methods Question

Please could someone explain how to do part a?
Screenshot 2024-04-10 at 17.21.54.png
(edited 1 month ago)
Reply 1
Original post by BlackLives
Please could someone explain how to do part a?
Screenshot 2024-04-10 at 17.21.54.png

Think about the sign of the derivative so which direction are the updates to x?
Reply 2
Original post by mqb2766
Think about the sign of the derivative so which direction are the updates to x?

I know that f(x)= e-x^2(1-2x2) and f'(x)=0 at 1/√2.
Reply 3
Original post by BlackLives
I know that f(x)= e-x^2(1-2x2) and f'(x)=0 at 1/√2.

Tbh, Id do a couple of iterations of NR visually (its probably why theyve given you the sketch) so that you can understand the logic in the answer. So you have the initial value of x to the right of the maximum. So when you draw the corresponding tangent and take it down to the x axis to the new x estimate, its moved to the right. Then do the same thing again and it will keep moving to the right because the curve is decreasing (negative gradient) and the function is positive. So as long as you show the gradient is negative past the criical point and the function is positive, then you just put that logic together.
Reply 4
Original post by mqb2766
Tbh, Id do a couple of iterations of NR visually (its probably why theyve given you the sketch) so that you can understand the logic in the answer. So you have the initial value of x to the right of the maximum. So when you draw the corresponding tangent and take it down to the x axis to the new x estimate, its moved to the right. Then do the same thing again and it will keep moving to the right because the curve is decreasing (negative gradient) and the function is positive. So as long as you show the gradient is negative past the criical point and the function is positive, then you just put that logic together.

Ok I think I understand it now because it diverges from the root. I know how to prove that the function is always positive for x>1/√2 but how do I prove that the gradient function is always negative?
Reply 5
Original post by BlackLives
Ok I think I understand it now because it diverges from the root. I know how to prove that the function is always positive for x>1/√2 but how do I prove that the gradient function is always negative?

What is the sign of e^(-x^2) and what is the sign(s) of (1-2x^2) and what happens when you multiply for the domain x>1/sqrt(2)
Reply 6
Original post by mqb2766
What is the sign of e^(-x^2) and what is the sign(s) of (1-2x^2) and what happens when you multiply for the domain x>1/sqrt(2)

Ok I get it e^(-x^2) is always positive and (1-2x^2) becomes more negative. Thanks for your help!
Reply 7
Original post by mqb2766
What is the sign of e^(-x^2) and what is the sign(s) of (1-2x^2) and what happens when you multiply for the domain x>1/sqrt(2)

Sorry to bother you again but could you also explain part b. I got -0.0136 but the answer is -0.2089. Why isn't it -0.0136 since it fits in the interval.
Reply 8
Original post by BlackLives
Sorry to bother you again but could you also explain part b. I got -0.0136 but the answer is -0.2089. Why isn't it -0.0136 since it fits in the interval.

The answer is -0.2089. Have you done enough iterations of NR or just done one?
Reply 9
Original post by mqb2766
The answer is -0.2089. Have you done enough iterations of NR or just done one?

I just did one. How many am I supposed to do? The answer I got already lies in the interval
Original post by BlackLives
I just did one. How many am I supposed to do? The answer I got already lies in the interval

The question wording isnt great and strictly speaking you could say youve answered the question (have you found the root?). However, similar questions would say something like the algorithm has convered to 3dp, rather than just giving the answer to 3dp. Generally NR converges fairly fast when youre close to the solution and doing ~3 iterations is enough to justify convergence to 3dp.
(edited 1 month ago)
Reply 11
Original post by mqb2766
The question wording isnt great and strictly speaking you could say youve answered the question (have you found the root?). However, similar questions would say something like the algorithm has convered to 3dp, rather than just giving the answer to 3dp. Generally NR converges fairly fast when youre close to the solution and doing ~3 iterations is enough to justify convergence to 3dp.

Ok I understand. Thanks

Quick Reply

Latest