Derivative and Numerical approach

Click For Summary

Discussion Overview

The discussion revolves around the numerical methods for finding the maximum of a function f(x) by analyzing its derivative, particularly in the context of complicated trigonometric functions. Participants explore various approaches to solving for the zeros of the derivative and the implications of numerical solutions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Fog37 describes the challenge of isolating x after taking the derivative of f(x) and questions the meaning of solving the problem numerically.
  • Some participants suggest graphing the function and its derivative to approximate the maximum and propose methods like the Newton-Raphson method or binary search for finding zeros.
  • There is a discussion on whether writing a MATLAB routine to search for zeros constitutes using numerical methods, with some arguing that it does.
  • Concerns are raised about the clarity of the original problem statement, questioning whether the goal is to find zeros of the original function or the derivative.
  • It is noted that most non-linear optimization methods do not directly solve for zeros of the derivative but instead use iterative approaches based on initial guesses.
  • Fog37 mentions progress in working with the derivative function as a product of two sub-functions and asks if finding the zeros of these sub-functions guarantees finding the zeros of the entire function.
  • One participant confirms that zeros of multiplied functions are also zeros of the entire function, provided other factors do not go to infinity at the same location.

Areas of Agreement / Disagreement

Participants express differing views on the clarity of the original problem and the methods for solving it. There is no consensus on the best approach to take, and multiple competing views on numerical methods and their applications remain present.

Contextual Notes

Participants highlight the need for clarity in problem statements and the potential limitations of numerical methods in finding exact solutions. The discussion also touches on the assumptions involved in using iterative methods and the behavior of functions at critical points.

fog37
Messages
1,566
Reaction score
108
Hello,

I am dealing with a function f(x) involving various complicated trig functions. I took the first derivative of the function f(x), which is doable, and set it to zero to find the at which value x the function f(x) would be maximum. However, once I have the derivative of f(x), it does not seem possible to isolate x and solve for it...

What does it mean to solve the problem numerically? Does it simply mean taking the function representing the derivative, plugging in a series of x values, and searching for the value(s) that make the function zero?

Thanks
Fog37
 
Physics news on Phys.org
  1. The first step is to make a graph of the function and it's derivative. This will give you an approximate answer for where the maximum is. Then you can apply a method like the Newton-Raphson method to find the value where the derivative is zero. If you have the function programmed into a computer, which you will probably need to do to make a graph, it's also possible to just do a binary search to find the maximum. You take two values on either side of the max, which you can find by looking at the graph, and just keep dividing the interval in half until you find the maximum to the desired accuracy.
 
Thank ou phyzguy.

what if I just plotted the derivative and then wrote a MATLAB routine to search for the zero or lowest value? I wouldn't need to do any numerical method in that case, right?fog37
 
fog37 said:
what if I just plotted the derivative and then wrote a MATLAB routine to search for the zero or lowest value? I wouldn't need to do any numerical method in that case, right?
Matlab is working with numbers here, rather than symbolically finding an answer. By writing a MATLAB routine, you are indirectly using numerical methods to find the zero (or lowest value).
 
fog37 said:
What does it mean to solve the problem numerically?

Is everybody clear as to what the OP means by "solve the problem?" I never saw a statement of what the problem is, so I'm not sure what he wants. Is he looking for a zero of the original function, or something else? Taking a derivative may be useful for applying Newton's method to that, but finding a zero of the derivative is not.
 
Dr.D said:
Is everybody clear as to what the OP means by "solve the problem?" I never saw a statement of what the problem is, so I'm not sure what he wants. Is he looking for a zero of the original function, or something else? Taking a derivative may be useful for applying Newton's method to that, but finding a zero of the derivative is not.
fog37 said:
I am dealing with a function f(x) involving various complicated trig functions. I took the first derivative of the function f(x), which is doable, and set it to zero to find the at which value x the function f(x) would be maximum.
So, he would like to solve for the zeros of the derivative in order to determine the maximum of the original function. In order to do this using Newton, he would have to compute the second derivative numerically or symbolically.
 
Most non-linear optimization methods will not solve for zeros of the derivative of f(x). Instead, they start at a value of x=x0 and use the derivative f'(x0) to direct them to a second guess, x1. The process is repeated at x1 to move to a better x value, x2. The algorithm continues iterating to better values of xn till a termination criteria is achieved.

PS. If the algorithms do not solve for zeros of f'(x), they often do approximate f' with a linear or second order function that they do solve for zero. That can speed up the iterative process.
 
Last edited:
Thank you everyone for the insight.

I have made some progress working on the derivative function which results now to be the product of two sub-functions. By finding the zeros of each sub-function would I also automatically find the zeros of the entire function? In general, are the zeros of the multiplied functions also the zeros of the entire function?
 
Yes, as long as the other factors do not go to infinity at the same location. Multiplying any real number by zero gives a zero.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 53 ·
2
Replies
53
Views
7K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K