Solving an equation by iteration

Hi!

I need to solve an equation for a course for psychology, but since I am studying psychology maths is not really my thing...

The equation I need to solve is:

xt+1 = f(xt) = axt(1-2xt)

The docent provide an example in the lecture (a logistic map equation with iteration, needed for understanding complex dynamic behaviour) but I don't get the steps in between and this is a bit too complex for me :) This was his example:

Yi+1= rYi(1–Yi)

i=0 Y0->Y1= rY0(1–Y0)

i=1 Y1->Y2= rY1(1–Y1)

= r2Y0= r rY0(1–Y0) (1–rY0(1–Y0) )

= –r3Y04+2r3Y03–r2(1+r)Y02+r2Y0

Can someone help me (also writing the steps I need to solve the equation)

I would be far mooore than thankful!

Best!

A desperate student from the Netherlands :)