Composing Functions: Solving for f o f, g o g, f o g, and g o f

  • Thread starter Thread starter Bucs44
  • Start date Start date
  • Tags Tags
    Confused
Bucs44
Messages
57
Reaction score
0
Let f and g be functions from the positive integers to the positive integers defined by the equations:

f(n) = 2n + 1, g(n) = 3n - 1

Find the compositions f o f, g o g, f o g, and g o f


So far here is what I've come up with - please point out where I have gone wrong and how to get back on track.

f o f (n) = 2(2n + 1)
g o g (n) = 6n - 1
f o g (n) = (6n + 1)
g o f (n) = (6n) + 1

Any help would be greatly appreciated!
 
Physics news on Phys.org
f o f(n)=f(f(n))=f(2n+1)

Do you see what I'm doing here? You now have to substitute (2n+1) into the equation for f(m)=2m+1 where m=(2n+1)
 
cristo said:
f o f(n)=f(f(n))=f(2n+1)

Do you see what I'm doing here? You now have to substitute (2n+1) into the equation for f(m)=2m+1 where m=(2n+1)

I think that I follow you - So f o f = f(2n + 1) ??
 
Bucs44 said:
I think that I follow you - So f o f = f(2n + 1) ??

Yes, so then f(2n+1)= 2(2n+1)+1. Expand and you'll have the answer.

Try the same for the other problems.
 
cristo said:
Yes, so then f(2n+1)= 2(2n+1)+1. Expand and you'll have the answer.

Try the same for the other problems.

Just so I'm clear - for f o f - I do not need to go any further than what you had above?

for g o g it would be g(f(n)) = g(2n + 1) = 2(3n - 1)
 
Bucs44 said:
Just so I'm clear - for f o f - I do not need to go any further than what you had above?

Well, you should expand and simplify.

for g o g it would be g(f(n)) = g(2n + 1) = 2(3n - 1)

No. Note that (g o g)(n) is equivalent to writing g(g(n)).
 
If done correctly u should get

f o f(n) = 4n + 3
g o g(n)= 9n - 4
f o g(n) = 6n - 1
g o f(n) = 6n + 1


:wink:
 
Jumpy Lee said:
If done correctly u should get

f o f(n) = 4n + 3
g o g(n)= 9n - 4
f o g(n) = 6n - 1
g o f(n) = 6n + 1


:wink:

Hi, Jumpy Lee, and welcome to PF. Please note that we do not give out solutions to questions in homework forums; rather, we attempt to help the original poster to get the answer for himself. In the long term, this will benefit his learning of the topic.
 
cristo said:
Well, you should expand and simplify.No. Note that (g o g)(n) is equivalent to writing g(g(n)).
I'm not sure what you mean by expanding.
So g o g = 3n -1(3n - 1)(2n + 1) ??
 
  • #10
When doing composistions u replace the verable in the outside function with the value of the inside function.

Like g(n) = 3n - 1 so g(g(n)) = 3(3n - 1) -1

Try that on the other compositions
 
  • #11
cristo said:
Hi, Jumpy Lee, and welcome to PF. Please note that we do not give out solutions to questions in homework forums; rather, we attempt to help the original poster to get the answer for himself. In the long term, this will benefit his learning of the topic.

Whops sorry bout that
 
  • #12
Sorry, I might be explaining this too quickly! Let's retrack a bit.

(f o f)(n)=f(f(n)). Now note that f is a function, whereas f(n) is a number. So, if we set f(n)=m, then we can re-write: f(f(n))=f(m).

So, let's look at your functions. f(n)=2n+1; let's denote this by m. Now, f(f(n))=f(m)=f(2n+1). So now, we substitute "2n+1" in place of n in the function of f(n).

Thus f(2n+1)=2(2n+1)+1=4n+3. (That's what I meant by simplify, simply multiply out the brackets!)

Now, let's look at g o g in a similar way: g(g(n))=g(3n-1)=3(3n-1)-1.

The key thing to remember is that, when you have, say g(3n-1) you substitute the expression in the brackets into the formula for g, just like if you had g(m) you would substitute m into the formula for g.

Have I explained clearer this time?
 
  • #13
cristo said:
Sorry, I might be explaining this too quickly! Let's retrack a bit.

(f o f)(n)=f(f(n)). Now note that f is a function, whereas f(n) is a number. So, if we set f(n)=m, then we can re-write: f(f(n))=f(m).

So, let's look at your functions. f(n)=2n+1; let's denote this by m. Now, f(f(n))=f(m)=f(2n+1). So now, we substitute "2n+1" in place of n in the function of f(n).

Thus f(2n+1)=2(2n+1)+1=4n+3. (That's what I meant by simplify, simply multiply out the brackets!)

Now, let's look at g o g in a similar way: g(g(n))=g(3n-1)=3(3n-1)-1.

The key thing to remember is that, when you have, say g(3n-1) you substitute the expression in the brackets into the formula for g, just like if you had g(m) you would substitute m into the formula for g.

Have I explained clearer this time?

I'm following you now for the most part - the only thing that I'm unclear on is for both fof and gog, you have the +1 and -1 at the end of each equation - where does that come from?
 
  • #14
For f o g then it would be (2n + 1)=2(3n - 1) - 1
 
  • #15
The 1 at the end of the equation comes from the function.

in the gog u are replacing the n in the original 3n - 1 with 3n - 1. therefore when 3n - 1 is substuted for n u get the equation 3(3n - 1) - 1.
 
  • #16
Bucs44 said:
For f o g then it would be (2n + 1)=2(3n - 1) - 1

no

fog is the same as f(g(n)) which is f(3n - 1)

now put the 3n - 1 in for n in the f(n) equation
 
  • #17
Jumpy Lee said:
The 1 at the end of the equation comes from the function.

in the gog u are replacing the n in the original 3n - 1 with 3n - 1. therefore when 3n - 1 is substuted for n u get the equation 3(3n - 1) - 1.

And this is just inverted for g o f correct? 3(2n + 1) + 1
 
  • #18
Make shure that the +/- sign after the () is the sign that comes before the 1 in the first equation
 
  • #19
So then f o g is 2(3n - 1) - 1 = 6n - 1

and g o f is 3(2n + 1) + 1 = 6n + 1
 
  • #20
switch the signs before the last 1 before the equals sign and u will have it
 
  • #21
g o f is 3(2n + 1) - 1 = 6n + 1

Thanks for all of your help Cristo and Jumpy Lee - this is a real struggle for me to get my hands on!
 
  • #22
g o f is 3(2n + 1) - 1 = 6n +2

because 3 * 1 - 1 = 3 - 1 = 2
 
Last edited:
  • #23
Bucs44 said:
g o f is 3(2n + 1) - 1 = 6n + 1

Thanks for all of your help Cristo and Jumpy Lee - this is a real struggle for me to get my hands on!
YOu're welcome, but just to clear up:

Bucs44 said:
I'm following you now for the most part - the only thing that I'm unclear on is for both fof and gog, you have the +1 and -1 at the end of each equation - where does that come from?

g(g(n))=g(3n-1)=3(3n-1)-1.

The -1 at the end comes from the fact that the function g(m)=3m-1. (Where I'm using m to avoid confusion). If you just substitute m=(3n-1) into this equation you will obtain g(g(n))=3(3n-1)-1
 
Last edited:
  • #24
No problem
 
Back
Top