I have a recurrence relation defined as following:
RSolve[
{
p[0] == p0,
p[1] == λ p[0]/μ,
p[i + 1] == λ p[i]/(2 μ)
},
p[i], i
]
Note that the relation is differently for i=1
, than for i >= 1
. This yields the following error:
DSolve::bvnul: For some branches of the general solution, the given boundary conditions lead to an empty solution. >>
When I use Piecewise
, Mathematica just echos the input:
RSolve[
{
p[i + 1] ==
Piecewise[{
{p0, i == -1},
{λ p[i]/μ, i == 0},
{λ p[i]/(2 μ), i >= 1}}]
},
p[i], i
]
Also using If
or Condition
does not to work out.
Appreciate your help!
(Btw, this simple example can easily be solved by hand, but I would like to solve more complicated recursions involving piecewise definitions.)