Questions tagged [difference-equations]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
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 ...
user avatar
0 votes
1 answer
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 ...
user avatar
  • 1
0 votes
0 answers
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 ...
user avatar
3 votes
1 answer
227 views

RSolve does not work as expected

Why am I getting error The arguments should be ordered consistently for the following code: ...
user avatar
2 votes
3 answers
515 views

How can I draw phase portrait of a matrix with given several initial points?

...
user avatar
1 vote
1 answer
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 ...
user avatar
  • 17.7k
8 votes
4 answers
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: ...
user avatar
  • 623
2 votes
4 answers
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: ...
user avatar
  • 53
0 votes
0 answers
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 ...
user avatar
0 votes
2 answers
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. ...
user avatar
  • 115
0 votes
0 answers
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 ...
user avatar
0 votes
0 answers
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}$ ...
user avatar
  • 608
2 votes
3 answers
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 ...
user avatar
  • 1,288
2 votes
1 answer
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 ...
user avatar
  • 1,973
0 votes
1 answer
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 ...
user avatar
  • 1,973
4 votes
1 answer
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 ...
user avatar
  • 143
1 vote
1 answer
374 views

Difference Equations

I am trying to input a difference equation in mathematica. The equation is $u_{x+1,y}+u_{x-1,y}+u_{x,y+1}+u_{x,y-1}+(\omega^2-4)u_{x,y}=\delta_{x,x0}\delta_{y,y0}$, where $u_{x,y}\in\mathbb{C}$,$(x,y)...
user avatar
3 votes
2 answers
89 views

How to eliminate variables when they are time-dependent?

i really hope you can help me with the following. I want to do something like this Eliminate[{y[t] == 5*x[t + 1], x[t] == 5*z[t]}, x[t]] to get ...
user avatar
3 votes
0 answers
180 views

Coupled parabolic differential equations with time delay

Is it possible for NDSolve to solve delay partial differential equations with simple Neumann boundary conditions? An example I have is as below: ...
user avatar
3 votes
2 answers
102 views

Make a RandomChoice inside a RecurrenceTable at each time of use, rather than once at time of definition

I recently watched the Numberphile video "Chaos Game" and I am trying to recreate the phenomenon discussed therein. The video depicts the following process: First, draw 3 points somewhere within the ...
user avatar
0 votes
1 answer
41 views

Solving for two functions defined recursively

How would I be able to find the equations for $f(x)$ and $g(x)$?
user avatar
3 votes
2 answers
971 views

Recursion with two variables

Consider the recursion formular $$ p_n(k) = (k+1) \,p_{n-1}(k)+(n-k)\,p_{n-1}(k-1)\qquad n\geq 3,$$ for $k=1,2,...,n-2$, with the conditions $$ p_n(0)=p_n(n-1)=1\qquad n\geq 2$$ How can I get ...
user avatar
0 votes
1 answer
105 views

Why doesn't this simple partial recurrence equation work in mathematica?

I have the following recurrence equation: ...
user avatar
  • 545
1 vote
4 answers
158 views

Limit of a recurrence series

I am beginner with Mathematica and I am trying to find the limit of a recurrence series. This is my series: u[n+1] = 1/2*(u[n] + a / u[n]) with ...
user avatar
7 votes
1 answer
256 views

Solution to differential difference equation

I'm interested in finding the general solution $f(x)$ of the equation: $(1+x)f'(x)+(f(x/2)-f(x))=-1$, $x\ge0$. Can Mathematica help here? For instance, it is easy to verify that the (slightly ...
user avatar
  • 725
7 votes
0 answers
385 views

How to solve this multivariate recurrence with Mathematica?

I would like to solve this recurrence relation: $a_{m,n}=a_{m-1,n}+a_{m,n-1}$ with $a_{0,0}=0, a_{m,0}=1, a_{0,n}=1$ for all $m\neq0$ and $n\neq0$ That's resembles the Tartaglia/Pascal's triangle, ...
user avatar
  • 193
2 votes
0 answers
562 views

Quasinormal modes with Mathematica

I want to compute the quasi-normal modes for the Kerr-AdS black hole, so basically after decoupling the angular and the radial equation, I have troubles to compute the separation constant and also the ...
user avatar
  • 21
0 votes
0 answers
110 views

Solving recurrence equation using RSolve

I'm trying to solve the following difference equation: $$ [k(k-1)+s]\,X_k+k\,X_{k-1}=s\,a^k,\;\;k=1,2,\ldots $$ assuming that $X_0=1$, and $a,s>0$. The obvious ...
user avatar
  • 725
6 votes
2 answers
373 views

Periodic Orbits of the MacKay Map

For the MacKay (Henon action-angle transformation) Map (Mackay 1983): $x_{n+1}=q-\alpha x_n-x_n^2-y_n \\ y_{n+1}=x_n$ with $q, \alpha \in \mathbb{R}$ real parameters I would like to calculate the ...
user avatar
  • 707
0 votes
1 answer
159 views

RSolve conditional recurrence expression

I have trouble in expressing condition recurrence in Mathematica. I have a conditional recurrence relational, that is conditioned on a function value (defined on sequence index). where $a_1, a_2, ...
user avatar
  • 111
4 votes
1 answer
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. ...
user avatar
  • 8,628
1 vote
1 answer
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 ...
user avatar
  • 13
2 votes
1 answer
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$ ...
user avatar
  • 713
1 vote
2 answers
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: ...
user avatar
  • 11
3 votes
0 answers
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: ...
user avatar
2 votes
1 answer
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! ...
user avatar
4 votes
1 answer
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. ...
user avatar
  • 63
1 vote
1 answer
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'. ...
user avatar
-1 votes
1 answer
167 views

first order pde [closed]

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

RecurrenceTable with vectors

Is there a way to call parts of a vector in RecurrenceTable? This does not work: ...
user avatar
  • 407
0 votes
0 answers
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 ...
user avatar
7 votes
1 answer
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 ...
user avatar
0 votes
0 answers
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: ...
user avatar
  • 101
7 votes
3 answers
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. ...
user avatar
  • 247
8 votes
1 answer
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 ...
user avatar
  • 17.7k
0 votes
1 answer
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: ...
user avatar
  • 8,628
1 vote
2 answers
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 ...
user avatar
13 votes
2 answers
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 ...
user avatar
  • 2,410
2 votes
1 answer
570 views

plotting and manipulate plot for logistic model (recursive function)

For a larger project on chaos, I am trying to write a short program that graphs the logistic model with different constant values, in this case the constant being "r". A) Is there a way to use Table ...
user avatar
3 votes
2 answers
638 views

How to simplify output of Series?

The command Series[Sum[Sum[1/(a*b), {b, a, 3 a}], {a, 1, N/Sqrt[3]}, Assumptions -> N > 0], {N, Infinity, 1}] produces a somewhat complicated answer <...
user avatar
  • 17.1k