A bunch of functions inside of functions

  • Thread starter EricPowell
  • Start date
  • Tags
    Functions
In summary, to find f'(-1), we can apply the chain rule to the function f(y) = h(g(y)), given that h(2) = 55, g(-1) = 2, h'(2) = -1, and g'(-1) = 7. After finding f'(y), we can evaluate it at y = -1 to find the value of f'(-1).
  • #1
EricPowell
26
0

Homework Statement


Find $$f'(-1)$$, given $$f(y) = h(g(y)), h(2) = 55, g(-1) = 2, h'(2) = -1$$, and $$g'(-1) = 7$$.

Homework Equations


Maybe the chain rule?

The Attempt at a Solution


I thought that I could create a function given that $$g(-1)=2$$, so I thought maybe the function could be $$g(x)=-2x$$. But if I differentiate that, I get $$g'(x)=-2$$, and obviously that doesn't work since putting -1 into $$g'(x)=-2
\\
g'(-1)=-2≠7$$. I don't know what to do.
 
Physics news on Phys.org
  • #2
EricPowell said:
I don't know what to do.

Apply the chain rule to the function ##f(y) = h(g(y))##.
 
  • #3
And after you find f'(y), evaluate f'(-1).
 

Related to A bunch of functions inside of functions

1. What are functions inside of functions?

Functions inside of functions, also known as nested functions, are functions that are defined within another function. These nested functions can access and use variables and parameters from the outer function, making them useful for organizing and reusing code.

2. How do nested functions work?

Nested functions work by being declared within the body of a parent function. When the parent function is called, the nested function is also created and stored in memory. The nested function can then be called and executed within the parent function, and can access variables and parameters from the parent function's scope.

3. What are the benefits of using nested functions?

One benefit of using nested functions is that they allow for better code organization and reusability. By breaking up a complex function into smaller nested functions, the code becomes more manageable and easier to understand. Nested functions also help prevent naming conflicts and can make code more modular.

4. Can nested functions have their own nested functions?

Yes, nested functions can also have their own nested functions. This allows for even more organization and flexibility in writing code. However, it is important to use nested functions sparingly and only when necessary, as too many levels of nesting can make code harder to read and debug.

5. Are nested functions used in any specific programming languages?

Yes, nested functions are commonly used in functional programming languages such as JavaScript, Python, and Ruby. However, they can also be found in other languages such as C++ and Java. The use of nested functions may vary depending on the language's syntax and capabilities.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
279
  • Calculus and Beyond Homework Help
Replies
8
Views
494
  • Calculus and Beyond Homework Help
Replies
7
Views
968
  • Calculus and Beyond Homework Help
Replies
1
Views
779
  • Calculus and Beyond Homework Help
Replies
2
Views
201
  • Calculus and Beyond Homework Help
Replies
10
Views
839
  • Calculus and Beyond Homework Help
Replies
2
Views
902
  • Calculus and Beyond Homework Help
Replies
1
Views
327
  • Calculus and Beyond Homework Help
Replies
3
Views
825
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Back
Top