Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Mathematica help for Newton's Method input - Fixed point iteration?

I am attempting to code a fixed point iteration problem in Mathematica and having a whole lot of trouble. I can do the problem on paper no issues, but am very new to Mathematica. I am repeatedly getting a recursion exceeded error. Would appreciate help from anyone versed in Numerical Methods and Mathematica.

Use Theorem 2.3 to show that g(x) = 2^-x has a unique fixed point on [1/3,1]. Use fixed point iteration to find an approximation to the fixed point accurate to within 10^-4. Use Corollary 2.5 to estimate the number of iterations required to achieve 10^-4 accuracy, and compare this theoretical estimate to the number actually needed. Initial guess Subscript[p, 0]=2/3

well the formatting on copy paste is awful. Where can I put this so others can see it the way it's meant to be displayed?

Theorem 2.3:

(i) If g \[Epsilon] C[a,b] and g(x) \[Epsilon] [a,b], then g has at least one fixed point in [a,b].

(ii) If, in addition, g'(x) exists on (a,b) and a postive constant k<1 exists with |g'(x) <=k, for all x \[Epsilon] (a,b), then there is exactly one fixed point in [a,b].

Corollary 2.5: If g satisfies the hypotheses of Theorem 2.4, then bounds for the error involved in using Subscript[p, n] to approximate p are given by: |Subscript[p, n]-p| <= k^n max {Subscript[p, 0] - a, b - Subscript[p, 0]} and |Subscript[p, n]-p| <= k^n/(1 - k)|Subscript[p, 1]-Subscript[p, 0]|, for all n>=1

g[x_] := 2^-x

\!\(TraditionalForm\`

\*SubscriptBox[\(p\), \(0\)] :=

\*FractionBox[\(2\), \(3\)]\)

n := 0

data = Table[{n, Subscript[p, n]}, {n, 0, 1}]

TableForm[data, TableHeadings -> {{"Fixed Point Iteration"}, {"n", "\!\(\*SubscriptBox[\(p\), \(n\)]\)"}}, TableSpacing -> {3, 5}]

2 Answers

Relevance
  • bob
    Lv 4
    8 years ago
    Favorite Answer

    As you have said, the formatting is making it difficult to understand what you are trying to do. If you were able to simply explain in words that anyone with adequate mathematical background would understand then you are more likely to get your question understood than if you spend your time trying to figure out why the software won't format something the way you think it should.

    I would urge you to try to avoid "desktop publishing" your Mathematica code. Yes, it is sometimes possible to use the thousands of buttons and knobs to make your Mathematica input resemble something like you see published in a book, but doing this will almost certainly make your life much more difficult. Throw out the subscripts, throw out the TraditionalForm, Go with simple and you are much more likely to succeed.

    Here is a very simple example. I don't think this answers the question you were asked, but maybe it will give you a hint.

    g[x_] := N[2^-x, 40];

    NestList[g, 1, 40]

    Evaluate that and see what you get.

    If that isn't enough then perhaps you could clearly and simply explain your manual process and what of that you want translated into Mathematica.

  • ?
    Lv 4
    4 years ago

    Mathematica Iteration

Still have questions? Get your answers by asking now.