Hallo thar. I’m new to both Maple and programming. I’ve been searching for a Maple programming introduction online that would allow me to work on the following problem but haven’t turned up anything. Hoping some of you can point me in the right direction.
.
I have two sets of integers {Y1,Y2..Yn} and {B1,B2…Bn}. For each value in the Y set I need to solve a function F(x) for a number of iterations given by the B value corresponding to the Y value (B1 for Y1).
The initial function is F(x) = x*ln((Y+1)/Y)-1.
The solution X1 is the first positive integer to yield F(x) ≥ 1.
Each iteration subtracts the value of F(x) evaluated at the preceding iteration’s X solution from the initial function.
Then repeat this iteration process for all the values in Y1…Yn. The solution set of Xs for each Y value is then merged into a single set {X values for Y1,X values for Y2…X values for Yn}.
.
Example of Iterations
Iteration 1 for Y1
F(x) = x*ln((Y1+1)/Y1)-1
Giving solution X1.
Iteration 2 for Y1
F(x) = x*ln((Y1+1)/Y1) - 1 - F(X1)
Which simplifies to F(x) = ln((Y1+1)/Y1) * [x-X1]
Giving solution X2.
Iteration B for Y1
F(x) = ln((Y1+1)/Y1) * [x-X(B-1)]
Giving solution XB.
Could a moderator remove
Could a moderator remove that junk at the top of my post or is it stuck there?
Fixed
It looks like pasted in your content from word.
To avoid the problem in the future, use the "Paste from Word" button the the MaplePrimes editor, it is 6 from the left and looks like a clipboard with the word logo in front of it.
____
William Spaetzel
MaplePrimes Administrator
Software Developer, Maplesoft
Some hints
You don't really have "sets" in the Maple sense, since the orders seem to be significant: in Maple terminology Y and B could be lists or tables or Arrays. Rather than embedding the index in the name (e.g. Y1), we indicate the index with square brackets (e.g. Y[1]). On the other hand, square brackets are _not_ used for grouping: that's the job of parentheses.
You might also note that (with Q = ln((Y[j]+1)/Y[j]) > 0)
Q*(x-X[k]) >= 1 if and only if x >= X[k] + 1/Q