Solving Composite Functions with Simple Examples

  • Thread starter Peter G.
  • Start date
  • Tags
    Function
In summary, the conversation is about a person who was doing exercises on composite functions and got all the questions right except for one. They are not sure how to solve the problem and are confused about whether to substitute 1 into x or expand the function. They mention that the book's answer may be wrong and ask for clarification. The other person suggests two possible solutions and the conversation ends with the first person thanking them for their help.
  • #1
Peter G.
442
0
I was doing some exercises on composite functions and I got all of the questions right but I can't figure this one out! :cry:

gf (1) where g = x2 and f = 2x + 1

So, (2x + 1)2

Now I don't know if I sub 1 into x already or if I expand, but, anyhow, I don't know how the book got 1 as an answer!

Thanks,
Peter G.
 
Physics news on Phys.org
  • #2
Maybe the book answer was wrong!:redface:
 
  • #3
Yes, I think so! :tongue:

So, what is right: (2x + 1)2 then, therefore, 2 + 1 = 3, and 32 = 9

or: (2x + 1)2 = (2x + 1) (2x + 1) = 4x2 + 4x + 1, then, sub 1?

Thanks,
Peter G.
 
  • #4
:smile:
Whatever !
 
  • #5
Ok, thanks for the help! :smile:
 

1. What is a simple function?

A simple function is a block of code that performs a specific task and returns a value. It takes in input parameters and produces an output based on those parameters. Simple functions are commonly used in programming to break down complex tasks into smaller, more manageable parts.

2. How do I write a simple function?

To write a simple function, you first need to define the function name, input parameters, and return type. Then, you can write the code inside the function body to perform the desired task. Finally, use the return statement to specify what value the function should return.

3. What is the difference between a simple function and a complex function?

A simple function performs a single, well-defined task and returns a value, while a complex function performs multiple tasks and may have multiple return statements. Simple functions are easier to understand and maintain, while complex functions can be more difficult to debug and modify.

4. Can a simple function call another function?

Yes, a simple function can call another function. This is known as function nesting or function composition. It allows for more complex tasks to be broken down into smaller, simpler functions, making the code more organized and easier to understand.

5. What are some examples of simple functions?

Some examples of simple functions include calculating the area of a circle, converting temperature units, and checking if a number is prime. These functions perform a specific task and return a value based on the input parameters provided.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
10
Views
836
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
13
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
3K
  • Precalculus Mathematics Homework Help
Replies
13
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
774
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top