What Happens When a Function is Invoked with a Negative Argument?

  • Thread starter zak100
  • Start date
  • Tags
    Function
In summary: Find the value of y for x=-1 from the graphtherefore y=2Now f(f(-1)) = f(2)Find the value of y for x=2 from the graphtherefore y= 1Therefore y=1.This is correct.
  • #1
zak100
462
11

Homework Statement


I am trying solve a question which invokes a function f(…) and the argument of function is the same function with -1 as an argument i.e.

f(f(-1))

However the statements of the function are not provided. Instead a graph is provided which is uploaded. I can't understand which variable of the graph i.e. x or y will get this value of -1?

Somebody please guide me?

Homework Equations


f(f(-1))

The Attempt at a Solution


I can't understand what would happen when function f(-1) is invoked. What statements would be executed? Which variable of the graph would get -1?Somebody please guide me.
Zulfi.
 

Attachments

  • function without statement etsp181.jpg
    function without statement etsp181.jpg
    19.6 KB · Views: 414
Physics news on Phys.org
  • #2
zak100 said:

Homework Statement


I am trying solve a question which invokes a function f(…) and the argument of function is the same function with -1 as an argument i.e.

f(f(-1))

However the statements of the function are not provided. Instead a graph is provided which is uploaded. I can't understand which variable of the graph i.e. x or y will get this value of -1?

Somebody please guide me?

Homework Equations


f(f(-1))

The Attempt at a Solution


I can't understand what would happen when function f(-1) is invoked. What statements would be executed? Which variable of the graph would get -1?
Find ##f(-1)##.
zak100 said:
Somebody please guide me.
Zulfi.
 
Last edited by a moderator:
  • #3
zak100 said:

Homework Statement


I am trying solve a question which invokes a function f(…) and the argument of function is the same function with -1 as an argument i.e.

f(f(-1))

However the statements of the function are not provided. Instead a graph is provided which is uploaded. I can't understand which variable of the graph i.e. x or y will get this value of -1?

Somebody please guide me?

Homework Equations


f(f(-1))

The Attempt at a Solution


I can't understand what would happen when function f(-1) is invoked. What statements would be executed? Which variable of the graph would get -1?

Somebody please guide me.
Zulfi.
Your figure:
function-without-statement-etsp181-jpg.jpg

I suppose the graph is to be interpreted as being y = ƒ(x) .

Is that how such graphs tend to be treated in your course/book ?
 
  • Like
Likes zak100
  • #4
How do you simplify expressions like 5+(3*(4-1))? You start from the inside.
To evaluate f( f(-1) ), first find f(-1).
 
  • #5
zak100 said:
However the statements of the function are not provided.
You don't need the function definition, since you have a graph of the function.

Follow the suggestion made by @Buffu.
 
  • #6
Hi,
Thanks.
I suppose the graph is to be interpreted as being y = ƒ(x) .

Reference https://www.physicsforums.com/threads/function-without-statement.916696/
Based upon this rule:
y=f(-1)
Find the value of y for x=-1 from the graph
therefore y=2
Now f(f(-1)) = f(2)
Find the value of y for x=2 from the graph
therefore y= 1
Therefore answer of f(f(-1)) is 1.

This is correct.

Zulfi.
 
  • Like
Likes mfb and SammyS
  • #7
zak100 said:
y=f(-1)
Find the value of y for x=-1 from the graph
therefore y=2
Now f(f(-1)) = f(2)
Find the value of y for x=2 from the graph
therefore y= 1
Therefore f(f(-1)) is 1.
Your answer is correct, but you're writing a lot more than is necessary.
This is how I would do it.

From the graph, f(-1) = 2, and f(2) = 1,
so f(f(-1)) = f(2) = 1.​
 
  • #8
Hi,
Thanks for improving my solution. God bless you.

Zulfi.
 

What is a function without a statement?

A function without a statement is a function that does not have any code or instructions inside its curly brackets. This means that the function does not perform any specific action and only returns a value or undefined.

Why would you use a function without a statement?

One reason to use a function without a statement is to create a placeholder or template for a future code. This can be useful when writing a program that is still in development, as it allows you to define functions without worrying about their implementation.

Can a function without a statement be called?

Yes, a function without a statement can be called like any other function. However, since it does not have any code inside, it will not perform any action and will only return a value or undefined.

What is the difference between a function without a statement and a function without a return statement?

A function without a statement does not have any code or instructions inside its curly brackets, while a function without a return statement may have code but does not explicitly return a value. In both cases, the function will return undefined.

Can a function without a statement still have parameters?

Yes, a function without a statement can have parameters, just like any other function. However, since it does not have any code inside, the parameters will not be used for any specific action and will only be placeholders for potential future code.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
15
Views
648
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
402
  • Precalculus Mathematics Homework Help
Replies
10
Views
614
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
5K
Back
Top