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
4
votes
1answer
851 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 ...
1
vote
1answer
284 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)...
3
votes
2answers
88 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 ...
3
votes
0answers
145 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: ...
3
votes
2answers
80 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 ...
0
votes
1answer
41 views

Solving for two functions defined recursively

How would I be able to find the equations for $f(x)$ and $g(x)$?
3
votes
2answers
666 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 ...
0
votes
1answer
89 views

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

I have the following recurrence equation: ...
1
vote
4answers
132 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 ...
7
votes
1answer
225 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 ...
7
votes
0answers
272 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, ...
2
votes
0answers
401 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 ...
0
votes
0answers
106 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 ...
5
votes
2answers
307 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 ...
-1
votes
1answer
128 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, ...
4
votes
1answer
423 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. ...
1
vote
1answer
318 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 ...
2
votes
1answer
179 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$ ...
1
vote
2answers
567 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: ...
3
votes
0answers
181 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: ...
2
votes
1answer
86 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! ...
4
votes
1answer
125 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. ...
1
vote
1answer
114 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'. ...
-1
votes
1answer
150 views

first order pde [closed]

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

RecurrenceTable with vectors

Is there a way to call parts of a vector in RecurrenceTable? This does not work: ...
0
votes
0answers
51 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 ...
6
votes
1answer
116 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 ...
0
votes
0answers
114 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: ...
7
votes
3answers
507 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. ...
4
votes
1answer
82 views

Weird RecurrenceTable bug

The output of RecurrenceTable seems to lose a level when there are more than 250 points and one variable. Easiest to explain with an example: Good: ...
0
votes
1answer
237 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: ...
1
vote
2answers
85 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 ...
13
votes
2answers
347 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
votes
1answer
451 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 ...
3
votes
2answers
558 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 <...
3
votes
2answers
402 views

Solving a system of recurrence relations using Mathematica

Can Mathematica solve (for b[k] and c[r]) the following system of recurrence relations? b[k] ...
3
votes
1answer
269 views

Find RSolve solution reflecting special structure of DifferenceRoot[Function[{\[FormalY], \[FormalN]}

RSolve yields a large (multi-page) solution (LeafCount=25891) containing a number of 7F6 (and higher) hypergeometric functions when applied to ...
1
vote
1answer
444 views

Can I simplify (solve) a certain DifferenceRoot expression?

I've generated this expression ...
3
votes
1answer
103 views

How to replace the symbol n in DifferenceRoot

I'd like to employ another symbol (say alpha or k) instead of n in the following (type of) ...
7
votes
1answer
203 views

Incorrect answer given by RSolve

Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later Also posted in Wolfram Community. I tried to solve the following nonlinear recurrence relation using ...
0
votes
2answers
320 views

Sampling a continuous function to create sequence of discrete values

My question is straightforward: How do I convert a continuous function into a discrete-valued function? The function I want to convert is the JacobiAmplitude function: ...
0
votes
1answer
99 views

solving a non linear (log-linear) recurrence relation

I'd like to solve the recurrence relation $$\begin{align*} f(n+1) &= 2 f(n)^2 h(n) \\ h(n+1) &= h(n) f(n) \\ f(2) & = h(2) = 2 \end{align*}$$ for an explicit solution for $h$ and $f$. So ...
14
votes
2answers
1k views

Finite difference method not converging to correct steady state or conserving area?

I am working with the following PDE, which is an advection-diffusion type equation. It describes the movement of a fluid-fluid interface inside an annulus of inner radius $R_1$ and outer $R_2$ under ...
3
votes
0answers
287 views

Lyapunov Exponent as a function of parameter

I am working at Rossler system and I would like to ask you for some help. This system is described by equations: \begin{array}{ll} \dot{x} = -y - z \\ \dot{y} = x + 0.2y \\ \label{eq:UkladRosSP} \dot{...
4
votes
4answers
639 views

Solving Recurrence Equation $a_{n+1}=a_n(1-a_n)$

How to solve following recurrence equation $$a_0=2$$ $$a_{n+1}=a_n(1-a_n)$$ I tried: ...
1
vote
0answers
99 views

Solving recurrence equation depending on a parameter

I have a recurrence relation which depends on a parameter $t$ and I am trying to solve it using RSolve. This is what I typed: ...
1
vote
2answers
338 views

Dynamical system problem x(t+1) = Ax(t)

I have a problem that have been trying to solve but it's not going so good. I would like some guidelines on how to work myself around this problem: Two neighboring countries spy on each other and ...
13
votes
3answers
414 views

Archimedes' Scheme to find $\pi$

Given an Archimedes' scheme $$a_{n+1}=\frac{2a_nb_n}{a_n+b_n}$$ $$b_{n+1}=\sqrt{a_{n+1}b_n}$$ with initial values $a_0=2\sqrt{3},b_0=3.$ How do I prove using Mathematica that this converges to $\...
4
votes
2answers
2k views

Plotting logistic maps

I have a question about plotting in Mathematica in general, and this particular recurrence relation as an example: $\qquad x _{n+1} = rx_{n}(1-x_{n})$ How can I plot the following plots as shown ...
1
vote
1answer
97 views

System of polynomial equations with Solve does not converge

The Exp-method [1] is an analytical solution method for differential equations. Essentially, the method boils down to the solution of a system of nonlinear polynomial algebraic equations. In [1] (and ...