# Chain Rule Problem!

1. Oct 23, 2005

### dekoi

I have the function:

$$y=\sqrt{x+\sqrt{x+\sqrt{x}}}$$

I need to find separate, smaller functions which will result in the composition of this function.

I tried but all I ended up with was:
$$f(x)=\sqrt{x}$$
$$g(x)=x+\sqrt{x+\sqrt{x}}$$

Therefore, $$y=f(g(x))$$

However, this is obviously a very inefficient way of finding the composition of this function.

Can anyone lead me in the right direction?

2. Oct 23, 2005

### Fermat

$$f(x)=\sqrt{x}$$
$$g(x)=\sqrt{x+f(x)}$$
then,
$$f(g(x)) = \sqrt{x + \sqrt{x}}$$
$$g(f(g(x))) = \sqrt{x + \sqrt{x + \sqrt{x}}}$$

3. Oct 25, 2005

### dekoi

I don't see how that works, Fermat.

If
$$f(x)=\sqrt{x}$$
and
$$g(x)=\sqrt{x+f(x)}$$,
then

$$f(g(x)) = \sqrt{\sqrt{x + \sqrt{x}}}$$

Right?
You are substituting $$g(x)$$ under the squareroot of $$f(x)$$.

4. Oct 25, 2005

### NateTG

If you're applying the chain rule, you'll always be going from the outside in. Can you
clarify what you mean by "obviously inefficient"?

5. Oct 25, 2005

### dekoi

It's inefficient because I'm splitting up my "big" function into a small function and another big function.

Shouldn't my composition functions all be small, simple functions?

Nothing like $$g(x)=x+\sqrt{x+\sqrt{x}}$$

6. Oct 25, 2005

### dekoi

Fermat......... how does what you told me to do work? I don't understand.

7. Oct 25, 2005

### Jameson

I think your way works fine. I have tried but can't find a more elegant way to make the composite right now. You have a simple $$f(g(x))$$ composite. That's easy to take the derivative of.

You could rewrite your g(x) as $$x + f(x+f(x))$$ if you wanted.