# Tagged Questions

For questions about defining recursive functions, recursive algorithms and solving recursive equations.

34 views

### Modify code to avoid recursion limit warning [closed]

I programmed a recursive function and I want to see the evolution depending on the number of trials. I want to find the value of k for which the difference between $rec_i^k$ and $rec_i^{k+1}$ is equal ...
43 views

### Convergence of a recursive function

I am trying to study the convergence of a function that is defined by recursion. We want to find for which 'j' the difference between $g_i^j$ and $g_i^{j+1}$ is equal or smaller than $10^{-3}$ . ...
89 views

### Define recursive function over two indices

I have $x_i=(i-1)/50$ for $i=1,\ldots,51$. Given a function $f(x) = x^2$, I want to find $y_i^k$ given by \begin{eqnarray} y_i^1 &=& f(x_i) \\ y_i^{k+1} &=& \max\left[\frac{y_{i-1}^...
50 views

### Why doesn't RSolve work here? [closed]

RSolve[ {θ[n + 1] == θ[n] + 0.25*ϕ[n], ϕ[n + 1] == ϕ[n] - 2.5*Sin[θ[n]], θ[0] == π/2, ϕ[0] == 0}, {θ[n], ϕ[n]}, n] What's wrong with my code? I know ...
242 views

### Deleting any list that contains a negative number

We had another nice question in a student activity today. The increasing sequence of positive integers $a_1,a_2,a_3,\ldots$ has the property that $$a_{n+2}=a_n+a_{n+1} \text{ for all } n\ge 1.$$ ...
656 views

### How does one clear the memory of a recursive function

I want to implement the recursive function v[n_] := v[n] = v[n-1] + f[n-1] + Random[NormalDistribution[0,s]] to get ...
281 views

### Iterating a rational function

I'm reading about iterating rational functions. I'm given $$R(z)=\frac{3z-2}{2z-1},$$ then the author makes the statement: "Then(by induction), $$R^n(z)=\frac{(2n+1)z-2n}{2nz-(2n-1)}.$$ Is there a ...
43 views

### Why does this form of piecewise function cause a general stop message? [closed]

I am currently learning about Mathematica by reading the book Mathematica by Example, 4th Edition. In that book, a piecewise function was defined as follows: ...
88 views

### Assigning function values in a memoized recursive module

I have a complicated recursive module which I have memoized. I realised that certain isomorphs of inputs to this function will give the same output. Therefore I decided to memoize all such input-...
57 views

### FindLinearRecurrence is not working for numerical complex number sometimes?

First FindLinearRecurrence definitely support complex number list, see ...
244 views

124 views

### Recursive list contruction

I am attempting to implement the exercises from The Little Schemer in Mathematica, and running to a bit of a challenge with rember (remove member). Given a list and a value, the function just returns ...
79 views

### Fishing for monomials in a nested or partially factored polynomial stream

I have a problem where I'd like to be able to take a multivariate polynomial whose variables are nonscalar and is not written explicitly as a sum of it's nonzero monomial terms and determine which ...