Tag for the usage of RSolve, ReccurenceTable, and implementation of finite difference method(FDM) in Mathematica

learn more… | top users | synonyms (2)

8
votes
3answers
168 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
2answers
86 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 ...
0
votes
0answers
4 views

continuous evolution [migrated]

I have a discrete evolution equation such that $$\rho(t+\tau) = M_0 \rho(t)M_0^\dagger+M_1 \rho(t)M_1^\dagger$$ $M_0\;\&\;M_1$ are two operators such that $tr(M_0^\dagger M_1)=0$ i.e. they are ...
1
vote
1answer
56 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
55 views

Finding eigenvalues and eigenfunctions of difference operator?

Consider the following difference operator For n=2 this operator action is given by: ...
5
votes
1answer
132 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
2answers
85 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
48 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 ...
2
votes
1answer
100 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 ...
1
vote
1answer
33 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 ...
0
votes
1answer
54 views

Use Recurrence Table with Generating Function

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

Generating Functions with multiple arguments

I want to solve the recurrence of Ackermann function using Generating Function in Mathematica. ...
6
votes
3answers
205 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: ...
0
votes
0answers
31 views

How can I find the binomial sum of my sequence? [on hold]

I have the following sequence $$ c_n= \begin{cases} bc_{n-1}+q^{n-2}c_{n-2},& n \text{ is even}\\ ac_{n-1}+q^{n-2}c_{n-2},& n \text{ is odd} \end{cases} $$ with the initial ...
3
votes
1answer
56 views

Solve a set of recurrence relations with a constraint

I am trying to solve a set of recurrence equations as given below: $p_{1, n}*(l + n*u1) = p_{1, n-1}*l + p_{1, n+1}*(n+1)*u1 + p_{2, n}*u2$, $p_{2, n}*(l + n*u1 + u2) = p_{2, n-1}*l + p_{2, ...
3
votes
1answer
51 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
85 views

How to solve this recursive system?

I try to solve the equation system as ...
5
votes
1answer
78 views

Two dimensional recurrence

My actual problem is a bit more complicated, but let us first assume that we have a recurrence relation of the following type $a_{n,l} = a_{n-1,l} + a_{n-1,l-1} + a_{n,l-1}$ The boundary is given, ...
3
votes
1answer
105 views

How can I find the coefficients of the next recursive symbolic function?

I have the following function $$ f(x+3k) = -mf(x+2k)+f(x) $$. If we get $x=x+k$, then $$ f(x+4k) = -mf(x+3k)+f(x+k) = m^2f(x+2k)+f(x+k)-mf(x) $$. Also we obtain the coefficients of the final ...
0
votes
0answers
37 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
44 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 ...
3
votes
1answer
109 views

Finite Difference - heat generation in a square (square within a square)

I am trying to develop a code that will allow me to solve the following problem. Lets say that I have a square block, inside that square block I have a smaller square box thats at a certain ...
8
votes
2answers
193 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. ...
1
vote
1answer
99 views

How do I use RSolve to solve the problem below?

RSolve can't compute the solution. Appears that Mathematica is having a convergence problem. I don't know if the boundary conditions are properly defined... ...
6
votes
6answers
413 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 ...
0
votes
0answers
36 views

RSolve fails on a two equation linear system

I am trying to solve the following recurrence relations \begin{align*} \mu r_2-(-t+|\Delta|)r_4&=0,~~~~~~~~~~~~\mu r_{2k}-(-t+|\Delta|)r_{2k+2}+(t+|\Delta|)r_{2k-2}=0\\ -\mu ...
3
votes
1answer
96 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 ...
1
vote
1answer
250 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 ...
3
votes
2answers
113 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: ...
1
vote
0answers
104 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
0answers
49 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 ...
3
votes
1answer
83 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 ...
1
vote
1answer
77 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. ...
5
votes
2answers
77 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$. ...
2
votes
1answer
120 views

How to solve coupled complex-valued equations faster and get simplified solution

I have six coupled equations. How to solve these equations symbolically faster in Mathematica. In these equations, variables p,q,x,y are ...
2
votes
2answers
157 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: ...
0
votes
0answers
39 views

Recurrence equation [duplicate]

I need to print the first 10 elements from the string which is a solution of a recurrence equation. If there is a 5 in the elements of the string, then that element should not be printed. For ...
1
vote
1answer
52 views
2
votes
3answers
105 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 ...
2
votes
1answer
101 views

Speeding up a differential equation system with nested modulo periodic events

I have the following differential equation system with periodic Events : ...
2
votes
1answer
103 views

Getting the first $n$ terms of a recursion relation

Given a recursion relation, I would like to generate the first $n$ terms (automatically) without having to go term by term. Background Each term is of the form $a_{n}(t)$, that is, $a_{n}$ is a ...
0
votes
3answers
135 views

Delay difference equation

How can I correctly specify and solve a system of delay difference equations in mathematica similar to NDSolve with regard to delay differential equations? For example if I want to "see" the values ...
0
votes
0answers
89 views

Problem using RSolve [on hold]

I'm trying to solve the following recurrence relation: ...
2
votes
1answer
92 views

RSolve and a recurrence relation

In the book An Introduction to the Analysis of Algorithms there is a recurrence relation for the number of compares used in Quicksort algorithm: $$ C_N=N+1+\sum_{0≤k≤N-1}\frac{1}{N}(C_k+C_{N−k−1}) $$ ...
4
votes
1answer
148 views

How can I implement this recurrence equation in Mathematica?

I asked a similar question yesterday but today I realized that I was implementing the wrong function. I have tried changing the implementation but I can't get it to work. Problem: There is a river ...
2
votes
2answers
214 views

How can I express this recurrence function in Mathematica?

\begin{equation} r_{i+1}=r_{i}+V_{i}{\Delta}t \end{equation} Where \begin{equation} V_{i}=(0.01, 0.40) \end{equation} and ${\Delta}t$ is the difference in time. My implementation (this is for ...
1
vote
2answers
145 views

Solving matrix equation

How can I solve the forward equation S[t]=C+A*S[t+1]*(Inverse((I-B*S(t+1)))*A for t=1 to t=10 and ...
0
votes
1answer
81 views

Can't get solution to a system of recurrence equeations

I would be grateful if someone could help me with this problem. I define two series recursively, thus: ...
2
votes
2answers
173 views

RSolve with conditional equation

I have the following conditional equation: $f(n) = 1+2 f(n/2)$ when n is even $f(n) = 1+f((n-1)/2)+f((n+1)/2)$ when n is odd I want to represent this as a conditional equation to be used in ...