In Maple there is a program that should display all values ​​from 1 to n by the formula. But the program displays only the last value. I have already tried to do all sorts of simplest programs in the maple and none of them displays all the values ​​of the cycle, but only the last. I only know that if you write down the necessary values ​​for output through whom, then it outputs norms. But it is terribly uncomfortable and cumbersome. If anyone knows, please help.

y1 := proc (n) local i, y, x; y[-1] := 0; y[0] := 1; for i from 1 to n do y[i] := y[i-1]+a(i)*x[i]*y[ni] y[i]; end do; end proc; 

    1 answer 1

    Recently, I myself faced this problem, I work with a maplet and I will also show an example for a maplet. For this, I used seq for example:

     y1:=proc(n,x,a) global y2: local i, y1, y; y1[-1] := 0; y1[0] := 1; for i from 1 to n do y1[i] := y1[i-1]+a(i)*x[i]*y1[ni]: y2:=<seq(y[i],i=1..n)> = <seq(y1[i],i=1..n)>: end do; return : end: ["Выведим y:", [MathMLViewer['Z_5_10'](100..250),Button("найти",Evaluate('Z_5_10'=' [y1(n,x,a), y2] '))]], 

    The result will be displayed as a matrix. The output will be of type

     > y[1]=3.333 > y[2]=3.433 > y[3]=3.533 

    y [i] is our symbol (y [1], y [2] and so on), and y1 [i] is exactly the value you need (3.333,3.433) This matrix is ​​assigned to y2 which we derive