Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This question already has an answer here:

Is there a short way to say $f(f(f(f(x))))$?

I know you can use recursion:

$g(x,y)=\begin{cases} f(g(x,y-1)) & \text{if } y > 0, \ \newline x & \text{if } y = 0. \end{cases}$

share|improve this question
3  
I write $f^4(x)$ but you can write anything you want. –  anon Oct 27 '10 at 23:07
add comment

marked as duplicate by Martin Sleziak, Thomas, Andrey Rekalo, Lord_Farin, Seirios Oct 3 '13 at 15:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

up vote 9 down vote accepted

I personally prefer $f^{\circ n} = f \circ f^{\circ n-1} = \dotsb = \kern{-2em}\underbrace{f \circ \dotsb \circ f}_{n-1\text{ function compositions}}$

share|improve this answer
2  
I should probably remark that the LaTeX above contains a dirty dirty hack: the underbrace construct is manually moved to the left with \kern{-2em}. One can only hope that MathJax picks up on the mathtools package and its \mathclap command. –  kahen Oct 27 '10 at 23:49
    
why "n-1 function compositions" instead of n? –  Sparr Oct 28 '10 at 3:13
    
I like this one. It seems quite clear. But Sparr is right, should be n –  Ross Millikan Oct 28 '10 at 3:38
2  
Because if you want $f^{\circ 2}$, you're composing once: $f \circ f$. So the $n-1$ is counting compositions, not how many times it says $f$. –  kahen Oct 28 '10 at 8:30
add comment

Some will say $f^4(x)$. But it becomes confused with the fourth power or fourth derivative of $f(x)$. I'm not sure what you mean here by "piecewise". To me "piecewise" would be something like a step function:

$f(x)=1$ if $x\gt 0$

$f(x)=0$ if $x\le 0$

share|improve this answer
    
Ross, that's what Roman numerals are for! $f^{\mathrm{IV}}$ for differentiation. –  anon Oct 27 '10 at 23:12
1  
@muad Are you being serious? –  muntoo Oct 27 '10 at 23:14
1  
@muntoo, it's called Lagrange notation. –  anon Oct 27 '10 at 23:23
4  
@muad Or you could use $f^{(x)}$ for differentiation, right? –  muntoo Oct 27 '10 at 23:27
3  
@muntoo then it gets dicier. log gets raised to powers, particularly in analysis of computing efficiency, so $log^n$ (though less likely ln) is probably a power. Other functions less so. You just need to read the definition and be careful. Often you can tell from the context, as if we are iterating it will all be about that. –  Ross Millikan Oct 28 '10 at 0:24
show 8 more comments

You should define it this way:

$$ \begin{eqnarray} \text{iterate}_0(f) &:=& id \\ \text{iterate}_{n + 1}(f) &:=& \text{iterate}_{n}(f) \circ f \end{eqnarray} $$

Then write $\text{iterate}_4(f)(x)$.

share|improve this answer
1  
what is the reason for downvoting this please? I'm interested in hearing it if you have some disagreement with this. –  anon Oct 27 '10 at 23:18
1  
@muad I don't see anything wrong with this. Another case where you have to define your terms –  Ross Millikan Oct 27 '10 at 23:30
    
So... what's $id$ supposed to be? –  muntoo Oct 27 '10 at 23:42
1  
id is the identity function, that is, it maps its input to its output. id is f(x)=x for R to R functions, and f(x,y)=(x,y) for R^2 to R^2 functions and so on. –  Paxinum Oct 28 '10 at 7:57
add comment

See "function powers" in Wikipedia "Function composition".

share|improve this answer
2  
And, incidently, the power notation, $f^4(x)$ is different from the fourth derivative which is $f^{(4)}(x)$, so there shouldn't be any confusion. –  PPJ Oct 27 '10 at 23:14
3  
This type of remark (just a pointer to wikipedia or similar) is best as a comment. –  anon Oct 27 '10 at 23:33
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.