Is my new method for solving equations using iteration correct and effective?

  • Thread starter hedlund
  • Start date
In summary, the conversation discusses a new method for solving equations and the different equations that have been tested with this method. It is similar to fixed point iteration and requires |f'(x)|<1 on an interval that contains the initial guess and the solution for it to work. There is a lot of literature on fixed point iteration schemes.
  • #1
hedlund
34
0
Suppose f is a function. How can we solve the equation f = x? I think I've found an interesting new way, I'm not sure it's correct however. Say we want to solve the equation cos(x)=x, then a suitable way to solve this equation is to use Newton-Raphson to get a solution. But I think I've found a method that also converges, not as quickly however. Make a guess x0 for cos(x)=x. Calculate cos(x0) = x1, calculate cos(x1) = x2, calculate cos(x2) = x3 and so on. So we use x_(n + 1) = f(n). To demonstrate this method I solve the following equation:

1. cos(x)=x, start with a seed, I chose x0=-100 just to show that it does in deed seem to converge. This gives with the first 10 calculations:

0.84598898198358890274
0.78815472769682836497
0.76151115452367370362
0.74929854146798181945
0.74372766089317781727
0.74119341653274063166
0.74004213182177068154
0.73951944851492685807
0.73928222045897252958
0.73917456532965709331

cos(x)-x=0.00011648598787101138

2. ln(x)=x, start with a seed, I chose x0 = 1000. This gives:

0.31725931762133114611+1.33153507953496342211i
0.31718629567450052325+1.34014616816598811224i
0.31927011778936558593+1.33608733612343809223i
0.31731905625121883267+1.3375069028202560968i
0.3185799875460203639+1.33730100833347268442i
0.3179351563786906755+1.3370979004383313528i
0.31819146448512503102+1.33734761595800791012i
0.31812984714983422095+1.33716852678175367383i
0.31811627833445380074+1.33726784220316782635i
0.31814636098265470986+1.33722414212673179521i

This is quite good x-ln(x) = 0.00095307601525015884-0.01187533532322322971i

3. cos(x)^2=x, seed x=1000, gives:
~0.90326410456638764967
~0.86019033654796716573
~0.82962596896246371156
~0.80621728441276723759
~0.78742570290033394307
~0.77185503812233617185
~0.75865872241297805902
~0.74728626630218568701
~0.73736019802076276074
~0.72861058786690100970

This isn't good, since cos(x)^2-x = -0.1719 ..., however calculating more terms, like 100 terms gives cos(x)^2 - x = 0.00004448970614357726

I want to know if this is new and if it does in fact converge to a root of the equation?
 
Last edited:
Mathematics news on Phys.org
  • #2
have you tried this method for [tex] f(x) = x^2 [/tex]
 
  • #3
hedlund:
What you're doing is well known; cool that you discovered it on your own.
 
  • #4
arildno said:
hedlund:
What you're doing is well known; cool that you discovered it on your own.
Oh right I see, I was a silly confused what he was applying there.

I suggest you try this itteration mathod:

[tex]x_n = x_{n-1} + A(\cos x_{n-1} - x_{n-1})[/tex]

For different values of A to try and see which ones converge quickly, some converge at a very fast rate, some converge at a slow rate like your example (some diverge at a very fast rate)
 
  • #5
CrankFan:

I doesn't converge to a root if |x0| > 1. If I choose |x0| < 1 it does in fact converge to a root. So it's basicially useless for polynomials, since you need to know how big the seed needs to be for it to converge.

Zurtex:

I'm aware of the fact that it is slow. However I was just playing around with some functions and noticed it seemed to converge. To:

"What do you know about these sort of algorithms? What kind of methods do you think are most effective? I struggle to believe the Newton-Raphson method appropriately used converges so close, have you tried checking the gradient of the function around the area to make sure it's appropriate?"

I hardly understand half of the words you use, I don't know what methods are the most effective methods. I don't know what a gradient is (at least I don't know what the word means in English, I might know it in Swedish however).

arildno:

So this isn't new? I thought it was, since I had never seen it before. Do you know the name of this method for solving equations? I would like to read more, to actually see why it works. I might not understand why it works, but I would like to have a look at it. I agree with you that it's cool to discover things, and I often discover things by just playing around.
 
  • #6
Looks a lot like fixed point iteration.
 
  • #7
hedlund:
If I remember correctly, the convergence criterion should be
[tex]|f(x_{n})-f(x_{n-1})|<k|x_{n}-x_{n-1}|<1, n=1,\cdots[/tex]
something like that, anyways.
 
Last edited:
  • #8
hedlund said:
I hardly understand half of the words you use, I don't know what methods are the most effective methods. I don't know what a gradient is (at least I don't know what the word means in English, I might know it in Swedish however).

I'm sorry but my Swedish isn't that brilliant, I'll ask one of my friends in a couple of days in my maths class if any of them can type in swedish, I'm sure I remember one or 2 of them being able to.
 
  • #9
Gradienten heter dessverre "gradienten" på svensk..
 
  • #10
for a fixed point scheme to work you need to have |f'(x)|<1 on an interval that contains your initial guess and the solution.

There is a lot of literature aobut fixed point iteration schemes, just do a google search on fixed point.
 

What is the function f(x)=x?

F(x)=x is a linear function, meaning that it has a constant rate of change and produces a straight line on a graph. It is also known as the identity function, as it maps every number to itself.

What is the domain of f(x)=x?

The domain of f(x)=x is all real numbers. This means that any value can be plugged in for x and the function will output a corresponding value.

What is the range of f(x)=x?

The range of f(x)=x is also all real numbers. This is because every number in the domain has a corresponding output, making the range infinite.

What is the slope of f(x)=x?

The slope of f(x)=x is 1. This is because the function has a constant rate of change of 1, meaning that for every 1 unit increase in x, there is a corresponding 1 unit increase in y.

How can f(x)=x be applied in real life?

F(x)=x can be applied in many real life situations, such as calculating distances and rates of change. It can also be used in budgeting and financial planning to determine the relationship between income and expenses.

Similar threads

Replies
1
Views
9K
Replies
2
Views
222
Replies
4
Views
1K
Replies
2
Views
1K
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
464
Replies
11
Views
986
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
  • General Math
Replies
11
Views
1K
  • Differential Equations
Replies
2
Views
965
Back
Top