# Tagged Questions

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

80 views

### Sampling a continuous function to create sequence of discrete values

My question is straightforward: How do I convert a continuous function into a discrete-valued function? The function I want to convert is the JacobiAmplitude function: ...
34 views

### solving a non linear (log-linear) recurrence relation

I'd like to solve the recurrence relation \begin{align*} f(n+1) &= 2 f(n)^2 h(n) \\ h(n+1) &= h(n) f(n) \\ f(2) & = h(2) = 2 \end{align*} for an explicit solution for $h$ and $f$. So ...
271 views

### Finite difference method not converging to correct steady state or conserving area?

I am working with the following PDE, which is an advection-diffusion type equation. It describes the movement of a fluid-fluid interface inside an annulus of inner radius $R_1$ and outer $R_2$ under ...
60 views

### Lyapunov Exponent as a function of parameter

I am working at Rossler system and I would like to ask you for some help. This system is described by equations: \begin{array}{ll} \dot{x} = -y - z \\ \dot{y} = x + 0.2y \\ \label{eq:UkladRosSP} \dot{...
185 views

### Solving Recurrence Equation $a_{n+1}=a_n(1-a_n)$

How to solve following recurrence equation $$a_0=2$$ $$a_{n+1}=a_n(1-a_n)$$ I tried: ...
23 views

### Solving recurrence equation depending on a parameter

I have a recurrence relation which depends on a parameter $t$ and I am trying to solve it using RSolve. This is what I typed: ...
249 views

### Dynamical system problem x(t+1) = Ax(t)

I have a problem that have been trying to solve but it's not going so good. I would like some guidelines on how to work myself around this problem: Two neighboring countries spy on each other and ...
292 views

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 ...
93 views

### How to solve this recursive system?

I try to solve the equation system as ...
81 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, ...
108 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 functions,...
39 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: ...
50 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 ...
118 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 ...
202 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. non-...
102 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... ...
415 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 ...
74 views

...
102 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 ...
259 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 ...
133 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: ...
110 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 (...
50 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 ...
86 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 ...
88 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. ...
85 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$. ...
124 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 ...
170 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: ...
53 views

...
106 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 ...
107 views

### Speeding up a differential equation system with nested modulo periodic events

I have the following differential equation system with periodic Events : ...
110 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 ...
148 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 ...
97 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})$$ (...
154 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 ...
$$r_{i+1}=r_{i}+V_{i}{\Delta}t$$ Where $$V_{i}=(0.01, 0.40)$$ and ${\Delta}t$ is the difference in time. My implementation (this is for \${\...