# Questions tagged [recursion]

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

509 questions
Filter by
Sorted by
Tagged with
34 views

### Why does this memoized function cause the kernel to quit?

The following memoized recursive function causes the kernel to beep and quit. ...
31 views

### Using NIntegrate inside RecurrenceTable

I'm trying to solve self-consistent equations of the form ...
35 views

### RSolve not evaluating when given my system of recurrence equations

I am trying to solve the following system of recurrences with RSolve: ...
39 views

### Recursive Function with conditionals [duplicate]

Function: I am to solve for $T_{12}(4.8), T_{24}(1.2)$, using If and Which functions. I started with this function and keep getting a recursion limit error: ...
293 views

### Recursive function, if and which statements

I am given this question: Let a function $T_n(x)$ be defined by: $$T_{n+1}(x) = \frac{1}{x} T_{n-1}(x) - \frac{2}{7} T_n(x),$$ where $T_0(x) = 1, T_1(x) = x$. I need to construct a recursive ...
86 views

### Iterative process causing segmentation faults

Often in Mathematica, I program in some iterative process (say, some random walk) in order to find maxima. I usually write some hacky code involving iteration, and using the construction: ...
28 views

92 views

### Getting the coefficients of a series that solves a differential equations

I have an example from Stewart's Calculus where the equation $y'' + y = 0$ is solved using power series. The equation ...
141 views

### Sum with variable terms to sum over

Suppose I have a polynomial like this: $$a=x_{j_1} + x_{j_1}x_{j_2} + x_{j_1}x_{j_2}x_{j_3} + ...+x_{j_1}x_{j_2}x_{j_3}...x_{j_n}$$ I want to create a function that takes this polynomial and does the ...
34 views

### Constructing sequence of function with elements depending on the previous one / recursion

Starting from a function $\theta0[x\_ , y\_ , z\_ ]$, the terms $\varphi[x\_ , y\_ , z\_ ]$ constitutes a sequence of functions that is constructed as follows: Order 1 (one function and its ...
74 views

### Computing recursive sequence [duplicate]

I would like to compute a of the following recursive sequence a = 1; a[n_] := a[n - 1] + 1/a[n - 1]^2 but it takes a long time for computing even small ...
57 views

### Defining recursive non-linear recurrence relation

I have a non-linear recurrence relation: $$\epsilon_i = \sqrt{\frac{2}{1+\epsilon_{i-1}}}\epsilon_{i-1}$$ Here, $\epsilon_0\in[0,1]$, but it's really some function $f(n,p)$ for some other parameters. ...
42 views

### Trouble with RecurrenceTable using elements from a previously computed list

When I use RecurrenceTable to solve a recursion relations, I encounter a problem, which is perhaps simple, but I do not understand why it is complaining. Here is a ...
I define a series $dg(i)$ as the $i$th derivative of a function $g[t]$ for $i>0$ and known the first term $dg(1)=(t-x)g(t)$. In mathematica, the code is: ...