We’re rewarding the question askers & reputations are being recalculated! Read more.

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
4
votes
3answers
407 views

Slow computation of recursive sequences

I want to investigate the asymptotic behavior of the following recursive system: ...
3
votes
2answers
57 views

What is the fastest way to calculate series from recurrence solutions with no closed form?

I am not very experienced with Mathematica. I want to calculate the series from recurrence solutions. These solutions have no closed-form. I want to improve the approximation and hence need a good ...
1
vote
1answer
58 views

recurrence equation

The output of Mathematica is only a copy of the input. What am I doing wrong? ...
1
vote
0answers
34 views

How to specify an element of a list when using RecurrenceTable

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 ...
1
vote
0answers
55 views

Computing a system of ordinary differential equations with initial condictions over a continuous range [closed]

I have some questions about Mathematica programming and would appreciate if you could help me. I want to solve a system of ordinary differential equations μ '[t] ...
0
votes
0answers
20 views

Does Mathematica find most general recurrence solutions?

Consider e.g. the following recurrence relation solution: RSolve[a[m, n + 1] == a[m + 1, n], a[m, n], {m, n}] {{a[m, n] -> C[1][m + n]}} which states that the ...
1
vote
0answers
30 views

Problems with the parametric Recurrence Table

I am trying to construct a minimization program where I have to minimize a function with respect to a matrix. This matrix enters into the optimization program in a convoluted manner together with data....
0
votes
0answers
35 views

How to find the value in which an expression becomes greater than another

I have the following expressions: $\Delta \sigma_1=\frac{2 \gamma ^2 \left(\text{$\sigma $Y} \log \left(\frac{\gamma }{\alpha }\right)+\text{pe}\right)}{\left(\gamma ^2-1\right) \rho ^2}$ $\Delta \...
0
votes
0answers
24 views

Lyapunov exponents of discrete dynamics with two parameters in one dimension

How can we calculate if we have discrete dynamics with two parameters: f[x_, a_, b_] := Piecewise[{ {1 - a*x, x <= 1/2}, {1 - b*x, x > 1/2} }]
0
votes
0answers
47 views

Bifurcation diagram with two parameters [duplicate]

I have a question. In Bifurcation diagram of a difference equation I asked for one parameter. And now I am going to tell how do I make a bifurcation diagram of that function with two parameters? I ...
1
vote
2answers
144 views

Bifurcation diagram of a difference equation

The function is f[x_, a_] := Piecewise[{{x (1 + a - a*x), x <= 1/2}, {x (1 - a + a*x), x > 1/2}}] How to make the bifurcation graphic of it? What ...
0
votes
1answer
78 views

How to get solutions for recursive relations using RSolve?

I have $$a(x,t+2) - a(x,t) = -\cos{\theta} [a(x+1,t+1) + a(x-1,t+1)]$$ Setting $t' = -t\cos(\theta)$ fetches under the continuum approximation $$2 \frac{\partial a(x,t')}{\partial t'} = a(x-1,t') - ...
2
votes
1answer
68 views

Problem with RSolve function

When I use RSolve to solve the recurrence: $S(n)=\dfrac{1}{-S(n-1)-2},S(1)=-2/3$, it gives an empty solution: however the solution should be:$S(n)=-\dfrac{n+1}{n+2}$ Did I do something wrong?
6
votes
2answers
164 views

Find a stable 3-cycle of the sine map

I am trying to find an stable 3-cycle for the sine map $g(x) = a \sin(\pi x)$ but I do not know exactly how to use mathematica to do so. Is there anyone familiar with this? $x$ lies as before ...
-1
votes
1answer
54 views

Error when Solving Recurrence Relation

I would like to analyze the following recurrence relation. $r_i = r_{i-1} - \frac{1}{2} \cdot \sqrt{1 - \frac{4\pi^2\cdot r_{i-1}^2}{n^2}}$ $r_0 = \frac{n}{2\pi}$ I have implemented this as ...
0
votes
0answers
29 views

Trying to solve recursion using rsolve

I'm new to Mathematica, and I'm trying to use RSolve to solve an equation I couldn't do in Matlab, as I got errors there too. This is the system I'm trying to solve:...
0
votes
0answers
23 views
0
votes
1answer
39 views

Help with recurrence relation

