RecurrenceTable of a piecewise recurrence function

How to can I get RecurrenceTable to deal with a piecewise function?

For example,

$$\qquad x_{n+1}= x_n(1.5-0.5x_n)\qquad \text{if x_n\ge0.5}\\ \qquad x_{n+1}= x_n(0.5+0.5x_n)\qquad \text{if x_n<0,5}\\ \qquad x_0=0.2$$

• Welcome to Mathematica SE. I have the impression that there's something wrong in your equations, please check them. As they are, they do not define a recursion. – Roman Apr 29 at 16:57
• I asked that meaning: we may write that x[n+1]=x[n](1,5-0,5x[n]) if x[n]>=0,5; x[n+1]=x[n](0,5+0,5x[n]) if x[n]<0,5, x==0.2 – Javohir Usmonov Apr 29 at 17:01
• Just edit your question to reflect what you just wrote. – Roman Apr 29 at 17:06
• All values $x(n)$ are less that 0.5 in your example, so the case distinction is not necessary. – Roman Apr 29 at 17:15

This answer is similar to @Roman's, but uses a simpler version of Piecewise and is set for easy variation of both x and max.

With[{x1 = .75, nmax = 8},
RecurrenceTable[
{x[n + 1] == Piecewise[{{x[n] (1 - x[n])/2, x[n] < 1/2}}, x[n] (3 - x[n])/2],
x == x1},
x, {n, nmax}]]

{0.75, 0.84375, 0.909668, 0.950754, 0.974164, 0.986748, 0.993286, 0.996621}

• Thank you a lot – Javohir Usmonov Apr 30 at 7:36
RecurrenceTable[{x == 0.2,
x[n + 1] == Piecewise[{{x[n] (3/2 - 1/2 x[n]), x[n] >= 1/2},
{x[n] (1/2 + 1/2 x[n]), x[n] < 1/2}}]},
x[n], {n, 0, 10}]

{0.2, 0.12, 0.0672, 0.0358579, 0.0185719, 0.00945838, 0.00477392, 0.00239836, 0.00120205, 0.00060175, 0.000301056}