Mathematica - Showing iterations graphically

  • Context: Mathematica 
  • Thread starter Thread starter nothingbetter
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on visualizing iterations of the function $x_{n+1}=\sin(x_n)$ using Mathematica. The user aims to graph the functions $y=\sin(x)$ and $y=x$, and illustrate the iterative process by drawing lines between these graphs. A sample code snippet provided is y = NestList[Sin, 1, 6]; x = Range[7]; points = Transpose[{x, y}]; ListPlot[points], which generates the points for plotting. The user is directed to utilize the Line function in Mathematica to create the necessary horizontal and vertical segments.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of iterative functions and their graphical representation
  • Basic knowledge of plotting functions in Mathematica
  • Experience with LaTeX for mathematical notation (optional)
NEXT STEPS
  • Explore the Mathematica Line function for creating graphical line segments
  • Learn about NestList in Mathematica for generating iterative sequences
  • Research techniques for plotting multiple functions in Mathematica
  • Investigate graphical annotations in Mathematica to enhance visual clarity
USEFUL FOR

This discussion is beneficial for Mathematica users, educators demonstrating iterative functions, and anyone interested in graphical representations of mathematical concepts.

nothingbetter
Messages
5
Reaction score
0
I'm trying to do this:

Suppose I have some iterative function $x_{n+1}=\sin(x_n)$. I want to demonstrate an iteration on a plot by graphing $y=\sin(x)$ and $y=x$, then drawing lines from the graph of x to the graph of sin x, like in this page:

http://demonstrations.wolfram.com/IteratingLinearFunctions/

I would try to google or check the documentation to do this, but I have no idea on what keywords to use, nor do I have any clue on where to begin.

Thanks!

[I also don't know how to get LaTeX to work in this forum. Sorry!]
 
Physics news on Phys.org
y = NestList[Sin, 1, 6]; x = Range[7]; points = Transpose[{x, y}]; ListPlot[points]

might get you started.

From that you need to use the contents of points to generate the horizontal and vertical line segments shown in that demonstration. This
http://reference.wolfram.com/mathematica/ref/Line.html
will give you an idea what result you need to generate from your points.
 
Last edited:

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K