I try to solve the following recursion for $n \in \mathbb{N}$. $r_i = r_{i-1} - \frac{1}{2} \cdot \sqrt{1 - \frac{4\pi^2\cdot r_{i-1}^2}{n^2} \cdot \cos^2 \left(\frac{\pi}{n}\right)}$ $r_0 = \...
1
vote
1answer
87 views

Solving recursive equations with RSolve, with constraint and subscripts

I'm trying to solve this set of equations in generality, where $n$ can vary. $\begin{align*} P_{1}&=1-\sum_{i=2}^{n}P_{i}\\ P_{i}&=\frac{c_{i-1}P_{i-1}}{c_{i}+\mu_{i}}, \quad i=2,\dots,n-1\\ ...
0
votes
0answers
32 views

Generating DifferenceRoot Equation

I like to find a difference root equation I use the following methods use for mathematica but I have not get any result Clear[p] ...
0
votes
0answers
23 views

some errors the DiferenceRootReduce

I try to calculate DifferenceRootReduce[( Sqrt[\[Pi]] Gamma[3/2 + k] HypergeometricPFQ[{3/2 + k, -n}, {2 + k}, p])/ Gamma[2 + k], k] but any result ...
2
votes
3answers
55 views

Using rule output as function

Im trying to define a function using the output from RSolve, however i cant get it to work properly. I have a RSolve that output something like: ...
1
vote
1answer
89 views

RSolve and a Piecewise Recurrence + Runtime

This should really be a comment to this answer but I don't have enough rep. I'd like to know how to do the same thing (efficiently - see below) but with $\mod 3$ conditions, i.e. define a[k] to be the ...
1
vote
1answer
40 views

RSolve for three arguments

I would like to find the general expression for a recursive equation: ...
0
votes
1answer
81 views

Recurrence Relation with two variables and boundary conditions

