For questions about defining recursive functions, recursive algorithms and solving recursive equations (e.g, with `RSolve`)
0
votes
2answers
168 views
Recursion on a moving window
I need to apply some computations to a moving window of $N$ items in a time series and I am struggling with doing recursion and shifting the considered window.
To illustrate, please consider the ...
4
votes
1answer
268 views
Solving recurrence relation using Mathematica defined in a piecewise way
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 ...
11
votes
2answers
601 views
How can I solve a difference-differential equation?
How do I ask Mathematica to try to solve a recursive relation that defines a sequence of functions? For example, suppose I know that $g_n(x) = g_{n-1}'(x)$ for $n > 0$ and that $g_0(x) = e^{2x}$. ...
0
votes
1answer
310 views
How to solve a problem in relative motion?
I have a project due tomorrow that I have been struggling with for a month. I am utterly stumped, any help would be appreciated. The problem is:
There is a ferris wheel, 30m in radius, set 80m ...
7
votes
1answer
194 views
Setting $RecursionLimit across all parallel kernels
I'm trying to optimize an elliptic curve factoring method by running it in parallel. There is a recursive step which required me to set the recursion limit higher than 256, however when I try and run ...
5
votes
3answers
442 views
recursive integration
I am trying to do multiple integrations recursively. For instance, I would like to do the following equation for arbitrary integer $n$:
$\displaystyle R_n(t) = \int_0^t \mathrm dt' R_0(t-t') ...
3
votes
1answer
155 views
Avoid crash in recursive Dynamic
With the following Dynamic cell, I can reproducibly crash Mathematica, so do not try this unless you have saved all your work!
...
1
vote
1answer
135 views
Differentiation w/o assiging concrete values
v = Subscript[v, 0]*Sin[(Pi*S)/Subscript[S, 0]];
a = dv/ds v;
a = D[v, s]
returns
...
30
votes
4answers
1k views
How can I implement dynamic programming for a function with more than one argument?
Dynamic programming is a technique for avoiding the repeated computation of the same values in a recursive program. Each value computed is immediately stored. If the value is needed again, it is ...