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
2 votes
3 answers
201 views

Solution of a recurrence relation

I want to solve $a_{n+1} = (1 + \alpha) a_n + \gamma$, where $\alpha$ and $\gamma$ are some constants. Wolfram alpha returns: $a_n = \frac{\gamma ((1+\alpha)^n-1)}{\alpha} + c (1+\alpha)^{n-1}$. Any ...
user avatar
1 vote
1 answer
90 views

Plot of a recursive expression having a parameter

I have a recursive expression defined as $$ h_u= (1-a)(1-b) h_{u-1} + \sum_{k=2}^{u-1} (1-a) b h_{u-1-k} - \sum_{k=2}^{u} h_{u-k} - \sum_{k=1}^{u+1} \Lambda_{u,k} $$ where $\Lambda_{u,k} = \sum_{m=u-k+...
  • 53
0 votes
1 answer
59 views

RecurrenceTable two difference equations

I have tried to use RecurrenceTable to Solve a system of two differential equations. I look for having a sequence of the two variables n (population growth factor) and w (wages). I have provided ...
2 votes
1 answer
89 views

Solving logarithmic 2D Nonlinear GPE Equation

I am trying to solve the logarithmic 2D Nonlinear GPE Equation from this paper https://arxiv.org/pdf/1801.10274.pdf. But failed to get the ground state solution and vortices. I tried to solve in ...
7 votes
1 answer
129 views

RSolve returns a wrong result, why?

I'm trying to solve the following recurrence relation: $ \begin{cases} u_{0} = a \\ u_{n + 1} = - \sum_{i = 0}^{n} u_{i} u_{n - i} \end{cases} $ Here is my Mathematica code: ...
  • 73
2 votes
1 answer
142 views

Stability classification code for dynamic system

I'm interested in carrying out stability analysis on discrete dynamic systems, as was done in this paper. The Author used their function ...
1 vote
0 answers
40 views

Progress Indication for RecurrenceTable

I am trying to figure out how to implement progress indicator in RecurrenceTable. I have a complicated code within the With function that contains recurrence table. A simple code will suffice say, <...
  • 863
3 votes
1 answer
83 views

problem in plotting phase portrait t for nonlinear system of difference equation

I have tried to do a code about phase portrait plot for this system of difference equation: \begin{align} x_{t+1} &= ax_{t}^2+y_t+1 \\ y_{t+1} &= bx_t^2-1 \end{align} I took 'a=0.5','b=2' but ...
1 vote
1 answer
50 views

RecurrenceTable with multiple vectors

I am trying to do numerical calculations by recursion with vectors. I wrote a test code with single variable using 2 ODE's as shown below, ...
  • 863
2 votes
1 answer
74 views

Implement recursion one step at a time with a function of more than one variable

i am trying to implement a recursive difference equation step by step, by implementing rules, similar to Rojo's method in this thread: How can I evaluate only a single step of a recursive function? ...
  • 23
0 votes
0 answers
49 views

RSolve[] gives error RSolve::litarg when solving demo equations from the official documentation

The official documentation of RSolve[] (specifically, in the fifth paragraph of the seciton "Details and Options") states that: The specification a∈Vectors[m] or a∈Matrices[{m,p}] can be ...
  • 443
1 vote
0 answers
65 views

Solving a 2D recurrence diagonal-by-diagonal

I have a 3D recurrence relation -- which I know can be hard for Mathematica to work with, so I boiled it down to 2D. We have two functions, $f_1(i,j)$, $f_2(i,j)$ defined on the state space $\{(i,j) | ...
  • 251
1 vote
1 answer
86 views

Recurrence relation for B-spline polynomials

I am trying to get the explicit polynomials of cardinal B-splines. So far I have this implementation (for cardial B-splines of degree 3 on the knots 0, 1, 2, 3): ...
1 vote
1 answer
80 views

RSolve with integer and boolean variable

I have a recurrence relation with two variables $i, b$ where $i \in \{0, \ldots, n-1\}$ for some parameter $n \in \mathbb{N}$; and $b\in \{0,1\}$. I tried to solve it using RSolve, but the function ...
  • 251
0 votes
1 answer
88 views

RSolve two variables with multiple boundary conditions

In short, I want to solve a recurrence equation in two variables with multiple boundary conditions. In more detail: For instance, suppose I want to compute $a[0,j]= 1 \quad \forall j$ $a[i,0]= 1 \quad ...
  • 251
2 votes
2 answers
164 views

RSolve with two boundary conditions

I want to solve a recurrence equation that has boundary conditions on both sides: $a[0]= 1$ $a[n]= 10$ $a[i] = a[i-1]-a[i+1]\quad \forall i \in \{1, \ldots, n-1\}$ This should be a well defined ...
  • 251
3 votes
2 answers
60 views

Need help formatting `DifferenceRoot` for LaTeX

I want to put this into LaTeX format. What do I do? (FindSequenceFunction[Join[{5, 3, 3, 2}, Table[2, {80}]], k + 1] + n - 1) -1 + n + DifferenceRoot[Function[{[FormalY], [FormalN]}, {16 - 8 [...
1 vote
1 answer
185 views

How to plot the "trapping region" in Henon Map?

I am writing a paper that makes use of the Henon map. I have managed to plot the Henon map but now require plotting the "trapping region" shown in the image. Do I require to plot it as a ...
2 votes
2 answers
86 views

Inverse of an Animation

I was thinking, it's possible to plot inverse an animation?? ...
3 votes
1 answer
79 views

Difference between NDSolve and RecurrenceTable

I have the following system which I model as difference equations and solve with RecurrenceTable: ...
  • 2,723
3 votes
1 answer
75 views

Replace previous equations into the current one in a recurrence relation

I have a recurrence relation given as follows: f[k + 1] == 1/a[k, k + 1] Sum[a[k, k - k1] f[k - k1], {k1,0,k-1}] Evaluating it for ...
2 votes
1 answer
106 views

How to reproduce Asymptotic Bounds of Recurrences in Wolframalpha

In Wolframalpha's Examples for Recurrences, there are bunch of Asymptotic Bounds of Recurrences examples, like this It can get perfect result: ...
1 vote
1 answer
102 views

RSolve unable to solve the equation

I gave the following code as input: RSolve[x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[n], n] Mathematica gave the same output: ...
0 votes
0 answers
49 views

Equal equations or Expressions

I would like to check if equation (Sigmaa22) is the same as equation (stress) Basically i have 2 equations one is called Sigmaa 22 and the other one is called stress,My problem when i try to check if ...
  • 37
0 votes
1 answer
107 views

Recurrence Table for a specific Recurrence

I wanted to know how can one find an arbitrary number of terms of the non-linear recurrence (using software, like maple)such as $$a_{2n-1}=-\sum_{j=1}^{n}{n+j-1\choose 2j-2}a_{n+j-2}, \ a_{0}=-1$$ $$...
0 votes
1 answer
112 views

Mathematica stuck on partial derivative calculation

I was experimenting polynomial gradient descent on Mathematica, but it got stuck on partial derivative calculation. Formula below: Traditional Form: $$ mse = \frac{\sum_{i=1}^{n}\left(y[[i]] - \left(a\...
3 votes
2 answers
210 views

Numerical solution of the 2D-spatial nonlinear Allen equation

I would like to solve the 2D-spatial Allen equation in rectangular coordinate, which is a nonlinear reaction-diffusion PDE of the type $$\partial_{t}u=\epsilon(\partial_{xx}+\partial_{yy})u + u - u^{3}...
  • 1,120
0 votes
0 answers
96 views

How to Solve this recurrence relation?

When I use RSolve[] [![enter image description here][1]][1] It would show this. I want to solve it to a[n], the function of n & E How to do that? The original ...
  • 23
0 votes
0 answers
44 views

Introducing FindRoot in a ReccurrenceTable but problem with the starting point

I would like to introducing FindRoot in a RecurrenceTable, that uses the previous result as a starting point. My equations are defined as following: ...
  • 1,235
0 votes
0 answers
87 views

Different solutions for an equation

I have a problem with Mathematica, When I solve this equation in Mathematica and also in wolframalpha I have different solutions [[1] ...
  • 105
2 votes
1 answer
94 views

How do I make a second order differential equation match a difference equation?

I have fitted a difference equation to some data and would now like to find a differential equation that matches the difference equation. The difference equation and differential equation are $$ y(n)=...
  • 14.8k
3 votes
1 answer
127 views

How to use Manipulate with ListLinePlot

I'd like to run Manipulate with 0<r<=4 that preserves the ListLinePlot of the recurrence table given with the colors shown. I'm looking to use the autorun feature in Manipulate to show how the ...
  • 1,103
6 votes
3 answers
419 views

How to Generate a Phase Portrait for a Jacobian Evaluated at Fixed Points

Consider the following: The Jacobian matrix J given below correctly generates the eigenvalues for the (x,y) fixed point shown below. When looking at the stability of the fixed point the absolute ...
  • 1,103
0 votes
1 answer
48 views

Substitution of sequences to derive recursive mean

I would have the following derivation to calculate the recursive moving average and I'd like to follow it as closely as possible in Mathematica. For the sequence where $y(i)$ is considered as an ...
3 votes
1 answer
95 views

Implementing solution of a system of recurrence relations [closed]

Let us consider a system of recurrence relations such as $ a_{n-1} = ( \lambda_1 + n \lambda_2 ) a_n + \lambda_3 b_n $ $ b_{n-1} = ( \lambda_4 + n \lambda_2 ) b_n + \lambda_5 a_n $ subject to the ...
  • 33
0 votes
1 answer
44 views

RecurrenceTable for computing Required Minimum Distributions from an IRA

Here is a list of required minimum distributions from an IRA based on IRS published life expectancy tables for a particular age ...
  • 649
2 votes
2 answers
170 views

RecurrenceTable does not work for sequence of function

Consider the following code that repeatedly differentiates a function: test = RecurrenceTable[ {g[n] == D[g[n - 1], x], g[0] == x^10}, g, {n, 0, 5}] This code ...
1 vote
2 answers
92 views

Im trying to write this in Mathematica. It is a recurrence relation for convolution [duplicate]

I have tried many things, the relation is in the following picture, x' is a dummy variable.
  • 11
3 votes
1 answer
89 views

RSolve solves only one of two equivalent recurrences

I am having an issue with the RSolveValue/RSolve function. Specifically, Mathematica is able to correctly evaluate ...
0 votes
1 answer
62 views

How can I calculate the differentiation of qi in mathematica if I have the sum in the equation?

How can I calculate the partial differentiation of qi in the next equation?
  • 1
-1 votes
1 answer
155 views

Please I need help, how can I solve this heat impulsive system? [closed]

Please I need your help!! I need to solve the following system: $$ \left\{\begin{array}{ll} \partial_{t} \psi(x,t)-\Delta \psi(x,t)=0, & (x,t)\in (0,1) \times((0, 2) \backslash\{1\}) \\ ...
2 votes
2 answers
126 views

Computing periodic points of some function

Given a function h[{x_, y_}, b_, c_] := {x^2 + c - b*y, x} for some parameter values b and c ...
  • 713
0 votes
1 answer
38 views

RSolve problem not working

I tried to use Mathematica to find $a_{n}$. But unfortunately, it returned a equation that I can't understand. Here is the code below. ...
  • 1,611
0 votes
1 answer
81 views

Removing hypergeometric solutions in RSolve [closed]

I am using RSolve to find solutions, but I am only interested in rational solutions. For example here: And here is the input code: ...
4 votes
1 answer
175 views

Solving recurrent equations with RSolve

I need to find (or guess?) the symbolic functional form of aFun[n] for a general n (where n>=1). Anyone can help? ...
1 vote
0 answers
55 views

Defining general recurrence expression and extracting coefficient

I'm new to Mathematica and I wish to solve a difference equation which is defined by the relation: $y_{i-1}-2y_{i} +y_{i+1} = f(x_i,y_i),\\y_0 = a, y_n = b.$. Where $x_i$ is given for all $i$. I want ...
1 vote
1 answer
137 views

Finding fixed points of a system of difference equations

Can anyone help me in finding the fixed points of the systems satisfying all the parameters are real, positive? $$x_{n+1}=x_{n-d}e^{(r(1-\frac{x_{n-d}}{k})-\frac{\beta y_{n-d}}{(x_{n-d}+\gamma)}+x_{n-...
4 votes
1 answer
115 views

How to solve for multiple (cascading) recurrence relations

I am working with recurrence relations with a simple base: \begin{equation} Y_i = aY_{i-1} + (1-a)X_i \quad \mbox{and if $Y_0=0$ then} \quad Y_n = (1-a)\sum_{i=1}^n a^{i-1} X_i \tag{1} \end{equation} ...
1 vote
1 answer
59 views

How we write Recurrence functions and Generate individual components using given condition

How we write the recurrence function of below code so that it can easily find remaining components such as U[3], U[4], etc. ...
0 votes
1 answer
67 views

Understanding a "strange" output about a finite sum

Input: Sum[HarmonicNumber[k]/k^2, {k, 1, m}] That is $$\sum_{k = 1}^{m} \frac{H_k}{k^2}$$ Output I will attach a screenshot for I don't even know how to write ...
  • 723

1
2 3 4 5
7