# Questions tagged [difference-equations]

Tag for the usage of RSolve, RecurrenceTable, DifferenceRoot, and other functions related to difference equations.

206 questions
Filter by
Sorted by
Tagged with
166 views

### Random Variable in Recurrence Function

Following the previously published question, I'm looking for the solution of RecurrenceTable with explicit random variable. For example, something like ...
202 views

### Finite Difference equations - slow computations

The following code I have written runs very slow, in fact, so slow that it does not finish computation. ...
194 views

### Solution to Simultaneous Arithmetic/Geometric Mean Recursion Relations

I'm trying to solve the simultaneous convergent sequences of geometric/arithmetic means where $a_{n+1}=\frac{1}{2}(a_n+b_n)$ and $b_{n+1}=\sqrt{a_nb_n}$ and initial values are $a_0=1+x$ and $b_0=1-x$. ...
279 views

### How to solve coupled complex-valued equations faster and get simplified solution

I have six coupled equations. How to solve these equations symbolically faster in Mathematica. In these equations, variables p,q,x,y are ...
367 views

### Why does Mathematica not evaluate the difference recurrence using RSolve or RecurrenceTable?

Mathematica does not evaluate the following recurrence of two variables using RSolve and only echoes the input: ...
91 views

...
125 views

### Permutations and recurrence equation

First problem: I need to show all Permutations with length 4 of this elements {x, y, z, w, t} but with this condition: the element z mustn't be after element t. I ...
2k views

### Discrete-time Lyapunov exponent plot

I am trying to create a Lyapunov exponent plot as a function of $\alpha$ for two functions: $$f(x) = (\alpha + 1)x - \alpha x^{3}$$ and a piecewise function given by following Mathematica code: <...
293 views

### RSolve with integrations

I want to solve this question with Mathematica. $$T_0(t)=c(t),\quad T_n(t)=a\int_0^t T_{n-1}(s)\, \mathrm{d}s+b(t).$$ Is it possible to solve $T_n(t)$ with RSolve?...
152 views

### Speeding up a differential equation system with nested modulo periodic events

I have the following differential equation system with periodic Events : ...
173 views

### Getting the first $n$ terms of a recursion relation

Given a recursion relation, I would like to generate the first $n$ terms (automatically) without having to go term by term. Background Each term is of the form $a_{n}(t)$, that is, $a_{n}$ is a ...
564 views

### Delay difference equation

How can I correctly specify and solve a system of delay difference equations in mathematica similar to NDSolve with regard to delay differential equations? For example if I want to "see" the values ...
239 views

### RSolve and a recurrence relation

In the book An Introduction to the Analysis of Algorithms there is a recurrence relation for the number of compares used in Quicksort algorithm: $$C_N=N+1+\sum_{0≤k≤N-1}\frac{1}{N}(C_k+C_{N−k−1})$$ (...
192 views

### How can I implement this recurrence equation in Mathematica?

I asked a similar question yesterday but today I realized that I was implementing the wrong function. I have tried changing the implementation but I can't get it to work. Problem: There is a river ...
391 views

373 views

### Can I generate a “piecewise” list from a list in a fast and elegant way?

Suppose we have a number list a: n = 1000000; a = RandomReal[{0, 1}, {n}]; We want to generate a list ...
184 views