The Student Room Group

Newtons algorithm

This may be a pretty basic question for some of you so bear with me.
If I have a exponential graph with 3 solutions and I use iteration
xt+1=xt-[f(x)/f'(x)] to find the middle solution starting at 1 how do I find the other solutions?
I was thinking that starting near the other solutions would give different results (i've graphed it out so I know roughly the solutions).
Also I was thinking by rearranging the equation.
say for example
exp(x)=2x^2
instead of f(x)=exp(x)-2x^2 f(x)=2x^2-exp(x)
Thanks
Original post by Lay-Z
This may be a pretty basic question for some of you so bear with me.
If I have a exponential graph with 3 solutions and I use iteration
xt+1=xt-[f(x)/f'(x)] to find the middle solution starting at 1 how do I find the other solutions?
I was thinking that starting near the other solutions would give different results (i've graphed it out so I know roughly the solutions).
Also I was thinking by rearranging the equation.
say for example
exp(x)=2x^2
instead of f(x)=exp(x)-2x^2 f(x)=2x^2-exp(x)
Thanks


Use the same iteration with starting points close to your other solutions
Reply 2
If the onlly info you`re given is that you have 3 solutions, then plotting the individual curves (exp(x), 2x^2) on the same axes is sensible, so you can "see" what the solutions will be, as you`ve already done.

The simpler iteration formula is given by f(x)=2x2exf(x)=2x^{2}-e^{x}

Viz:

N(x)=ex(x1)2x2ex4x\displaystyle N(x) = \frac{e^{x}(x-1)-2x^{2}}{e^{x}-4x}

Takes aroud 5 iterations if you start the negative root at the highest integer value (from your graph estimate), the positive one at it`s respective next highest (i.e. -1 and 2)
(edited 9 years ago)
Reply 3
Original post by Hasufel
If the onlly info you`re given is that you have 3 solutions, then plotting the individual curves (exp(x), 2x^2) on the same axes is sensible, so you can "see" what the solutions will be, as you`ve already done.

The simpler iteration formula is given by f(x)=2x2exf(x)=2x^{2}-e^{x}

Viz:

N(x)=ex(x1)2x2ex4x\displaystyle N(x) = \frac{e^{x}(x-1)-2x^{2}}{e^{x}-4x}

Takes aroud 5 iterations if you start the negative root at the highest integer value (from your graph estimate), the positive one at it`s respective next highest (i.e. -1 and 2)

Thanks for the reply.
Ive iterated from 1 and 3 to get 2 solutions 1.488 and 2.618 which coincide with the graph but I cant seem to get the final solution which looking at the graph is about -0.5.
If I start at 0 it the 2nd iteration of the algortihm goes to 1 and I get 1.488 again. The other numbers i've tried dont converge.

I've been using the f(x)=exp(x)-2x^2/exp(x)-4x. Not sure what the 2nd equation you posted is
(edited 9 years ago)
Reply 4
have you tried starting from -1?

this is what i get:

{-0.626336, -0.544081, -0.539846, -0.539835, -0.539835, -0.539835}

(the problem with the other starting points you have (and others) is that they`re in intervals of choas - sometimes within a given interval a "guess" converges and sometimes not - sometimes it cycles between a few numbers and other times it goes all over the place (chaos theory, but that`s too deep for here)

try x = -1...

My N(x) equation is just the newton iteration for y(x)=e^x-2x^2 , where it`s common denominator is e^x-4x

N(x)=xex2x2ex4x=ex(x1)2x2ex4x\displaystyle N(x)= x - \frac{e^{x}-2x^{2}}{e^{x}-4x}= \frac{e^{x}(x-1)-2x^{2}}{e^{x}-4x}

(EDITED)
(edited 9 years ago)
Reply 5
Original post by Hasufel
have you tried starting from -1?

this is what i get:

{-0.626336, -0.544081, -0.539846, -0.539835, -0.539835, -0.539835}

(the problem with the other starting points you have (and others) is that they`re in intervals of choas - sometimes within a given interval a "guess" converges and sometimes not - sometimes it cycles between a few numbers and other times it goes all over the place (chaos theory, but that`s too deep for here)

try x = -1...

My N(x) equation is just the newton iteration for y(x)=e^x-2x^2 , where it`s common denominator is e^x-4x

N(x)=xex2x2ex4x=ex(x1)2x2ex4x\displaystyle N(x)= x - \frac{e^{x}-2x^{2}}{e^{x}-4x}= \frac{e^{x}(x-1)-2x^{2}}{e^{x}-4x}

(EDITED)

What values did you get for f and f'.
this is what I get for -1

Reply 6
i get these:
Reply 7
Original post by Hasufel
i get these:

Thanks mate

Quick Reply

Latest