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
1 answer
49 views

Sigma Delta Modulator in Mathematica

Below code is for 1st order sigma delta modulator used in ADC/DAC circuits. ...
metroidman's user avatar
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 ...
minhthien_2016's user avatar
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. ...
Math_student's user avatar
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? ...
mehrosadat ebrahimi's user avatar
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 ...
CasperYC's user avatar
  • 1,550
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 $...
Junaid Ahmad's user avatar
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 ...
supragyan priyadarshinee's user avatar
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 ...
FDMEM's user avatar
  • 19
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+...
Mike D's user avatar
  • 113
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 ...
Axion004's user avatar
  • 111
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 ...
lumw's user avatar
  • 583
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 ...
Claude Leibovici's user avatar
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 $...
Tito Piezas III's user avatar
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 ...
csn899's user avatar
  • 2,901
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 ...
Matthew Neil's user avatar
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, ...
Andrew Bowsher's user avatar
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 $\...
sam wolfe's user avatar
  • 4,179
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: ...
user avatar
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? ...
chen chen's user avatar
  • 143
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 ...
chen chen's user avatar
  • 143
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 ...
Андрей Кокорев's user avatar
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 ...
csn899's user avatar
  • 2,901
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 ...
Richard Burke-Ward's user avatar
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 <...
abnowack's user avatar
  • 113
1 vote
0 answers
58 views

How to solve ADE [closed]

I want solve these Algebraic differential equations, with arbitrary constants and initial conditions ...
Sami Ullah's user avatar
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): ...
Jeffrey Rolland's user avatar
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 ...
userrandrand's user avatar
  • 5,737
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 (<...
Rogo's user avatar
  • 790
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 ...
user avatar
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+...
Rosy's user avatar
  • 53
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 ...
Natacha R's user avatar
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 ...
Argha Debnath's user avatar
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: ...
Nath's user avatar
  • 73
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 ...
zeraoulia rafik's user avatar
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, <...
Aschoolar's user avatar
  • 883
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 ...
zeraoulia rafik's user avatar
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, ...
Aschoolar's user avatar
  • 883
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? ...
StevieP's user avatar
  • 23
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 ...
AlbertLew's user avatar
  • 473
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) | ...
black's user avatar
  • 251
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): ...
Luca Thiede's user avatar
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 ...
black's user avatar
  • 251
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 ...
black's user avatar
  • 251
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 ...
black's user avatar
  • 251
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 [...
Fred Daniel Kline's user avatar
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 ...
Awnon Bhowmik's user avatar
2 votes
2 answers
89 views

Inverse of an Animation

I was thinking, it's possible to plot inverse an animation?? ...
Felipe Dura's user avatar
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: ...
holistic's user avatar
  • 2,955
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 ...
Asatur Khurshudyan's user avatar
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: ...
maplemaple's user avatar

1
2 3 4 5
7