A simple question about functions

  • Thread starter potmobius
  • Start date
  • Tags
    Functions
In summary, the function f(x) = 1/(1+x) can be evaluated at different values by plugging them in for x. For example, f(1/x) can be found by plugging in 1/x for x in the original function, resulting in x/(x+1). For f(x+y), the value can be found by plugging in x+y for x in the original function, resulting in 1/(1+x+y).
  • #1
potmobius
49
0
1. Let f(x) = 1/(1+x). What is:
a. f(1/x)
b. f(x+y)





The Attempt at a Solution


Frankly, I have no idea how to do this. But does the first one mean the inverse of the original function? and for the second one, no value for "y" is specified. So I'm lost...
 
Physics news on Phys.org
  • #2
Hi potmobius,

What would you have done if the question instead asked for f(5) or f(0)?

It is no different for these questions. Simply plug in the argument (in this case 1/x and x+y) into where x is.
 
  • #3
How would you find f(1)? Plug in 1 for x. How would you find f(2)? Plug in 2 for x. How would you find f(3)? Plug in 3 for x. So how would you find f(1/x) and f(x+y)?
 
  • #4
okay, i think i understand the f(x+y) part... but i still have some doubt about f(1/x). Do i treat the (1/x) part as just another variable, like y, for instance?
---------------------------------------------------------------
for the f(x+y) part, i did it like this:

f(x+y) = 1/(1+x+y)

is it correct? is that all there is to it?
 
  • #5
for f(1/x) i got f(1/x) = x/(x+1)

is that correct?
 
  • #6
Yes, this is correct potmobius.
 
  • #7
Thanks a lot Coto! That really cleared up things! :biggrin:
 

1. What is a function?

A function is a set of instructions that takes in input values and performs a specific task or calculation, returning an output value. It is a fundamental concept in mathematics and computer science.

2. How do you define a function?

A function is defined using the keyword "function" followed by a name, a set of parentheses for parameters, and curly braces for the function body. For example:
function add(x, y) {
    return x + y;
}

3. What is the difference between a function declaration and a function expression?

A function declaration is a statement that defines a function and can be called anywhere in the code. A function expression is a function that is assigned to a variable or passed as an argument to another function, and can only be called after it has been defined.

4. What are parameters and arguments in a function?

Parameters are variables listed in a function's parentheses that represent the values that will be passed into the function when it is called. Arguments are the actual values that are passed into the function when it is called.

5. Can a function have multiple return statements?

Yes, a function can have multiple return statements. However, once a return statement is executed, the function will stop running and return the value specified. This means that any code after the return statement will not be executed.

Similar threads

  • Calculus and Beyond Homework Help
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
251
  • Calculus and Beyond Homework Help
Replies
8
Views
442
  • Calculus and Beyond Homework Help
Replies
2
Views
526
  • Calculus and Beyond Homework Help
Replies
2
Views
646
  • Calculus and Beyond Homework Help
Replies
1
Views
246
  • Calculus and Beyond Homework Help
Replies
3
Views
551
  • Calculus and Beyond Homework Help
Replies
2
Views
447
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
284
Back
Top