# Questions tagged [difference-equations]

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

299 questions
Filter by
Sorted by
Tagged with
219 views

### Why does this partial differential solution not work?

Here I am trying to solve a simple partial differential equation i.e. $\frac{\partial^2f}{\partial x^2}+\frac{\partial^2f}{\partial y^2}=6y$ but for some reason it won't solve it. There clearly is a ...
193 views

### periodic point of a quadratic map

I am analyzing a discrete dynamic quadratic map. The bifurcation diagram shows the existence of an asymptotic 3- cycle periodic point for a given parameter. But the graphic of the lyapunov exponent ...
60 views

### how to To specify initial conditions for a system of ode?

I have the following system of ode: a = {{-3, 1}, {-1, -5}}; eqns = Thread[{y1'[x], y2'[x]} == a.{y1[x], y2[x]} + {1, 1}]; I solved the general solution for a system of ode. However, I cannot ...
• 23
227 views

### RSolve does not work as expected

Why am I getting error The arguments should be ordered consistently for the following code: ...
515 views

...
1 vote
85 views

### WhenEvent for RecurrenceTable

RecurrenceTable is like NDSolve for difference equations, but lacks a lot of its bells and whistles. One thing I'd like to use ...
• 17.7k
204 views

### Implementing delay in NestList?

The traditional iterated map can be implemented with NestList, such as the Logistic Map, x[n+1]=rxn, can be implemented with the single line: ...
• 623
262 views

### Generate a random Fibonacci sequence

I want to generate the random sequence defined by $a_n = a_{n-2} + \beta(n)a_{n-1}$ where $\beta$ takes the values $\pm1$. My attempt is: ...
• 53
242 views

### Solving the matrix recurrence in Mathematica

Given matrices, $D, A, B$ --> I have the following recursive relation: $$D_k = A - B^T D^{-1}_{k-1} B , \quad \ k \in \mathbb{N}_+$$ with $D_1 = A_1$. Can a solution $D_k$ to this equation be ...
• 111
79 views

### Printing a Solved Recurrence at Arbitrary Values

The code below solves the recurrence $$a_{n+1} = a_{n}d - a_{n-1} + 2 - d$$ where $a_{0} = d^2$ and $a_{1} = d^3 - 2d + 1$. The recurrence is solved as I expect it to be solved. ...
• 115
42 views

### Handling recurrence relations

Are there special features in Mathematica for probing a recurrence relation? (dummy example: $f(x) = \prod_{i=1}^N f(x-i)$) Such as, potential simplification, finding base cases, or a visualisation ...
128 views

### set of recursive equations with derivatives

I have the following set of recursive relations $c_{r,q+1}=\frac{\left(2z\partial_{z}+r+1\right)c_{r+1,q}}{d+r+q}$ and $zc_{r+2,q}=\frac{\left(q+r+d\right)c_{r+1,q}+\left(r+1\right)c_{r,q}}{d+r+q}$ ...
• 608
143 views

### How can I implement the binomial transform?

How do I implement the binomial transform? I've tried defining a matrix P = Table[(-1)^k Binomial[n, k], {n, 0, m}, {k, 0, m}] and having this act on my ...
• 1,288
148 views

### Solve functional equations which is not exactly recursive

I have the following type of equation : ff[a, b] == alpha[a, b]*ff[0, b] + beta[a, b]*ff[a, 0]+C[a,b] Alpha, beta and C are functions of a and b that I assume ...
• 1,973
201 views

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

I am trying to use RSOLVE but it doesn't work on very simple examples. My real problem is a little long to explain, but I tried to use RSOLVE on simple case to "test" it and understand how it works ...
• 1,973
1k views

### Using RSolve to solve a recurrence relation

I am attempting to solve this recurrence relation. T[n] = n^(1.5) + T[n - 4] which I believe simplifies to n^(2.5) I ...
• 143
1 vote
374 views

• 111
434 views

