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
3 votes
1 answer
115 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) ...
user avatar
7 votes
1 answer
239 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 ...
user avatar
0 votes
2 answers
387 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: ...
user avatar
0 votes
1 answer
132 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 ...
user avatar
  • 135
15 votes
2 answers
2k 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 ...
user avatar
  • 713
3 votes
0 answers
482 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{...
user avatar
  • 59
4 votes
4 answers
795 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: ...
user avatar
  • 8,648
1 vote
0 answers
122 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: ...
user avatar
1 vote
2 answers
418 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 ...
user avatar
  • 199
13 votes
3 answers
483 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 $\...
user avatar
4 votes
2 answers
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 ...
user avatar
  • 43
1 vote
1 answer
130 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 ...
user avatar
0 votes
1 answer
175 views

Finding eigenvalues and eigenfunctions of difference operator?

Consider the following difference operator For n=2 this operator action is given by: ...
user avatar
  • 11.5k
7 votes
1 answer
983 views

Calculating the Feigenbaum Constants

I would like to calculate the $δ$ and the $α$ Feigenbaum constants for the Logistic Map: \begin{equation} x_{n+1}=4μx_n(1-x_n)=f(x_n) \end{equation} as part of an undergraduate assigment of mine. I ...
user avatar
  • 73
3 votes
2 answers
309 views

DifferenceRoot question

I was doing the following sum: $$\sum_{i=2}^k \frac{(-1)^i}{i-1} \binom{2k-i-1}{k-1}x^i$$ First, Mathematica simplifies it to some DifferenceRoot function: ...
user avatar
  • 617
0 votes
1 answer
69 views

How can I write a program implementing difference equations system with parameter [closed]

How can I make a program with this dynamical difference equations system P(n + 1) = Pn - 0.1(Qn - 200) Q(n + 1) = Qn + 0.5(Pn - 50) But in instead of ...
user avatar
4 votes
1 answer
320 views

How to approximate the solution of a system of quartic equations

In an attempt to evaluate the point at which the cycle 2 becomes unstable for the given map: \begin{equation} x_{n+1}=μ-x_n^4=f(x_n), \quad μ \in \mathbb{R} \end{equation} I have so far managed to ...
user avatar
  • 707
1 vote
1 answer
66 views

Incorrect difference equation answer

The difference equation 2.5(y(t)-y(t-1))=0.1y(t) has a general solution of y(t)=8(1.04)^t, thus with y(0)=8 the particular solution is y(t)=8(1.04)^t. If I run the problem with Maple, I get exactly ...
user avatar
  • 425
1 vote
1 answer
349 views

Use Recurrence Table with Generating Function

I tried to use Generating Function to solve Fibonacci series using following function. Input: ...
user avatar
4 votes
0 answers
191 views

Generating Functions with multiple arguments

I want to solve the recurrence of Ackermann function using Generating Function in Mathematica. ...
user avatar
7 votes
4 answers
718 views

Paying off an installment

How do I determine the weekly installment I have to pay, if my loan is, let's say, loan=5000, with interest rate of 2% every ...
user avatar
  • 473
7 votes
3 answers
452 views

Solving coupled recursion equations for a target variable

I have a set of coupled recursion equations and want to express the final solution in terms of one of the variables: ...
user avatar
3 votes
1 answer
206 views

Solve a set of recurrence relations with a constraint

I am trying to solve a set of recurrence equations as given below: $p_{1, n}*(l + n*u1) = p_{1, n-1}*l + p_{1, n+1}*(n+1)*u1 + p_{2, n}*u2$, $p_{2, n}*(l + n*u1 + u2) = p_{2, n-1}*l + p_{2, n+1}*(n+...
user avatar
  • 55
3 votes
1 answer
152 views

Making a table or expression based on previous values

I would like to illustrate rational expectations based on the following equation p[[t+1]] == 1/(1 - ψ (β - 1)) m[[t+1]] - ψ (β - 1)/(1 - ψ (β - 1)) p[[t]] by ...
user avatar
  • 425
0 votes
1 answer
244 views

How to solve this recursive system?

I try to solve the equation system as ...
user avatar
  • 390
8 votes
1 answer
488 views

Two dimensional recurrence

My actual problem is a bit more complicated, but let us first assume that we have a recurrence relation of the following type $a_{n,l} = a_{n-1,l} + a_{n-1,l-1} + a_{n,l-1}$ The boundary is given, ...
user avatar
4 votes
2 answers
166 views

How can I find the coefficients of the next recursive symbolic function?

I have the following function $$ f(x+3k) = -mf(x+2k)+f(x) $$. If we get $x=x+k$, then $$ f(x+4k) = -mf(x+3k)+f(x+k) = m^2f(x+2k)+f(x+k)-mf(x) $$. Also we obtain the coefficients of the final functions,...
user avatar
  • 390
0 votes
0 answers
51 views

Recursions where one definition depends on another. How to Block or have local variables?

I have been using Mathematica to solve a second order differential equation using the second order Verlet method. My code looks like: ...
user avatar
  • 120
0 votes
2 answers
330 views

How to find negative numbers for my recurrence formula?

The generalized recurrence formula is F[n_]:=F[n]=F[n-1]+F[n-p-1]; with the initial conditions ...
user avatar
  • 390
7 votes
5 answers
2k views

Limit n->Infinity of recursive sequence

I have defined a recursive sequence a[0] := 1 a[n_] := Sqrt[3] + 1/2 a[n - 1] because I want to calculate the Limit for this ...
user avatar
  • 173
3 votes
1 answer
373 views

Finite Difference - heat generation in a square (square within a square)

I am trying to develop a code that will allow me to solve the following problem. Lets say that I have a square block, inside that square block I have a smaller square box thats at a certain ...
user avatar
10 votes
2 answers
308 views

Evolution of a trait in an asexual population (performance tuning)

I just coded a simple simulation module that looks at the evolution of a continuous trait in a haploid asexually reproducing population under density dependent competition in discrete time (i.e. non-...
user avatar
1 vote
1 answer
199 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... ...
user avatar
  • 2,760
6 votes
6 answers
480 views

Recursion question

The first two terms of a sequence are $a_1 = 1$ and $a_2 = \frac {1}{\sqrt3}$. For $n\ge1$, $$a_{n + 2} = \frac {a_n + a_{n + 1}}{1 - a_na_{n + 1}}.$$ What is $|a_{2009}|$? So I tried (thanks to ...
user avatar
  • 14.5k
-2 votes
1 answer
86 views

boundary differential equation

...
user avatar
3 votes
1 answer
174 views

Kernel crash when evaluating NDSolveValue

I had a code that was working fine and I tried to add an extra few lines to find the solution of the same equation with different conditions. The original NDSolveValue solutions work fine but when it ...
user avatar
  • 167
2 votes
1 answer
1k views

Partial differential equation, Finite difference Method

For my research project I am trying to solve following partial differential equation in Mathematica (V[r]*ψ[u, v])/4 + Derivative[1, 1][ψ][u, v] == 0 with ...
user avatar
  • 33
4 votes
2 answers
920 views

Show Factorial instead of Gamma in the result of RSolve

Now I wanted to solve for a recurring function with RSolve. Here's how I tried: ...
user avatar
  • 175
1 vote
0 answers
606 views

How to derive finite-difference scheme automatically on a quite general stencil

Info This question is a generalization of the following one Derivation of numerical scheme for linear transport equation on a variable stencil. Statement of a problem Linear scalar hyperbolic (...
user avatar
2 votes
0 answers
91 views

Why doesn't RSolve work here? [closed]

RSolve[ {θ[n + 1] == θ[n] + 0.25*ϕ[n], ϕ[n + 1] == ϕ[n] - 2.5*Sin[θ[n]], θ[0] == π/2, ϕ[0] == 0}, {θ[n], ϕ[n]}, n] What's wrong with my code? I know ...
user avatar
  • 21
6 votes
1 answer
209 views

Random Variable in Recurrence Function

Following the previously published question, I'm looking for the solution of RecurrenceTable with explicit random variable. For example, something like ...
user avatar
1 vote
1 answer
245 views

Finite Difference equations - slow computations

The following code I have written runs very slow, in fact, so slow that it does not finish computation. ...
user avatar
6 votes
2 answers
232 views

Solution to Simultaneous Arithmetic/Geometric Mean Recursion Relations

I'm trying to solve the simultaneous convergent sequences of geometric/arithmetic means where $a_{n+1}=\frac{1}{2}(a_n+b_n)$ and $b_{n+1}=\sqrt{a_nb_n}$ and initial values are $a_0=1+x$ and $b_0=1-x$. ...
user avatar
  • 163
2 votes
2 answers
458 views

Why does Mathematica not evaluate the difference recurrence using `RSolve` or `RecurrenceTable`?

Mathematica does not evaluate the following recurrence of two variables using RSolve and only echoes the input: ...
user avatar
  • 808
1 vote
1 answer
109 views

RSolve: Recursive function is not a valid variable

...
user avatar
  • 13
2 votes
3 answers
142 views

Permutations and recurrence equation

First problem: I need to show all Permutations with length 4 of this elements {x, y, z, w, t} but with this condition: the element z mustn't be after element t. I ...
user avatar
  • 23
6 votes
1 answer
2k views

Discrete-time Lyapunov exponent plot

I am trying to create a Lyapunov exponent plot as a function of $\alpha$ for two functions: $$ f(x) = (\alpha + 1)x - \alpha x^{3} $$ and a piecewise function given by following Mathematica code: <...
user avatar
1 vote
1 answer
304 views

RSolve with integrations

I want to solve this question with Mathematica. $$T_0(t)=c(t),\quad T_n(t)=a\int_0^t T_{n-1}(s)\, \mathrm{d}s+b(t).$$ Is it possible to solve $T_n(t)$ with RSolve?...
user avatar
2 votes
1 answer
172 views

Speeding up a differential equation system with nested modulo periodic events

I have the following differential equation system with periodic Events : ...
user avatar
2 votes
1 answer
230 views

Getting the first $n$ terms of a recursion relation

Given a recursion relation, I would like to generate the first $n$ terms (automatically) without having to go term by term. Background Each term is of the form $a_{n}(t)$, that is, $a_{n}$ is a ...
user avatar
  • 121