I try to express the following recurrence relation in Mathematica: I am very sorry but for any reason I am not allowed to embed math code here... \begin{align*} x_{1,t} &= \frac{1}{2} x_{1,t-...
1
vote
1answer
95 views

Solution of differential equation and then draw a graph

I have two differential equations: $da/dt = a (.3 a^{-3} + .7)^{1/2}$ and $d \tau /dt = 1/a$. The initial conditions are $t = 0$; $a = 1$ and $\tau = 0$, respectively. How can I solve the ...
4
votes
2answers
163 views

RSolve not reducing for a certain recurrence relation

I'm trying to use RSolve as follows to solve a recurrence relation: ...
3
votes
1answer
71 views

Spectrum of eigen values for coupled differential equations

How do I obtain a spectrum of eigenvalues for my system of coupled differential equations? $$ kf''(\theta) + \epsilon_{1} f(\theta) + a\cos(b \theta + c) g(\theta) = \lambda f(\theta),\\ a\cos(b \...
0
votes
0answers
64 views

Solving a system of recurrence equations

Can anybody help me with the following code for solving a system of nonlinear recurrence equations. When I evaluate the kernel and run it, the output is the same is my input as if the Mathematica is ...
0
votes
0answers
42 views

Recurrence Relation based on Vectors

I am new to Mathematica. I try to solve a recurrence relation based on vectors. So a[n] is a vector for all n (as well as ...
1
vote
0answers
100 views

Solving a recurrence relation with variable coefficients

I am trying to solve this recurrence inequality for $ a_n $, hopefully in terms of $ a_0,a_1,c $ and $ x $, $$(1-x)a_{n+1} \le xa_n + (1+x)a_{n-1} + c\quad\forall\ n\ge1$$ What I tried: RSolve. But ...
1
vote
0answers
43 views

Why does RSolve not give what I expect?

I have a model based on a digraph G. I construct a system of difference equations, modelFull, as seen below. ...
0
votes
0answers
45 views

Avoid Recursion in lag and difference operations

I have a panel data situation and I'm interested in taking lags and differences and using Mathematica to simplify the algebra of the result. Currently I'm working with a model like this: ...
-1
votes
1answer
83 views

How can I solve this systems of differential equation and show a plot?

$$ \frac{\mathrm du}{\mathrm dt} = 1 - u \mathrm e^{\epsilon(8q-1)} $$ $$ \frac{\mathrm dq}{\mathrm dt} = u \mathrm e^{\epsilon (q-1)} - q $$ $ 0 \leq \epsilon \leq 0.1 $ $u(0) = 0$ and $ q(0)=0$ ...
0
votes
0answers
36 views

Residues of products

i have the following problem: My function is given by: $(cz^{-1}+aq^{-j}-bq^{-2j}z)\prod_{m=1}^{Q-1}\frac{qz-z_{m}}{z-z_m}+(-cz^{-1}+dq^{j}+bq^{2j}z)\prod_{m=1}^{Q-1}\frac{q^{-1}z-z_{m}}{z-z_m}=E$, ...
0
votes
1answer
44 views

fisrt 5th iterations of a sequence of functions: integro-differential equations [closed]

Please I am struggling to compute with mathematica the first 5th iterations of the sequence of functions $u[n,t]$ satisfying the integro-differential equation Please help me with the code. Patrick
2
votes
1answer
167 views

Using NIntegrate in Finite Difference Derivative method

I'm trying to solve a second order differential equation using the code given by @xzczd here which is based on this. What this ...
1
vote
0answers
81 views

Zeros of a rational fraction sequence

This is a follow-up of the question Finding a function/differential equation from a 2nd order recurrence relation, I asked yesterday. The reason why I didn't edit the original question was that in ...
2
votes
1answer
72 views

Finding a function/differential equation from a 2nd order recurrence relation

Consider the following 2nd order recurrence relation: $$A_{1}=1,\; A_{2}=z$$ $$A_{n+2}(z)=(b_n+z)A_{n+1}(z)+a_nA_{n}(z),\; n=1,2,3,...$$ where, $$b_n=n\left(n+m+\frac{1}{2}\right),\; a_n=k^2n\left(...
1
vote
1answer
89 views

How to generate a series with recurrence relation? [closed]

I am a beginner in Mathematica and stuck on a problem. I want to generate a series using a recurrence relation, however, I am facing the problem while feeding previous values. ...
8
votes
3answers
213 views

Using Total inside the RecurrenceTable

I would like to perform an operation over IntegerDigits recurrently. The operation is the sum of cubes of the digits, for example: $12 \rightarrow (1^3 + 2^3) = 9$...
2
votes
0answers
126 views

DSolve analytical solution of the system equation with two variable

I have a difficulty to solve this system equations: ...
3
votes
1answer
130 views

Second order 1D equation with integral boundary condition

Is it possible to solve below equation in Mathematica in range $0<x<r$? $f''[x] + \frac{2f'[x]}{x} = -A e^{-B f[x]}$ $ f'[x]|_{x=r}=-\alpha\:\:\:\:\:$ and $\:\:\:\int_0^r f(x) x^2 dx= \gamma$ ...
1
vote
0answers
45 views

How to interpret RSolve solution with negative factorial?

I'm having trouble interpreting the following result of RSolve to this difference equation: ...
5
votes
3answers
114 views

How to find a list of values of recurrence equation?

I tried with RSolve,but it fails: RSolve[{x[n + 1] == n + Sum[j*x[j], {j, 1, n}], x[1] == 1}, x[n], n] Returns unevaluated ...
0
votes
0answers
66 views

DifferenceRoot help

I have being calculate some Series Coefficient and the result was and DifferenceRoot equation but i do not how ...
0
votes
1answer
89 views

Solving recurrence relations

I have the following recurrence system: $$\pi_0 =.25\pi_0 + .25q\pi_1+.5q\pi_2 + q\pi_3 $$ $$\pi_1 =.25\pi_0 + .25q\pi_1+.5\pi_2 + p\pi_3 $$ $$\pi_2 =.25\pi_0 + .25p\pi_1+.5p\pi_2 + 0 $$ $$\pi_3 =....
2
votes
1answer
157 views

Guessing recursion in rational functions

I want to know if there is a package in Mathematica that can give back some recursion given a list of polynomial in $f_{n}(h)$. For example I know there exists package RISC guess that where I give ...
0
votes
0answers
100 views

Solving a boundary-value recurrence relation

I would like to solve a recurrence relation of the form ...
0
votes
0answers
47 views

How many solutions are there in this equation $u_{2018}=0$?

I have a sequence $(u_n)$ so that $u_1=a$ and $u_{n+1}=4u_n (1-u_n)$, for all $n=1,2,\ldots$. How many solutions are there in this equation $u_{2018}=0$? I tried ...