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

learn more… | top users | synonyms (2)

0
votes
1answer
75 views

How to solve this recursive system?

I try to solve the equation system as ...
3
votes
1answer
102 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 ...
5
votes
1answer
65 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, ...
0
votes
0answers
35 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
37 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 ...
2
votes
3answers
100 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 ...
7
votes
1answer
515 views

Poisson PDE over a irregular region with FDM

The problem modeled by the Poisson PDE is related to the torsion of prismatic beams and I use the Finite Differences Method (FDM). I've managed to solve the equation over a rectangle region with ...
3
votes
1answer
94 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
182 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
92 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
407 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
30 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
76 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 ...
0
votes
0answers
80 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 ...
1
vote
1answer
227 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
83 views
3
votes
1answer
73 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 ...
2
votes
0answers
46 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 ...
7
votes
1answer
215 views
5
votes
2answers
70 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$. ...
1
vote
1answer
72 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. ...
2
votes
1answer
116 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 ...
3
votes
0answers
129 views

An recurrence equation that can be solved in version 7 but not in version 8

Backslide introduced in 8.0, fixed at least in 9.0.1. A friend of mine showed me this code sample: ...
5
votes
2answers
143 views

RSolve gives a Context::ssle error

Bug introduced in 9.0 or earlier and fixed in 10.0 I want to solve the following recurrence equation RSolve[{(k + 2) c[k + 2] q^(k + 1) - c[k] == 0}, c[k], k] ...
2
votes
1answer
130 views

RSolve: Errors while solving Partial Difference Equation

I tried solving following partial difference equation in Mathematica by typing ...
2
votes
2answers
138 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
36 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 ...
0
votes
2answers
110 views

Is this answer true?

I was using Mathematica to get the series solution for Legendre equation. But when I get the recurrence relation and use RSolve: ...
2
votes
1answer
96 views
2
votes
1answer
96 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
127 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
79 views

Problem using RSolve

I'm trying to solve the following recurrence relation: ...
2
votes
2answers
208 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 ...
4
votes
1answer
143 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
1answer
83 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}) $$ ...
1
vote
2answers
129 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
78 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
143 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 ...
0
votes
1answer
64 views

Recurrence evaluation at specific index

I have the following set of equations. I want to solve a[n] and f[n] for the indices n=1:5. Note that the relation a[2n+2] involves the derivative of f[2n] and the relation for f[2n+2] involves the ...
4
votes
1answer
329 views

Mathematica 10 issue: working with Entities slows down recurrence equations [duplicate]

I was looking at the Mathematica code given at http://community.wolfram.com/groups/-/m/t/326240 where example code is given to simulate the spreading of a supposed Ebola outbreak in Nigeria: ...
0
votes
1answer
36 views
2
votes
3answers
126 views

Computing a sequence by recurrence

I am trying to create a list where each element of the list is calculated using the sum of all previous elements of the list and also uses the $N$th element of another list. The initial value of the ...
1
vote
1answer
96 views

Computing a Sequence using Recurrence

I posted a similar question earlier today, but unfortunately I realized after several hours that I over-simplified the problem for this forum. There is a very good answer to the Computing a sequence ...
1
vote
2answers
59 views

RecurrenceTable - does it have a solution search option like FindRoot?

I have a second-order non-linear difference equation like $$0=f(x_{t+2},x_{t+1},x_t)$$ where $x_{t+2}$ is implicitly determined. I have tried the code like ...
0
votes
1answer
470 views

Solving recurrence relationship using iteration

I am trying to create a Mathematica function that basically splits up a continuous function (in this case a physical potential) into steps (strips as it were) and returns the value of the function at ...
0
votes
0answers
186 views

plotting the stable and unstable manifolds of a difference equation

I have a 2D non-linear system of difference equations for variables x and y defined as follows: ...
3
votes
3answers
153 views

Tangled up in sequences and recurrence relations

I took a trip through sequences and recurrence relations and I got tangled up since the documentation didn't help much. I'm sure you can. Given a sequence ...
3
votes
2answers
397 views

Nonlinear recurrence relation

I entered the following recurrence relation into RSolve and it just gave the question back to me. $$a_{n+1} = \frac{(1+a_n +(a_{n−1})^3)} 3$$ Is there another way to get a formula for the nth term?