Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
LREtools[REtoproc] - convert a recurrence into a procedure
Calling Sequence
REtoproc(problem, options)
Parameters
problem
-
options
optional arguments described below
Description
This procedure returns a Maple procedure that, given a non-negative integer n as input, gives the nth term of the linear recurrence.
If the argument 'remember' or 'remember'=true is specified, then the procedure will compute the sequence via a recursive procedure using option remember. By default, 'remember'=false and the sequence is computed iteratively.
The argument 'remember' should be given when one needs a large number of values of the sequence.
When 'remember'=false and the coefficients of the recurrence are nonconstant polynomials, the returned procedure will run in a straight loop, using a linear number of arithmetic operations and without wasting extra space.
When 'remember'=false and the coefficients are constant, the procedure will employ a binary-based optimization strategy (for large index values only), and runs with a logarithmic number of arithmetic operations. This optimization can be disabled by specifying constantoptimize=false.
When 'remember'=false, by default the initial terms of the recurrence are embedded in the code. This can be changed to put the initial terms of the recurrence in the remember table by specifying initialremember=true.
When the first terms of the recurrence are not explicitly supplied, they are represented symbolically.
The command with(LREtools,REtoproc) allows the use of the abbreviated form of this command.
Examples
fib := REtoproc(f(i)=f(i-1)+f(i-2),f(i),{f(0)=0,f(1)=1});
fib2 := REtoproc(f(i)=f(i-1)+f(i-2),f(i),{f(0)=0,f(1)=1},'remember');
rec := REtoproc(f(i)=i^2*f(i-1)+f(i-2),f(i),{},'remember');
See Also
LREtools[REcreate], RESol, rsolve
Download Help Document