### Finding Hofstadter's Q-Sequence very slow

I'm trying to find Hofstadter's Q-Sequence. I tried: RSolve[{Q[n] == Q[n - Q[n - 1]] + Q[n - Q[n - 2]], Q[1] == 1, Q[2] == 1}, Q[n], n] but it doesn't work. ...
• 8,628
1 vote
426 views

### Plotting system of recursive sequences [duplicate]

If I have a system of recursive sequences like x[n+1]=2x[n]+5(y[n])^2 y[n+1]=.5x[n]-3(y[n])^2 How can I plot it as a curves ...
• 13
240 views

### Improving my method for solving iterative algebraic equations

So I wish to solve the following $i$ equations for $\eta_i$ $$p(x)+\rho_i z_i + \frac{(u_id)^2}{2(\eta_{i-1}(x)-\eta_i(x))^2}+\rho_i \eta_i(x) = B_i$$ where we have the following definitions and $x$ ...
• 713
1 vote
773 views

### Solving recurrent function with 2 variables

My understanding of Mathematica is very limited since I just started using it, I would appreciate any feed back or help. I am trying to find the closed form of a recurrent function with 2 variables: ...
• 11
183 views

### Is RSolve capable of solving the following functional equation? [closed]

I would like to use RSolve (or some other method) to solve the following functional equation: ...
95 views

### Simple linear 2nd order difference equation

I'm trying to run the following code. Unfortunately, there's a mistake in it, which I can't find. Can anyone of you help me? I guess it's very simple. Thanks so much in adavance! ...
• 21
145 views

### Problem with using RSolve to solve recurrence equations

Whenever I run the my code, the output of Mathematica is only a copy of the input again. ...
• 63
1 vote
164 views

### How can MovingAverage be used for the solution of nd solve?

The code I used is as below but it doesn't work. Is there anyone who could understand and solve the problem? I want to plot d instead of s.Also, How can I fit a linear function to the d'. ...
167 views

### first order pde [closed]

I wrote below code to solve a first order partial differential equation and find $p(k,t)$ ...
105 views

### RecurrenceTable with vectors

Is there a way to call parts of a vector in RecurrenceTable? This does not work: ...
• 407
61 views

### What is the natural sequence of commands to apply RSolve to a DifferenceRoot[Function? [duplicate]

I am generating some DifferenceRoot[Functions, but to apply RSolve to them, I'm just doing some cutting and pasting from the ...
• 2,235
155 views

### Are there different Method options that can be used with FindSequenceFunction?

The help page states that Method is an option to use with FindSequenceFunction, but I don't find any further information. (There ...
• 2,235
126 views

### How can I express chains of filters using recurrence relations?

Here's example of what I would typically do in Python to play around with system of custom filters: ...
• 101
556 views

### How do I recursively calculate this equation and generate a list of iteration?

How do I write a recursive equation to compute a list of answers? I tried NestList, but it didn't work. ...
• 247
125 views

### Weird RecurrenceTable bug

Bug introduced in 10.0 or earlier and persisting through 12.2 or later The output of RecurrenceTable seems to lose a level when there are more than 250 points and ...
• 17.7k
297 views

### Solving a nonlinear recurrence equation

How to solve the following nonlinear recurrence equation using RSolve? $$a(n+1):=\frac{1-(1-a(n)^4)^{1/4}}{1+(1-a(n)^4)^{1/4}} , \quad a(0):=\sqrt{2}-1$$ I tried: ...
• 8,628
1 vote
87 views

### Equivalent different-order difference equations--implications, if any?

I have a sequence of rational values. If I apply the FindSequenceFunction command to the first 48 (but no fewer) I get the result ...
• 2,235
414 views

### RecurrenceTable iteration variable not localized? Bug or user error?

I recently lost a lot of time on this and need to understand whether I have misunderstood MMA operations or there's a problem. I am using MMA 10.1 on Windows 7 64-bit. The essence of the issue is ...
• 2,410