I am struggling so much with optimization.

In summary: But there's one more thing you have to do: find the path from one peak to another. That's where the calculus comes in. You have to figure out how to get from x_1 to x_2. You can do this in a few different ways, but the simplest is to take the derivative of f(x_1) with respect to x_2: If you're trying to find a minimum, the value of x_2 you should take the derivative of with is x_min. If you're trying to find a maximum, the value of x_2 you should take the derivative of with is x_max. If you're trying to
  • #1
Zill1
24
0
Is anyone able to give me some pointers. I am trying to brush up on my calculus I for my next calc class and I can't grasp optimization. I hated it then and I hate it now. I can do everything else in calculus I except this and it's so irritating. I can learn every integration rule in Calc I in a day but it's been a week and I am still not able to look at a blank question and buckle down and answer it. I understand (but haven't memorized) the formulas but when it gets to it and I see the work being done I just get lost. Is there a step-by-step system people use for solving these?
 
Physics news on Phys.org
  • #2
Write the function you want to optimize, take the derivative with respect to the variable you want optimize, set it equal to zero.
 
  • #3
Yes, that is one type of optimization. Optimization is a collection of techniques. Like a subject rather than a formula. It's about finding "optimum" values of a function.

The best way to see what you are doing is is to graph the problem and solution. You have to understand what the optimization excercise is going to really do before you do it. Are you looking for a minimum of the function? Are you looking for the "x" that makes the function minimum but don't care what the function value is there? Are you looking for where the function is a maximum? Etc. Understand the meaning of the optimization question first. Then start looking for the right solutions. It will go from a painful chore into a cool puzzle.
 
  • #4
Zill1 said:
Is anyone able to give me some pointers. I am trying to brush up on my calculus I for my next calc class and I can't grasp optimization.

Can you provide an example problem that is causing you trouble?
 
  • #5
I read the title as I'm struggling so much with optimism. I thought maybe it was a cry for help.

Apologies. Carry on. :biggrin:
 
  • #6
Optimization is finding which value(s) of x maximize (or minimize) a function f(x).

Given a number x, it's easy to find f(x). If you have two numbers, x1 and x2, you can tell which of f(x1) and f(x2) is bigger. But how can you find x_max, where f(x_max) >= f(x) for all other values for x?

The answer is found in calculus. The intuition is pretty simple. Let's talk mountains instead of functions. Mountains have little peaks and valleys. As you scale a mountain, your elevation rises and falls.

You can feel when you're ascending and when you're descending. You close your eyes. Is it possible to tell when you've reached a peak on the mountain?

The answer is yes, and here's how. Just before you reach the peak, you can feel you are ascending. Just after you step off the peak, you can feel you are descending. In other words, you make a transition from ascending to descending.

Let's relate it back to calculus. The lateral distance (longitude or latitude, your choice) you've traveled across the mountain is x. Your altitude is f(x). The mountain is the graph of the function.

Your eyes being closed is indicative of the fact you only know the value of f where you are standing. (You can't "look" at nearby parts of the mountain for reference... and you don't need to).

Ascending and descending are related to your derivative. When you're ascending, you have a positive derivative. When you're descending, you have a negative derivative.

So the "peak" of a function is when the sign of the derivative changes from positive to negative. And the only way for it to be able to do that is by going from positive to zero to negative. So the first step of looking for maximums is to look for the zeroes of the derivative.

In notation, what you're trying to solve is: f'(x) = 0.

Now, f' (for first and second year calculus) is going to be something simple -- usually a polynomial. Finding the zeroes of a polynomial is the most important topic you learn about in algebra.

Once you find the zeroes of f', you're half way there. You can name the zeroes x1, x2, ..., xN (there might be multiple zeroes, there might be one... sometimes there are none at all).

The next step after finding the zeroes is making sure that you are in fact going from positive to negative. It's entirely possible for a function's derivative to go from negative to positive instead -- in this case, you have found a valley, not a peak (a minimum, not a maximum). You can also have negative to negative and positive to positive, or from zero to zero (these are all different kinds of plateau-ish things).

Up to this point, you're almost done. You've identified all the peaks of your function. But often what you want to find isn't just "any peak", but rather, you want the TALLEST peak. The summit of the mountain. This is usually as easy as comparing all the peaks you found and seeing which is the biggest.

There are some sneaky cases I've glossed over. A function could have multiple summits that are all the same height (sin x has an infinite number of maximums, for example). Other functions have no peaks (f(x) = x^2 only has a valley, but no peaks, f(x) = x^3 has neither). Everything I said above applies only to "well behaved" functions that you'll find in physics classes. (Mathematicians have more precise rules, and they can invent functions which "technically" obey the rules, but break our expectations).

Good luck!
 
  • #7
Zill1 said:
...Is there a step-by-step system people use for solving these?

I would advise you to resist cook-book ways of solving problems. That's not what calculus is about. Students typically struggle with word-problems and that's what most optimization problems are. Anyone can find derivatives...after while it's not even interesting. What you can DO with them...that's what's interesting.
 

1. What is optimization?

Optimization is the process of finding the best solution or achieving the best outcome for a given problem or task. It involves maximizing or minimizing a certain objective while considering various constraints and limitations.

2. Why is optimization important?

Optimization is important because it allows us to improve efficiency and effectiveness in various fields such as engineering, economics, and computer science. It can help us save time, resources, and money while achieving better results.

3. What are some common techniques used for optimization?

Some common techniques used for optimization include linear programming, gradient descent, simulated annealing, and genetic algorithms. These techniques involve finding the optimal solution through mathematical calculations and algorithms.

4. What are some challenges in optimization?

One of the main challenges in optimization is the complexity of the problem. Many real-world problems involve multiple variables, constraints, and objectives, making it difficult to find the optimal solution. Another challenge is the trade-off between speed and accuracy, as finding the optimal solution may require a significant amount of time and computational resources.

5. How can I improve my optimization skills?

To improve your optimization skills, it is important to have a strong background in mathematics and programming. It is also helpful to practice solving different types of optimization problems and familiarize yourself with various techniques and algorithms. Collaborating with other experts in the field and staying updated on the latest developments can also help improve your optimization skills.

Similar threads

  • Calculus
Replies
3
Views
2K
Replies
13
Views
2K
  • Science and Math Textbooks
Replies
13
Views
2K
  • STEM Academic Advising
Replies
16
Views
2K
  • Calculus
Replies
15
Views
3K
  • STEM Academic Advising
Replies
17
Views
2K
  • STEM Academic Advising
Replies
22
Views
4K
Replies
3
Views
2K
Replies
1
Views
72
  • Science and Math Textbooks
Replies
8
Views
4K
Back
Top