Message Boards Message Boards

Ploting two recurrence in the same figure

Posted 2 days ago

Hi everyone!

I'm new to the Wolfram Forum community and it is a pleasure to be here.

I have a question for those who have expertise in the use of Mathematica. If I have this two difference equations: $$x_{n+1}=\frac{x_{n-1}}{2+x_{n}}, x_{0}=1,x_{-1}=1,\ n=0,1,...,$$ and $$x_{n+1}=\frac{1.2x_{n}}{1+x_{n-1}}x_{0}=1,x_{-1}=1,\ n=0,1,...$$ Can I plot these two equations in the same figure?

POSTED BY: Raafat Abo-Zeid
2 Replies
Posted 2 days ago

Please check this very carefully before you even think of trusting this, make certain that I have not made any mistake in this. If I have made a mistake then perhaps you can guess what my thinking was and be able to correct this.

x[0]=1;x[1]=1;x[n_]:=x[n-2]/(2+x[n-1]);xtbl=Table[x[n],{n,0,10}]
y[0]=1;y[1]=1;y[n_]:=6/5 y[n-1]/(1+y[n-2]);ytbl=Table[y[n],{n,0,10}]
ListPlot[{xtbl,ytbl}]

Since the first two points of the two sequences are the same, the color of one of the dots will lay over the other dot for those, but the points are distinct for the rest of the sequences and thus the points will be separate.

POSTED BY: Bill Nelson

Thank you very much!

POSTED BY: Raafat Abo-Zeid
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract