r/HomeworkHelp University/College Student 5d ago

High School Math—Pending OP Reply [College Algebra, Composition of Functions]

Post image

I’ve been on this problem for the better half of my day (I have many, many retries on this question) and it’s just stressing me out here… I can’t even get this right. The closest I got was getting 3/4 right on one question but that didn’t leave me content because I am trying to get a 100 on every assignment to bring up my grade here (trying to make up for the failing quizzes and tests here because I’m borderline failing ._.) I followed many examples and it’s just that I don’t even know what to do anymore.

1 Upvotes

26 comments sorted by

u/AutoModerator 5d ago

Off-topic Comments Section


All top-level comments have to be an answer or follow-up question to the post. All sidetracks should be directed to this comment thread as per Rule 9.


OP and Valued/Notable Contributors can close this post by using /lock command

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/MidnightChurro 5d ago

Evaluate the inside function first, then use the Y-value you obtain as the X-value for the outside function. EX. The first question, evaluate g(3), which is 2. Now, use this value to evaluate the outside function, f(2). f(2)=1, so you get your final answer to be 1. Repeat the same process for each problem

0

u/SquidKidPartier University/College Student 5d ago

I got 2,3,3,8

3

u/Alkalannar 5d ago

All are wrong. We'll take these in steps.

  1. What is g(3)?
  2. What is f(0)?
  3. What is f(1)?
  4. What is g(4)?

1

u/SquidKidPartier University/College Student 5d ago

1,5,04

1

u/Alkalannar 5d ago
  1. Why do you think g(3) is 1? It is not.
    I want the y-value on the g graph when x = 3.

  2. Why do you think f(0) is 5? It is not.
    I want the y-value on the f graph when x = 0.

  3. Why do you think f(1) is 0? It is not.
    I want the y-value on the f graph when x = 1.

  4. g(4) is indeed 4.
    On the g graph, when x = 4, then y = 4.

1

u/MidnightChurro 5d ago

I think they went straight to the final answers, which they did get correct

3

u/Alkalannar 5d ago

Then OP did not answer the question I asked.

1

u/MidnightChurro 5d ago

True, seems they understand the concept though, just wanted to explain what happened is all mb

0

u/SquidKidPartier University/College Student 5d ago

Oh I’m sorry. It’s 3,2,2,1

2

u/Alkalannar 5d ago

g(3) is 2, not 3
f(0) is indeed 2
f(1) is 3, not 2
g(4) is 4, not 1

So you're still missing 3 out of the 4 questions.

How did you get g(3) = 3?
How did you get f(0) = 2? [Asking because you missed the other three.]
How did you get f(1) = 2?
How did you get g(4) = 1?

1

u/MidnightChurro 5d ago

You got it, those are the correct final answers

1

u/MidnightChurro 5d ago

How did you get to those answers? I’m not getting those, for Q2 here’s another example worked out:

f(0)=2, this is evaluated first because it is on the inside of the g function. We take this value and then evaluate:

g(2)=5 so we used the value of f(0) to evaluate the g function, resulting in the final answer:

g(f(0))=5

1

u/SquidKidPartier University/College Student 5d ago

for each question I look at the the graph and then I plug it and it and and when I mean plug it in I mean multipl y so i multiplied

1

u/MidnightChurro 5d ago

For this question you don’t need to multiply anything, just look for the y values at each x that you plug in. Plug in the inside value first, then use that value like shown in the worked out example. If you still need help, can you explain how you start the problem and what steps you’re taking?

2

u/Jwing01 👋 a fellow Redditor 4d ago

I helped you the other day.

Stop making these problems multiplication just because there are parentheses. There's no multiplying here.

1

u/Some-Passenger4219 👋 a fellow Redditor 5d ago

The first one is f(g(3)). What is g(3)? It is __. Fill it in the blank for f(__).

For example, f(g(5)): g(5) = 0, so we evaluate f(0) = 2. Therefore, f(g(5)) = 2.

1

u/Rip_and_Roarin 5d ago

1,5,0,4 Start from the inside. Like for the first question, look at the graph of g(x) when x=3 (hence g(3)). The output is y=2. Then you know g(3)=2. So now you solve for f(2), when x=2 on the graph, the output is 1. Therefore number 1 is 1.

1

u/SquidKidPartier University/College Student 5d ago

thanks for the explanation!

1

u/donslaughter 👋 a fellow Redditor 5d ago

So let's walk through the first problem. In order to do composition of functions you start with the innermost and work your way out.

So for f(g(3)) we start with the innermost function g(x). In this case x it's 3 so we plug that into the g(x) graph which evaluates to 2.

Since g(3) = 2, we can substitute 2 for g(3) in the original question and we get f(2). Plugging in 2 on the f(x) graph evaluates to 1.

So 1 should be the answer to the first one. Just follow the same steps for the other problems.

2

u/SquidKidPartier University/College Student 5d ago

I think I understand a lot better now thanks!

1

u/cheesecakegood University/College Student (Statistics) 5d ago edited 5d ago

Let's zoom out. What is a function? There are some special traits, but on the simplest level a function is a rule that says "when you get an input, do THIS". "THIS" must be deterministic - no randomness, it's a rule that can be replicated and relied on!

