Dear All,



I would appreciate if someone could give any hint/ provide a solution if
it's possible in R to create such a function where many similar
mathematical expressions organized in a given way.

For example, to create a function: f(x)=(...(((x^x)^x)^x)...^x)^x (x is
encountered n times). Or another example:
g(x)=sin(x)*sin(x^2)*sin(x^3)*...*sin(x^n).


When we are interested in a computation of any specific value of that
function given a particular value of x, there is no any issue, and
corresponding function value is computed in a straightforward way. For
example of f(x) defined above:

f<-function(x, n) {

p<-x

for (i in 1:n) {

p<-p^x

}

print(p)

}



The issue is when we want to use a function "in general" with no particular
x given.


The whole question can be converted to a very short question (solution for
which one is assumed to be a solution for primary question):

- to integrate a function  f(x)=(...(((x^x)^x)^x)...^x)^x (x is encountered
n times) on the interval (0,1).



Thanks a lot in advance for any ideas.

I really believe that this doable with R syntax.



Best Regards,

Yuriy

	[[alternative HTML version deleted]]

