Skip to main content

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
2 votes
2 answers
39 views

How to fix parameter locally for iterating recursion equations

The following is a simplified version of a more detailed problem. I have two coupled recursion equations of two variables, x and y. One equation also depends on a parameter, c: ...
andring's user avatar
  • 163
3 votes
1 answer
117 views

Code for sampling and quantizing a signal running too slow

Below is the code for sampling a sine wave and quantizing it with negative feedback. It is running very slowly unless we reduce the sampling size ns. ...
metroidman's user avatar
1 vote
3 answers
208 views

Coupled quasi-linear PDEs

Is there any way of solving the following coupled PDEs using Mathematica? $$ \partial_t a(x,t) + \partial_x (a(x,t) u(x,t))=0 $$ $$ \partial_x (a(x,t) |u_x|^{m-1} u_x)=0$$ Initial and boundary ...
questionerno8's user avatar
1 vote
2 answers
114 views

RecurrenceTable vs For loop : they do not give the same results. Why?

I have a second-order recurrence equation that I want to plot. I've used two different methods. The first uses RecurrenceTable, the second uses a traditional ...
Pascal77's user avatar
0 votes
1 answer
85 views

How can I transpose SCILAB/MATLAB code with for loop into Mathematica? [closed]

How can I transpose the following SCILAB/MATLAB code into MATHEMATICA? I took a look at similar questions, but none of them seemed to provide a solution. ...
Pascal77's user avatar
5 votes
3 answers
331 views

Why is the general term of the sequence obtained using the RSolve function incorrect? Could it be a bug?

Bug introduced in 5.0, persisting through 14.0. Using the RSolve function to find the general term of the sequence is as follows: ...
csn899's user avatar
  • 4,315
0 votes
3 answers
110 views

The reason why the sum of the first 2024 terms of this sequence is incorrect? [duplicate]

The known conditions of the sequence are as follows: ...
csn899's user avatar
  • 4,315
0 votes
2 answers
115 views

Z - filter - RSolve vs InverseZTransform for unit state response : RSolve gives an incorrect result, where is my mistake? [duplicate]

I want to compare the unit step response of a z-filter given by two different methods: InverseZtransform, RSolve. ...
Pascal77's user avatar
0 votes
1 answer
88 views

Error on RecurrenceTable with two variables [closed]

I am trying to simulate a second order filter unit step response with the RecurrenceTable instruction in Mathematica. There's a problem with the second-order ...
Pascal77's user avatar
3 votes
2 answers
60 views

RSolve does not evaluate this recursion with two boundary conditions

I am using RSolve to solve for a function defined recursively, with two boundary conditions: First boundary condition describes the relationship between $f(1)$ and $f(0)$ Second boundary condition ...
Kuantew's user avatar
  • 131
2 votes
1 answer
78 views

Problem with RecurrenceTable of two variables

Let we have simple recursive function: ...
lesobrod's user avatar
  • 1,729
4 votes
0 answers
110 views

Finite Time Lyapunov Spectrum (FTLS)

The stadium billiard is a $2D$ chaotic system. We know this by studying its specular reflection patterns and Poincare section (or Poincaré-Birkhoff coordinates (PBC)). However, both methods are ...
user444's user avatar
  • 2,446
0 votes
1 answer
136 views

How to solve and analyze a system of 15 equations with 15 variables?

I have a system of $15$ equations and $15$ key variables. Some of the equations are non-linear. Some constant variables in the equation can be equal to numbers to solve the system. I have to find a ...
Moi's user avatar
  • 1
5 votes
4 answers
543 views

Dealing with derivative of noisy experimental data

I have the following (time, position) dataset ...
MOOSE's user avatar
  • 169
3 votes
2 answers
100 views

Closed-Form Solution for k-ary Tree Traversal Order

I was reading this blog post (https://research.swtch.com/treenum) that proposes a new base-k ordering for k-ary trees - I found myself wondering: is it possible to use Mathematica to solve a ...
Torkoal's user avatar
  • 153
2 votes
2 answers
149 views

Graph of a 3D discrete-time dynamical system

I have a set of difference equations defining a 3D dynamical system with specific parameter values. How can I create a 3D phase portrait to display its trajectories and identify potential attractors? $...
Zafar Boxonov's user avatar
-1 votes
1 answer
91 views

How to directly convert the solution of a recursive equation into a function expression? [closed]

Clear["Global`*"] RSolve[{p[i] == 2/5 p[i - 1] + 1/2 p[i] + 1/10 p[i + 1], p[0] == 0, p[8] == 1}, p[i], i] // FullSimplify According to the above ...
csn899's user avatar
  • 4,315
1 vote
1 answer
84 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
356 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
90 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
101 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
128 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,632
0 votes
0 answers
145 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
55 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
48 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
91 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
44 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
59 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
  • 593
3 votes
1 answer
140 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
276 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
67 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
  • 4,315
2 votes
1 answer
80 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
98 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
59 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,863
2 votes
2 answers
181 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
  • 165
1 vote
1 answer
142 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
  • 165
0 votes
2 answers
64 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
125 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
  • 4,315
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
1 vote
0 answers
59 views

How to solve ADE [closed]

I want solve these Algebraic differential equations, with arbitrary constants and initial conditions ...
Sami Ullah's user avatar
8 votes
2 answers
639 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,912
0 votes
0 answers
54 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
  • 930
2 votes
3 answers
540 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
104 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
94 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
178 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
150 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
274 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
48 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

1
2 3 4 5
8