Questions tagged [difference-equations]
Tag for the usage of RSolve, RecurrenceTable, DifferenceRoot, and other functions related to difference equations.
338
questions
0
votes
1
answer
49
views
Sigma Delta Modulator in Mathematica
Below code is for 1st order sigma delta modulator used in ADC/DAC circuits.
...
11
votes
2
answers
343
views
Finding the general formula for the sequence defined by $u_1 = 1$ and $u_{n+1} = u_n + 1 + \sqrt{u_n+3}$
Let be given sequence $(u_n)$ satisfying:
$$u_1 = 1, \quad u_{n+1} = u_n + 1 + \sqrt{u_n+3}, \forall n \geq 1.$$
I tried
...
0
votes
1
answer
86
views
Recursion not working
I am trying to find the terms x7,x8,x9 and so on from the recursive relation given in the code.
...
0
votes
0
answers
96
views
How to solve recurrence equation using RSolve?
How can I solve the following recurrence equation while I dont have the initial values?
Is it possible to solve this using RSolve?
...
3
votes
1
answer
127
views
Recurrence formula evaluating with speacial counting of subscripts
Hoping to check some recurrance relationship like this
$a_1 = x$ and $a_2 = y$, with
$$
a_{2n+1} = a_{2n} a_{2n-1}
$$
and
$$
a_{2n+2} = a_{2n+1} + 4
$$
Tried
...
0
votes
0
answers
142
views
Iteration show different values in solving a pde in mathematica
I have a pde given below:
$u_{t}-u_{xx}+\frac{1}{4}u=0, $
with boundary conditions
$u(0,t)=1,\ \ u(1,t)=\frac{1}{2}e^{\frac{-t}{4}}+e^{\frac{-1}{2}},$
where $0\leq x\leq 1$. If the initial iterate is $...
0
votes
0
answers
54
views
Problem in solving the non-linear equation
Is there any other way to solve an equation rather than solve command also without findroot command in Mathematica? Because the Solve command is not returning any ...
0
votes
0
answers
44
views
How to solve this Third Order PDE using NDSolve; Showing some missing variable error
I just confuse why ***u[0,t]==Sin[\omega t] cannot be used as a variable error was showing
...
1
vote
1
answer
88
views
Solving a Variable Number of Difference Equations with RSolve
I'm trying to solve a variable number of linear equations defined by
$$
\begin{align} x_0 &= A+Bx_1 \\ x_i &= C+\frac{B}{2}(x_{i-1}+x_{i+1}), \hspace{.25cm} 1\leq i \leq n-1 \\ x_n &= C+...
1
vote
0
answers
42
views
Creating a Table of Squared Differences through a Single Function
I am having trouble creating a table of squared differences within a single function. I can manually create this table through creating six different alphaDiff ...
0
votes
2
answers
57
views
How to keep Findroot accuracy when the vector equation has additional constraints
This is a simple example (More complex equations will be considered in actual calculations): I have two vector equations vx and ...
2
votes
1
answer
126
views
Looking for a recurrence relation for these specific polynomials?
Trying to answer this question related to the calculation of
$$I_k=\int_1^\infty x^ke^{-x}\ln(x+a)\,dx$$ which, at least to me, looks problematic.
What is missing for a complete answer is to ...
7
votes
1
answer
266
views
Recurrences related to Ramanujan's 1/pi formulas for level 10?
In the course of my research years ago, I came across three integer sequences related to Ramanujan's pi formulas but for level $10$. Their recurrence relations may be important. (Just like the level $...
0
votes
1
answer
59
views
Why is this sequence a [n] unable to correctly find its general term formula?
Given the sequence a [n], a [n] represents the general term of the sequence. Known conditions include:
a[n + 1] == a[n] + Log[n/(n + 1)], a[1] == 1
The result ...
2
votes
1
answer
71
views
How to directly define a function as the solution of RSolve
This is probably very simple, but I just cannot find this anywhere online. I have the code
...
1
vote
2
answers
96
views
Positive Change, Negative Change, and Total Change with Values on Graph
I am trying to show a change in cross-section geometry between years, and have good visual plots but would like actual values to use also. I am using spline curves to visualize the cross sections, ...
0
votes
0
answers
53
views
How to use quasi-Newton methods to solve a non-linear system?
Consider the following function, for $\mathbf{x}=\{x_1,...,x_n\}$
$$
F(\mathbf{x})=\sum_{k=0}^n \frac{e^{A_k\mathbf{x}}-e^{B_k\mathbf{x}}}{C_k\mathbf{x}}-\mathbf{b}
$$
where $\{A_k\}$, $\{B_k\}$ and $\...
2
votes
2
answers
163
views
Plotting solutions of a difference equation
I'm trying to reproduce Figure 2 of this paper.
This plot is the solution of Eq. (7) of the paper, which is a difference equation, with an initial value given in Table 1. Here is its summary:
...
0
votes
1
answer
85
views
Use the RSolve command of Mathematica to solve difference equations in matrix form?
For example, if $A$ is a matrix, the following is its difference equation representation.
How can I rewrite the code to use the RSolve command correctly?
...
1
vote
1
answer
133
views
Matrix difference equation
How to use Mathematica's RSolve command to solve the difference equation in matrix form?
RSolve[{a[n + 1] - 2 a[n] == 1, a[0] == 1}, a[n], n]
For example, the ...
0
votes
2
answers
62
views
Recurrent equation with UnitStep function using RSolve
I have the following equation to solve
$$a[n+1] = a[n] + 6 - 100\cdot \theta(a[n]-100)$$
where $\theta(x)$ is the Heaviside step function. So I tried the following
...
0
votes
2
answers
113
views
How to find the general term formula of this sequence? [closed]
Note that S [n] is the sum of the first n terms of the sequence a [n]. It is known that a [1]==1, and the sequence {S [n]/a [n]} is an equal difference sequence with a tolerance of 1/3. Find the ...
1
vote
0
answers
29
views
Is there any way to plot / re-express this `DifferenceRoot` expression?
I recently performed a calculation that output the result
...
0
votes
0
answers
21
views
Difference Equation with Upper Boundary Condition, Lower Terms Not correct
I am struggling to understand the solution Mathematica is providing for the following recurrence relation
As I have written a[i] I expected the following behavior
<...
1
vote
0
answers
58
views
How to solve ADE [closed]
I want solve these Algebraic differential equations, with arbitrary constants and initial conditions
...
0
votes
0
answers
146
views
Find Vector Potential from Vector Field with Div = 0?
This works to compute the scalar potential function of a vector field whose curl is 0 (using the DifferentialForms.m package):
...
8
votes
2
answers
538
views
How to find roots of general polynomials as functions in Mathematica?
Edit:
I learned from the comment below that there is already a method by summing series here
How can I get the solutions of $x^n-x-t=0$ in hypergeometric form?
and another answer that might be ...
0
votes
0
answers
53
views
I need a recurrence relation or function for a series [Solved]
I am not sure if what I need is a function or a recurrence relation to extend what you see below to substantial n.
In words:
I have a series. Starting with n=3 (<...
2
votes
3
answers
482
views
Solution of a recurrence relation
I want to solve $a_{n+1} = (1 + \alpha) a_n + \gamma$, where $\alpha$ and $\gamma$ are some constants. Wolfram alpha returns:
$a_n = \frac{\gamma ((1+\alpha)^n-1)}{\alpha} + c (1+\alpha)^{n-1}$.
Any ...
1
vote
1
answer
103
views
Plot of a recursive expression having a parameter
I have a recursive expression defined as
$$
h_u= (1-a)(1-b) h_{u-1} + \sum_{k=2}^{u-1} (1-a) b h_{u-1-k} - \sum_{k=2}^{u} h_{u-k} - \sum_{k=1}^{u+1} \Lambda_{u,k}
$$
where $\Lambda_{u,k} = \sum_{m=u-k+...
0
votes
1
answer
86
views
RecurrenceTable two difference equations
I have tried to use RecurrenceTable to Solve a system of two differential equations. I look for having a sequence of the two variables n (population growth factor) and w (wages). I have provided ...
2
votes
1
answer
150
views
Solving logarithmic 2D Nonlinear GPE Equation
I am trying to solve the logarithmic 2D Nonlinear GPE Equation from this paper https://arxiv.org/pdf/1801.10274.pdf. But failed to get the ground state solution and vortices. I tried to solve in ...
7
votes
1
answer
144
views
RSolve returns a wrong result, why?
I'm trying to solve the following recurrence relation: $ \begin{cases} u_{0} = a \\ u_{n + 1} = - \sum_{i = 0}^{n} u_{i} u_{n - i} \end{cases} $
Here is my Mathematica code:
...
2
votes
1
answer
223
views
Stability classification code for dynamic system
I'm interested in carrying out stability analysis on discrete dynamic systems, as was done in this paper. The Author used their function ...
1
vote
0
answers
46
views
Progress Indication for RecurrenceTable
I am trying to figure out how to implement progress indicator in RecurrenceTable. I have a complicated code within the With function that contains recurrence table. A simple code will suffice say,
<...
3
votes
1
answer
116
views
problem in plotting phase portrait t for nonlinear system of difference equation
I have tried to do a code about phase portrait plot for this system of difference equation:
\begin{align}
x_{t+1} &= ax_{t}^2+y_t+1 \\
y_{t+1} &= bx_t^2-1
\end{align}
I took 'a=0.5','b=2'
but ...
1
vote
1
answer
57
views
RecurrenceTable with multiple vectors
I am trying to do numerical calculations by recursion with vectors. I wrote a test code with single variable using 2 ODE's as shown below,
...
2
votes
1
answer
104
views
Implement recursion one step at a time with a function of more than one variable
i am trying to implement a recursive difference equation step by step, by implementing rules, similar to Rojo's method in this thread: How can I evaluate only a single step of a recursive function?
...
0
votes
0
answers
52
views
RSolve[] gives error RSolve::litarg when solving demo equations from the official documentation
The official documentation of RSolve[] (specifically, in the fifth paragraph of the seciton "Details and Options") states that:
The specification a∈Vectors[m] or a∈Matrices[{m,p}] can be ...
1
vote
0
answers
81
views
Solving a 2D recurrence diagonal-by-diagonal
I have a 3D recurrence relation -- which I know can be hard for Mathematica to work with, so I boiled it down to 2D.
We have two functions, $f_1(i,j)$, $f_2(i,j)$ defined on the state space $\{(i,j) | ...
1
vote
1
answer
98
views
Recurrence relation for B-spline polynomials
I am trying to get the explicit polynomials of cardinal B-splines. So far I have this implementation (for cardial B-splines of degree 3 on the knots 0, 1, 2, 3):
...
1
vote
1
answer
110
views
RSolve with integer and boolean variable
I have a recurrence relation with two variables $i, b$ where
$i \in \{0, \ldots, n-1\}$ for some parameter $n \in \mathbb{N}$; and $b\in \{0,1\}$.
I tried to solve it using RSolve, but the function ...
0
votes
1
answer
142
views
RSolve two variables with multiple boundary conditions
In short, I want to solve a recurrence equation in two variables with multiple boundary conditions.
In more detail:
For instance, suppose I want to compute
$a[0,j]= 1 \quad \forall j$
$a[i,0]= 1 \quad ...
2
votes
2
answers
231
views
RSolve with two boundary conditions
I want to solve a recurrence equation that has boundary conditions on both sides:
$a[0]= 1$
$a[n]= 10$
$a[i] = a[i-1]-a[i+1]\quad \forall i \in \{1, \ldots, n-1\}$
This should be a well defined ...
3
votes
2
answers
67
views
Need help formatting `DifferenceRoot` for LaTeX
I want to put this into LaTeX format. What do I do?
(FindSequenceFunction[Join[{5, 3, 3, 2}, Table[2, {80}]], k + 1] + n - 1)
-1 + n + DifferenceRoot[Function[{[FormalY], [FormalN]}, {16 - 8 [...
1
vote
1
answer
301
views
How to plot the "trapping region" in Henon Map?
I am writing a paper that makes use of the Henon map. I have managed to plot the Henon map but now require plotting the "trapping region" shown in the image.
Do I require to plot it as a ...
2
votes
2
answers
89
views
Inverse of an Animation
I was thinking, it's possible to plot inverse an animation??
...
3
votes
1
answer
88
views
Difference between NDSolve and RecurrenceTable
I have the following system which I model as difference equations and solve with RecurrenceTable:
...
3
votes
1
answer
80
views
Replace previous equations into the current one in a recurrence relation
I have a recurrence relation given as follows:
f[k + 1] == 1/a[k, k + 1] Sum[a[k, k - k1] f[k - k1], {k1,0,k-1}]
Evaluating it for ...
2
votes
1
answer
188
views
How to reproduce Asymptotic Bounds of Recurrences in Wolframalpha
In Wolframalpha's Examples for Recurrences, there are bunch of Asymptotic Bounds of Recurrences examples, like this
It can get perfect result:
...