Math Help - Difference equation

1. Difference equation

Solve the difference equation:
$p_n = p(1-p_{n-1})+(1-p)p_{n-1}$
Any help would be greatly appreciated.
Thanks

2. Originally Posted by tbyou87
Solve the difference equation:
$p_n = p(1-p_{n-1})+(1-p)p_{n-1}$
Any help would be greatly appreciated.
Thanks
p is just a constant? Please let me change to a = p, just so there is less chance of confusion.
$p_n = a(1 -p_{n - 1}) + (1 - a)p_{n - 1}$

$p_n = a + (1 - 2a)p_{n - 1}$

$p_n + (2a - 1)p_{n - 1} = a$

So we also know that
$p_{n + 1} + (2a - 1)p_n = a$

So
$p_{n + 1} + (2a - 1)p_n = a = p_n + (2a - 1)p_{n - 1}$

or
$p_{n + 1} + (2a - 2)p_n + (1 - 2a)p_{n - 1} = 0$

This is now a homogeneous linear difference equation. Can you solve it from here?

-Dan