# Homework Help: Longtime lurker here, composite function problem

1. Mar 9, 2015

### Poset

1. The problem statement, all variables and given/known data

Let f(g(h(x))) = 1/(2-x)

Find g(x) if:

f(x) = (x^2) - 1
h(x) = 3x+1

2. The attempt at a solution

This is what I have:

g(h(x))^2 -1 = 1/(2-x)
g(h(x) = sqrt((3-x)/(2-x))

I'm not sure how to get the h(x) out of this to leave me with just g(x). Please point me in the right direction.

Thank you!

2. Mar 9, 2015

### pasmith

The obvious thing to do is to set $y = h(x)$ and find $g(y) = g(h(x))$ in terms of $y$.

3. Mar 9, 2015

### Poset

Thank you for your reply. Am I right to assume that the calculations to g(h(x)) I did are correct? And what you are implying is that to get g(x) I need to go backwards from h(x) using the inverse of g(h(x)) and y = h(x) = 3x+1? I'm sorry it's not that obvious to me.

4. Mar 9, 2015

### fourier jr

Your second line isn't far off. Then if you replace x there with y=h-1 you'll get g(y).

5. Mar 9, 2015

### PeroK

You've got:

$g(h(x)) = \sqrt{\frac{3-x}{2-x}}$

Why not take one more step?

$g(3x+1) = \sqrt{\frac{3-x}{2-x}}$

Can you see what to do to finish things off?

6. Mar 9, 2015

### fourier jr

On your last step I see you substituted x with y=3x+1 on the left-hand side, but not the right-hand side. In other words it should be 3-y (etc). Then you should have g(y) but you can set y=x to get g(x). To check your answer calculate f(g(h(x))) & see what you get.

7. Mar 9, 2015

### Poset

Nice I just got this. Thank you all for your help

g(x) = sqrt((10-x)/(7-x))

I spent this entire time trying to figure this out. I really couldn't find any similar examples on the internet.

8. Mar 9, 2015

### Ray Vickson

Do it systematically: $f(g(h(x)) = g(h(x))^2 - 1$ and $g(h(x)) = g(3x+1)$, so $f(g(h(x)) = g(3x-1)^2 - 1$.

9. Mar 9, 2015

### SammyS

Staff Emeritus

Two things to point out to Poset:

First of all; f(x) is not a 1 to 1 function.

So, when you find $g(h(x)) = \sqrt{\frac{3-x}{2-x}}$ , you should include a ± , so you can choose either sign in finding g(x). Thus the choice for g(x) is not unique.

$\displaystyle g(h(x)) = \pm\sqrt{\frac{3-x}{2-x}}$​

Second: The composite function, $\ f\circ g\circ h\$, may have a more restricted domain than the implicit domain of $\ \displaystyle k(x)=\frac{1}{2-x}\$.

Added in Edit: I've been working on this while the recent posts have come in.

Note: $\displaystyle\ \frac{10-x}{7-x}=\frac{x-10}{x-7}$

Last edited: Mar 9, 2015
10. Mar 10, 2015

### SammyS

Staff Emeritus
I thought this might be of interest.

Below is a graph of the composite function y = f(g(h(x))), (in black). The range is restricted to y ≥ -1, because the final function, f, has a range, [-1,∞) .

The missing piece of the graph for y =1/(2-x) is shown dotted in grey.

.

11. Mar 10, 2015

### Ray Vickson

Just as a matter of interest: what package did you use to make the graph?

12. Mar 10, 2015

### SammyS

Staff Emeritus
Ray,

It's called Graph - appropriately enough.

It's not perfect, but usually gets the job done.

13. Mar 12, 2015

### Ray Vickson

Thank you for that.