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
273 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
87 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 ...
7
votes
1answer
231 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 ...
2
votes
1answer
523 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
495 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] ...
5
votes
5answers
423 views
8
votes
1answer
1k views

Poisson PDE over a irregular region with FDM

The problem modeled by the Poisson PDE is related to the torsion of prismatic beams and I use the Finite Differences Method (FDM). I've managed to solve the equation over a rectangle region with ...
32
votes
1answer
2k views

Has this implementation of FDM touched the speed limit of Mathematica?

Still, I'll use the implementation of the 1D FDTD method (you can simply understand it as a kind of explicit finite difference scheme for the Maxwell's equation) as the example. Just for completeness, ...
1
vote
0answers
566 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 (...
2
votes
1answer
980 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 ...
1
vote
1answer
233 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. ...
16
votes
1answer
334 views

Mathematica 9 cannot solve a difference equation that Mathematica 8 can

Bug introduced in 9.0.1 and fixed in 10.0.0 Consider RSolve[{a[n + 1] == 2 a[n] + n (1 + 2^n), a[1] == 1}, a[n], n] Mathematica 8 can solve this quickly, but ...
0
votes
2answers
352 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
118 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 ...
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 ...
3
votes
0answers
409 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
770 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
2answers
371 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 ...
1
vote
0answers
118 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: ...
13
votes
3answers
449 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 $\...
1
vote
1answer
117 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 ...
0
votes
1answer
165 views

Finding eigenvalues and eigenfunctions of difference operator?

Consider the following difference operator For n=2 this operator action is given by: ...
7
votes
1answer
908 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 ...
3
votes
1answer
297 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 ...
3
votes
2answers
273 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: ...
0
votes
1answer
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 ...
1
vote
1answer
64 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 ...
1
vote
1answer
336 views

Use Recurrence Table with Generating Function

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

Generating Functions with multiple arguments

I want to solve the recurrence of Ackermann function using Generating Function in Mathematica. ...
7
votes
3answers
442 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: ...
3
votes
1answer
147 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 ...
0
votes
1answer
235 views

How to solve this recursive system?

I try to solve the equation system as ...
0
votes
0answers
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: ...
0
votes
2answers
298 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 ...
2
votes
3answers
139 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 ...
10
votes
2answers
302 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-...
6
votes
6answers
474 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 ...
-2
votes
1answer
84 views
3
votes
1answer
164 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 ...
4
votes
2answers
814 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: ...
6
votes
1answer
200 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 ...
2
votes
0answers
89 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 ...
7
votes
1answer
559 views

How to find a recurrence relation for a sequence?

I have a sequence given by an explicit formula for n-th term: ...
5
votes
2answers
226 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$. ...
6
votes
2answers
206 views

RSolve gives a Context::ssle error

Bug introduced in 9.0 or earlier and fixed in 10.0 I want to solve the following recurrence equation RSolve[{(k + 2) c[k + 2] q^(k + 1) - c[k] == 0}, c[k], k] ...
2
votes
1answer
292 views

RSolve: Errors while solving Partial Difference Equation

I tried solving following partial difference equation in Mathematica by typing ...
2
votes
2answers
428 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: ...
1
vote
1answer
102 views
0
votes
2answers
141 views

Is this answer true?

I was using Mathematica to get the series solution for Legendre equation. But when I get the recurrence relation and use RSolve: ...
2
votes
1answer
164 views

Speeding up a differential equation system with nested modulo periodic events

I have the following differential equation system with periodic Events : ...