0
$\begingroup$

I have the following recurrence equation:

L[t_, alpha_] := 
 Min[2*epsilon[t, alpha] - x[t, alpha], x[t, alpha - 1]]

epsilon[t_, alpha_] := alpha^2

d[t_] := 10

f = 10

RSolve[{x[t, alpha] == x[t - 1, alpha] + L[t - 1, alpha] - L[t - 1, alpha + 1], 
    x[0, alpha] == 0, 
    x[t, f] == x[t - 1, f] + L[t - 1, f] - d[t - 1]},
    x[t, alpha], {t, alpha}]

It simply outputs the code from RSolve[... onwards, without giving any errors.

I cannot figure out what I am doing wrong: I'm giving an initial condition:

x[0, alpha] == 0

and a boundary condition on alpha:

x[t, f] == x[t - 1, f] + L[t - 1, f] - d[t - 1]}

Why doesn't mathematica solve this?

$\endgroup$
4
  • 2
    $\begingroup$ "Why doesn't Mathematica solve this?" - possibly because the closed form (if it does have one) is not necessarily known to Mathematica. $\endgroup$ Apr 13, 2017 at 10:16
  • $\begingroup$ "partical"????? $\endgroup$ Apr 13, 2017 at 17:32
  • $\begingroup$ "partial"**, sorry. $\endgroup$
    – user56834
    Apr 14, 2017 at 8:36
  • $\begingroup$ I see. I did not know that RSolve necessarily calculated a closed form solution. That solves it. $\endgroup$
    – user56834
    Apr 14, 2017 at 8:37

1 Answer 1

2
$\begingroup$

if you just want values you don't need RSolve

epsilon[t_, alpha_] = alpha^2
L[t_, alpha_] := 
 Min[2*epsilon[t, alpha] - x[t, alpha], x[t, alpha - 1]]
f = 10
x[0, alpha_] = 0
d[t_] = 10
x[t_, f] := x[t - 1, f] + L[t - 1, f] - d[t - 1]
x[t_, alpha_] := 
 x[t - 1, alpha] + L[t - 1, alpha] - L[t - 1, alpha + 1]
Table[ x[t, a] , {t, 0, 5}, {a, 15}] // MatrixForm

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.