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
1answer
37 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
votes
1answer
140 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
90 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
28 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
79 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
68 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
38 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
66 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
96 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
35 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
1answer
59 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
2answers
140 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]+...
1
vote
1answer
34 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
57 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 ...
3
votes
1answer
176 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
369 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
1answer
72 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 ...
1
vote
2answers
243 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)=\...
0
votes
0answers
45 views

Difference Equation system

I am new in Mathematica and I have a very large system of difference equations like: ...
5
votes
3answers
178 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
128 views

How can I solve a functional equation with domain restrictions?

I have three properties for a function: ...
0
votes
1answer
49 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_{...
2
votes
1answer
135 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
0answers
61 views

Trying to implement an algorithm to solve a self-consistent Bloch-Schrodinger Equation

I am trying to understand and to implement an algorithm described by Kunimi-Kato in their supplementary material to solve the self-consistent equation below $$ \left[\frac{\hbar^{2}}{2m}|\boldsymbol{G}...
0
votes
1answer
194 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
188 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 ...
0
votes
0answers
38 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
165 views

Nonlinear Difference Equations [closed]

How can I plot the nonlinear difference equations?
0
votes
1answer
33 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 ...
0
votes
0answers
31 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
93 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
vote
1answer
59 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
2answers
105 views

Plot linear difference equations

How can I plot an unstable node, saddle, and center in linear two-dimensional difference equations? I can plot the stable node, please see the code. Thank you in advance. ...
1
vote
0answers
39 views

Solving a difference equation involving summation expressions-Implicit output

I am trying to solve a difference equation involving summation expression with the following code: ...
1
vote
0answers
45 views

How to study convergence of recurrence relations?

Is there a way to test the convergence of a recurrence relation in Mathematica? For example does this relation converge: $$a_{n+1}=a_n \dfrac{n-\dfrac{1}{4}+c^2}{-5+5c^2}$$ for some values of the ...
1
vote
1answer
102 views

How to solve this recurrence equation with Mathematica?

I am interested in solving this recurrence relation (equation) with Mathematica code. I am new to Mathematica. I tried RSolve, RSolveValue, AsymptoticRSolveValue commands for this. But I am not ...
3
votes
3answers
351 views

Problem plotting a bifurcation diagram of logistic map

I would like to plot a bifurcation diagram from the logistic map (difference equation) of the type $$ x_{t+1} = r\,(1-x_{t})\,x_{t}. $$ The code I used for that was ...
0
votes
1answer
64 views

Making change of variable

I have the following expression $$L=\frac{m}{2}\left(\dot{q}^{2} \sin ^{2} A t+\dot{q} q A \sin (2A t)+q^{2} A^{2}\right)$$ with $q=q(t)$ I want to make a change of variabl $$Q=q\sin(At)$$ By hand I ...
3
votes
1answer
148 views

Solve 2D Difference Equations

If I have a system of difference equations $$ \begin{cases} x(n + 1) = x(n) + x(n) y(n) + y(n)^2 \\ y(n + 1) = y(n) - x(n)^2 + y(n)^2 \end{cases}, \text{ with } \begin{cases} x(0) = 1\\ y(0) = 2 \end{...
2
votes
1answer
143 views

Plot system difference equations

Is this way correct to plot system of difference equation. For example ...
2
votes
1answer
136 views

Phase portrait for three dimensional system of nonlinear difference equation using Mathematica

I am a student of M.Phil Mathematics. I am working on a non linear system of difference equations in three dimensions. I want to draw a phase portrait for my system using Mathematica. I was trying ...
4
votes
2answers
127 views

Using RSolve for recurrence equation

I'd like to use Mathematica to verify the solution to a recurrence equation. I have the following equation: $Q_{k+1} = Q_k + \alpha(r_{k+1} - Q_k)$. I also have a derivation showing how to obtain a ...
1
vote
1answer
72 views

difference equation and continued fractions

I'm interested in solving the following difference equation: $x[k-1]+(k^2+k+a)/x[k]=b$, $k=1,2,\ldots$, where $a,b$ are fixed positive numbers; let's say $x[1]=c>0$. Mathematica's ...
2
votes
2answers
143 views

Counting the number of binary strings of length m with no consecutive 1s (RR). How to improve it?

I am new to Mathematica and I am trying to solve this problem of counting the number of binary strings of a certain length m, as far as no consecutive 1s are there. For instance m = 3, my recurrence ...
0
votes
1answer
78 views

How to plot the roots of two complex equations?

I have these two equations as two variables '$a1$' and '$b1$', mentioned below and I want to plot the roots of $a1^{\dagger}*a1$ with respect to P0, which will give me bistable plot with three values. ...
1
vote
0answers
41 views

General question about RSolveValue and general programming

If I have the following code: ...
1
vote
0answers
101 views

Plot a stable 4-periodic orbit

I have a question guys In Mathematica how I can plot a stable 4-periodic orbit in the logistic map with giving the four x values for the orbit and find the a value for which it goes through a period ...
3
votes
1answer
56 views

How to use elements of tables in recurrence tables?

I am trying to use a List inside a RecurrenceTable. Suppose I have the list ...
0
votes
2answers
75 views

Trying to generate strings using Recurrence Table

I'm trying to generate strings recursively that look like this: ...

1
2 3 4 5 6