1 | initial version |

Hello, @Arnab! I suppose the following is the answer you're looking for. First define $f$:

```
f(x) = x^2 + 1
```

Now compose simply by writing:

```
f2(x) = f(f(x))
f3(x) = f(f(f(x)))
```

As you might guess, $f2$ is the composition $f\circ f$ with itself, while $f3$ is the composition $f\circ f\circ f$.

The same mechanism works for different functions. Let's define

```
f(x) = x^2 + 1
g(t) = t^3
```

Then you can write

```
fg(t) = f(g(t))
gf(x) = g(f(x))
```

The first one will give you $t^6+1$, while the second will give you $(x^2+1)^3$.

I hope this helps!

2 | No.2 Revision |

Hello, @Arnab! I suppose the following is the answer you're looking for. First define $f$:

```
f(x) = x^2 + 1
```

Now compose simply by writing:

```
f2(x) = f(f(x))
f3(x) = f(f(f(x)))
```

As you might guess, $f2$ is the composition $f\circ f$ ($f$ with ~~itself, ~~itself), while $f3$ is the composition $f\circ f\circ ~~f$.~~f$ (three times $f$).

The same mechanism works for different functions. Let's define

```
f(x) = x^2 + 1
g(t) = t^3
```

Then you can write

```
fg(t) = f(g(t))
gf(x) = g(f(x))
```

The first one will give you $t^6+1$, while the second will give you $(x^2+1)^3$.

I hope this helps!

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.