# Composition of Functions (check me)

1. Mar 16, 2009

### Lynne

Hi,

1. The problem statement, all variables and given/known data
Given:$$f(x)=x^2+2$$ and $$g (x)=\sqrt{x}$$

Find: $$f \circ g$$ and $$g \circ f$$

2. The attempt at a solution
$$f \circ g =f(g(x))=x+2$$, where $$x\in (-\infty ; +\infty)$$

$$g \circ f =g(f(x))=\sqrt{x^2+2}$$ where $$x\in (-\infty ;+ \infty)$$

I haven't done this for a while, and I'm not sure about my solution. Is it correct?

2. Mar 16, 2009

### Dick

Almost. Except g(x) is only defined for x in [0,infinity).