Message Boards Message Boards

[✓] Define a range of values for this recurrent equation?

GROUPS:

Hello,

I want to plot the values for n from 0 to 100 for this recurrent equation:

g(0)=0.6 | g(n+1)=g(n)^3 * 4- 3 * g(n) 

How do I do it?

Thank you.

POSTED BY: Roald Baudoux
Answer
3 months ago

One way is with NestList:

f[x_] = 4 x^3 - 3 x;
values = NestList[f, .6, 100]
values // ListPlot
values // NumberLinePlot
POSTED BY: Gianluca Gorni
Answer
3 months ago

Thank you Gianluca, but how do you enter a request with multiple lines in Wolfram Alpha?

POSTED BY: Roald Baudoux
Answer
3 months ago

It's in fact only one line

NumberLinePlot[NestList[(4 #^3 - 3 #) &, .6, 100]]

or another single line

ListPlot[NestList[(4 #^3 - 3 #) &, .6, 100]]
POSTED BY: Dent de Lion
Answer
3 months ago

It works! Thanks a lot, guys!

POSTED BY: Roald Baudoux
Answer
3 months ago

Group Abstract Group Abstract