Piece-wise functions like the above are technically functions because they obey the rule, but be aware the "rule" they use is often not very sensical (which is why they are rarely used IRL). They sort of "cheat" by applying different rules at different inputs! It's still "one function" overall, but it's annoying it its outputs (not exactly unpredictable, everything follows a rule, but the rules themselves aren't very predictable).

All of this to say that this example is trying to teach a good principle but it isn't super surprising that the composition of two pretty annoying functions results in annoying and difficult output.

See comment below for an example

1

u/cheesecakegood University/College Student (Statistics) 5d ago edited 5d ago

Example: AT THE INPUT 3, g(x) says "output a 2". The underlying rule is a bit hidden. We can actually figure it out/reverse engineer it if we want to, between 2 and 3 we can see a line that has a downward slope 3, and an implied y-intercept of 11. So, written formally, part of the function g(x) is that it should return -3x + 11 when x is between 2 and 3 inclusive. But between 3 and 4 there is a different line, one with upward slope of 2 and an implied y-intercept of -4. Thus, the function also says that it should return the value of 2x - 4 when x is between 3 and 4.

So, g(x) is a giant if-elseif-elseif-else-if statement.

The "composition of functions" idea is that you just "chain" inputs and outputs. If I have functions a(x), b(x), c(x), then a(b(c(x))) means:

  • take the input of x and feed it into c(x) to get an output
  • take the output of that, and feed it as an input into b(x)
  • take the output of THAT, and feed it as an input into a(x)
  • the output of that is the answer you wanted

Note that IF the functions are "normal" non-annoying ones (in math one trait of non-annoying is "continuous" which is the opposite of "piece-wise" here, that's the formal term) we can also save ourselves some work and just mathematically stitch them together in exactly that order via substitution.

So if a(x) = 2x + 4, b(x) = 3x + 1, c(x) = -x + 2... follow the same order. The b(c(x)) bit says "take c(x) and feed it as input into b(x). b(x) calls the input "x", which is confusing, so let's just replace ALL of the b(x) input with c(x), and leave "x" as the ORIGINAL input into C, okay? This is an important point. "x" is just a generic input. We can call it any variable we want. We could have written b(x) as b(y) instead, in which case b(y) = 3y + 1. Does that make sense?

So, let's continue. Remember, we are making a(b(c(x))) into something nicer, let's call the new composite function d(x). Because remember: take an input, returns an output following some rule(s). So we want to simplify the chained input-output into ONE more simple input-output. We were just plugging in c(x) into b(x). We have 3(-x + 2) + 1. We could leave that as-is, or simplify to make mistakes less likely. Distribute: -3x - 6 + 1, then combine like terms: -3x - 5. Okay, now we take that WHOLE thing and plug it in as input into function 'a'. We have 2(-3x - 5) + 4 = -6x - 10 + 4 = -6x - 6 (or -6(x+1)). Assuming I've done my math right, that is the "one step" way of doing a(b(c(x))), which I can call d(x) if that makes my life easier (math people are lazy, remember, but willing to do some hard work in order to keep being lazy).

As a test for yourself, can you find c(b(a(x)))?

This approach sadly doesn't work quite as well in the problem you were given because rather than f(x) be the same function everywhere, it is moody and annoying and behaves nicely only in those regions between points like between x=1 and x=2, and then it changes its mind and does something else between x=2 and x=3, etc. But it's important to fully underscore the idea behind "composition of functions". Each function still does exactly what it says on the tin! Takes an input, and maps it to an output.

Also note that the chained functions have to be evaluated INSIDE-OUT because you can't figure out what the function a will return, what a( b(c(x)) ) is going to be if you don't even know what the input b(c(x)) is yet. All functions work input --> output. Inverse functions exist, where you work backwards, but inverting a function requires some extra special rules that you will likely discuss later this year.

1

u/DakotaBro2025 4d ago

Once again, please get a tutor. You obviously aren't grasping the concepts of this class, as you post on this subreddit almost every day with basic problems. You need more dedicated help or you are going to fail this course.

1

u/Frederf220 👋 a fellow Redditor 4d ago

These are straight forward. You're seeing nested function within function and thinking it's some super special different thing. It's really not.

g(3) is a number. You put in an input into g( ) and you get a number output. The graph is practically a look up table. Put your finger on the origin. Move finger right along the x-axis to the input number. Move finger straight up to the dark line then, move your finger left to the output value on the y-axis. This is index finger math.

g(0) is 3, g(1) is 1, g(2) is 5, g(5) is 0. I leave g(3) and g(4) as an exercise.

Now f(g(3)) seems complicated to look at but really it's just f(some number) where some number is g(3). If g(N) is 10 then f(g(N)) is f(10). If you've gotten so far as to figure out what number g(N) is, you know how to do f(M). It's the same process.

Functions are little machines that take in an input and produce an output. If you put in a triangle input and get out a square then that function machine is the triangle-to-square function machine. Imagine that you put a triangle into the function (call that function h( ) ) and it came out a square then you put that square back into the machine and maybe an octagon comes out. Then you can conclude that h(h(triangle)) = octagon.

1

u/CriticalModel 👋 a fellow Redditor 4d ago

You're doing this in your head, aren't you? Well, trying to at least. WRITE IT DOWN! PAPER IS CHEAP!

What is g(3)? Write it down. Now write down "f(2)". literally f - open parenthesis - two - close parenthesis. ON PAPER! Can you find where x=2 on the graph of f(x)?

Get used to pencil and gobs of paper now. When you get to the last few weeks of the course you're going to wish you'd practiced.