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
2answers
143 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}...
3
votes
1answer
317 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 ...
0
votes
1answer
48 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
0answers
70 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 ...
0
votes
0answers
39 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: ...
0
votes
0answers
83 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] ...
2
votes
1answer
80 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)=...
6
votes
3answers
338 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 ...
3
votes
1answer
111 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 ...
0
votes
1answer
38 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
3answers
311 views

How to draw discrete dynamic systems in mathematica

How to find invariant sets in nonlinear discrete dynamical systems. How to draw discrete dynamic systems in mathematica? $$x[n+1]=f(x[n],y[n]), y[n+1]=g(x[n],y[n])$$ example $$x[n+1]=0.9*y^2[n]/(y[n]+...
0
votes
1answer
54 views
3
votes
1answer
80 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 ...
0
votes
1answer
41 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 ...
2
votes
2answers
151 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
2answers
88 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.
3
votes
1answer
72 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 ...
-1
votes
1answer
147 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
2answers
100 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 ...
0
votes
1answer
34 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. ...
0
votes
1answer
80 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: ...
2
votes
1answer
74 views

Solving recurrent equations with RSolve

I am trying to find a[0] by solving the following system of equations where n can get 1,2,3,...,m-1 ...
1
vote
0answers
45 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
1answer
79 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
1answer
105 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} ...
0
votes
1answer
64 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 ...
1
vote
1answer
40 views

How to print out exclusively even terms of a sequence?

I need to print out the first 20 even-numbered terms of the function $a_{n+1}=\frac{5}{a_n}$. I am capable of printing out each term with this code: ...
3
votes
0answers
63 views

Closed form solution for a differential-difference equation

Considering a differential - difference equation : $$g (t + 1,s) = \cosh (s) + \frac {\alpha} {t}\sinh (s)\frac {d} {ds} g (t,s)$$ with $g (t, s = 0) =1$, I am looking for a closed form for its ...
8
votes
1answer
122 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 ...
1
vote
0answers
44 views

How to specify an element of a list when using RecurrenceTable [duplicate]

My problem is that I'm trying to get a list of refraction angles in a multilayer structure (for the sake of this example - with two types of refraction indices and eleven layers of them). The code is ...
3
votes
1answer
182 views

Using dynamic programming to compute an integer sequence

Let a[n] = n + 1 - a[EulerPhi[n]], n integer > 0. I have Python code that generates the sequence using dynamic programming. How can I achieve the same thing elegantly/idiomatically in Mathematica? ...
4
votes
2answers
414 views

Plotting an image of a discrete dynamical system

I am trying to plot a discrete dynamical system of the form $$\vec{x}_{k+1} = A \vec{x}_k$$ where $A$ is a $2\times 2$ matrix in the form $$\begin{pmatrix}a&b\\c&d\end{pmatrix}$$ where $a$, $b$...
1
vote
2answers
284 views

Chebyshev polynomials

How could I write the Chebyshev polynomial as a function that uses Nest? Also, how could I write it using recursion? Furthermore, how can I show that $T_n(x)=\...
1
vote
1answer
74 views

problem in solving a non linear differential equation

I'm trying to reslove a differential equation with one of the coefficents depending on the dependent variable, it's a simple dynamic system, with one of the coefficients that can assume 2 values: The ...
0
votes
0answers
48 views

Difference Equation system

I am new in Mathematica and I have a very large system of difference equations like: ...
5
votes
3answers
197 views

2 issues with ListDensityPlot

I am using Mathematica Version Number 12.0.0.0 Platform: Microsoft Windows (64-bit) The FIRST issue is that the ListDensityPlot is not plotting values of x[Tfinal] ...
4
votes
2answers
136 views
2
votes
1answer
136 views

Could anyone help me to compute the following code?

The following code works good when the value of " r < 21 ". But when r > 20, I get the following error message ...
0
votes
1answer
61 views

Simulation of a recursive stochastic process

I would like to simulate and plot multiple paths of the following stochastic difference equation, for any initial condition $\pi_{0} \in (0,1)$: $\pi_{t+1} = \gamma \pi_{t}$ with probability $1/3 \pi_{...
0
votes
1answer
241 views

Bifurcation diagram for coupled nonlinear difference equations

I’ve been trying to plot bifurcation diagram of 2D map following the example by Chris K in here, where I managed to plot few of periodic cycles EDIT ...
4
votes
2answers
211 views

eigenvalue and eigenfunction of complex euler-bernoulli beam

So I am new to Mathematica and am trying to solve the euler-bernoulli modal equation for a U-shaped Cantilever beam given by equations :- where i is the index of the region. In total there are 2 ...
1
vote
1answer
196 views

How do I use RSolve to solve the problem below?

RSolve can't compute the solution. Appears that Mathematica is having a convergence problem. I don't know if the boundary conditions are properly defined... ...
1
vote
1answer
64 views

A modular version of LinearRecurrence?

I'm playing around with implementing the Lucas probable prime test (mainly so I can understand it better), and would love a version of the LinearRecurrence function that used addition modulo n (with n ...
0
votes
0answers
44 views

Parametrization of twisted pseudospheres types 2 and 3

Among the three types of rotationally symmetric Pseudospherical surfaces $K=-1$ (Beltrami central, type 2 and type 3) (http://xahlee.info/surface/gallery.html) we have Dini twist addition term $ b\...
2
votes
3answers
178 views

Nonlinear Difference Equations [closed]

How can I plot the nonlinear difference equations?
0
votes
1answer
39 views

Why does DifferenceRoot evaluate only in this table?

I would like to use a complicated function containing DifferenceRoot as a replacement rule, but somehow it evaluates only in ...
2
votes
1answer
54 views
0
votes
0answers
33 views

Solve ODE transformed into q-difference in Mathematica

Let's take a simple differential equation: $\frac{dx}{dt} = -x(t)$ Suppose we want to do a q-transform. To do this, we will replace the time derivative $\frac{d}{dt}$ with the q-derivative (also known ...
0
votes
1answer
97 views

How I can plot the below map?

I have tried to plot the following map: $\qquad \begin{cases} y_{n+1}=r y_n^{x_{n+1}-x_{n+2}}\\ y_1=x_1-x_2 \quad \end{cases}$ using the code shown below. The error I have got is that x[1] - x[2] ...

1
2 3 4 5 6