Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Compositions - I'm confused

  1. Jan 12, 2007 #1
    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!
     
  2. jcsd
  3. Jan 12, 2007 #2

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    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)
     
  4. Jan 12, 2007 #3
    I think that I follow you - So f o f = f(2n + 1) ??
     
  5. Jan 12, 2007 #4

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

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

    Try the same for the other problems.
     
  6. Jan 12, 2007 #5
    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)
     
  7. Jan 12, 2007 #6

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    Well, you should expand and simplify.

    No. Note that (g o g)(n) is equivalent to writing g(g(n)).
     
  8. Jan 12, 2007 #7
    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:
     
  9. Jan 12, 2007 #8

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  10. Jan 12, 2007 #9


    I'm not sure what you mean by expanding.



    So g o g = 3n -1(3n - 1)(2n + 1) ??
     
  11. Jan 12, 2007 #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
     
  12. Jan 12, 2007 #11
    Whops sorry bout that
     
  13. Jan 12, 2007 #12

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    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, lets 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?
     
  14. Jan 12, 2007 #13
    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?
     
  15. Jan 12, 2007 #14
    For f o g then it would be (2n + 1)=2(3n - 1) - 1
     
  16. Jan 12, 2007 #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.
     
  17. Jan 12, 2007 #16
    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
     
  18. Jan 12, 2007 #17
    And this is just inverted for g o f correct? 3(2n + 1) + 1
     
  19. Jan 12, 2007 #18
    Make shure that the +/- sign after the () is the sign that comes before the 1 in the first equation
     
  20. Jan 12, 2007 #19
    So then f o g is 2(3n - 1) - 1 = 6n - 1

    and g o f is 3(2n + 1) + 1 = 6n + 1
     
  21. Jan 12, 2007 #20
    switch the signs before the last 1 before the equals sign and u will have it
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook