You ought to set up functions that are indexed by i
, not just looped through and reusing the same names. Why use θi
when you could use θ[i]
?
α=0.2;β=0.1;
For[i = 1, i < 10, i++,
θ[i][j_] := θ[i][j] = θ[i][j - 1] + β*p[i][j - 1];
p[i][j_] := p[i][j] = p[i][j - 1] - α*Sin[θ[i][j - 1] + β*p[i][j - 1]];
θ[i][0] = Pi/4+i/10;
p[i][0] = 0.8-i/10;
graph[i] = ListPlot[
Table[{θ[i][j], p[i][j]}, {j, 0, 100}],
PlotStyle -> RGBColor[{1 - i/10, i/15, i/10}]
]
]
All I did was make every instance of i
in a variable name into a parameter [i]
. Also watch out! You have a semicolon after i++
when you should have a comma. And the important plot option, color, is here, while the axes labels are relegated to the Show
command (below).
If you want these to vary with α and β, I suggest you also include them as arguments, e.g. θ[i][α_,β_,j_]
or similar.
I don't want to change your code too much, so I mostly just replaced i
with [i]
. However, you could also avoid the use of a loop entirely (if you're really interested, comment and I can follow up) because now you are just defining ten separate functions.
Anyway, after that, all you need is:
Show[Table[graph[i], {i, 1, 9}],
AxesLabel -> {"θ(j)", "p(j)"}, PlotRange -> All
]

I added the color options so that you can see which is which. With these parameter values they look like ellipses. I also started by setting values for your parameters. If they are not numerical, you can't plot them, so I went ahead and assumed you have them. Note that in addition to not giving you an actual graph, if α and β are symbolic, the recursion becomes a symbolic nightmare computing a table of 100 recursions of some symbolic expression.
Module
for such things - take a look at the docs, there are many examples. – Yves Klett 21 hours agoth[i_][j_] := th[i][j] = th[i][j - 1] + \[Beta] p[i][j - 1]; p[i_][j_] := p[i][j] = th[i][j - 1] - \[Alpha] Sin[th[i][j - 1]] + \[Beta] p[i][j - 1]; th[i_][0] := Pi/4 + i/10; p[i_][0] := .8 - i/10; \[Alpha] = \[Beta] = .01;
– Kuba 21 hours ago