Optimization, finding two numbers whose sum is minimal

In summary: Thanks So, to create a fraction, you have two options:1. Type [ tex ] \frac {numerator} {denominator} [ /tex ]But without the spaces around "tex" and "/tex". And replacing "numerator" and "denominator" with whatever expressions you want.2. Click on the "Show/Hide Latex Reference" buttom (in the grey box above the post you're composing), find the "Fractions" link, click on it, and follow the instructions there. *phew* I'm glad we're done. Thank you so much! :DIn summary, the conversation discusses how to find the two numbers with
  • #1
Femme_physics
Gold Member
2,550
1

Homework Statement



From all positive numbers x and y that hold y(x+2) = 9 , find the two numbers whose sum x+y is minimal


The Attempt at a Solution



Attached. My idea here is to take the derivative of y with respect to x, and set it equal to zero. This is how I understand you solve for optimization problems and find minima and maxima. Have I set the derivative correctly? I think my idea is correct, but the way I practically approach it isn't.

Will appreciate any hints and directions I can get :)
 

Attachments

  • calculus001.JPG
    calculus001.JPG
    30.9 KB · Views: 436
Physics news on Phys.org
  • #2
You want to minimize f(x,y) = x + y; how can you write f(x, y) = x + y as a function of one variable?
 
  • #3
Be careful, you are not trying to optimize the constraint itself, but rather another function subject to the constraint.

You have two ways to solve it.

You are trying to find the minimum vale of [tex]S(x, y) = x+y[/tex], subject to the constraint [tex]y(x+2) = 9[/tex]. So one way would be to solve for [tex]y[/tex] in the constraint and plug this value into [tex]S(x, y)[/tex], from which you get a function of [tex]x[/tex], which you optimize using differential calculus as you have tried in your attempted solution.

The second way would be to use Lagrange multipliers - I assume you have not taken multivariable calculus yet, so I will not elaborate to confuse you. However, if you have taken multivariable calculus (or are covering it now) or wish to see how the Lagrange multiplier method works, just say it and I'll explain how it's used.

Best of luck. :)
 
  • #4
So the function you would try to optimize is:

[tex]f(x)=x + \frac 9 {x+2}[/tex]

Can you take the derivative of that?

And solve it for being equal to zero? That is: f'(x) = 0
 
  • #5
I like Serena said:
So the function you would try to optimize is:

[tex]f(x)=x + \frac 9 {x+2}[/tex]

Can you take the derivative of that?

And solve it for being equal to zero? That is: f'(x) = 0

Looks like the right idea to me.
 
  • #6
jhae - hint level 1
Metaleer - hint level 2
I Like Serena - hint level 3
Alex - confirms hint level 3

I love you guys ;)


Reading all the replies gave me the clue in. So basically, I try to minimize x+y, and I was given a function that is my constraint. So, all I have to do is rewrite the y in the formula as 9/x+2, that being the constraint, like ILS suggested. Aha! So I did have the right idea of how to solve it!

I'm off the scanner for today, but setting the derivative to zero I did get x=1 and x=-5. Since they said only real numbers, I remove x=-5. Plugging it into the original formula I get y=3. So, answers are, x=1 and y=3

That's true according to the manual! :)

Wait there's one more thing, they're asking for the minimal value of x+y... er...what does it mean? Should I just do... 1+3 = 4?

Because the answers manual says the answer to this question is indeed 4...but it seems like a stupid question.


Anyway, thanks for helping me see it through! :D
The second way would be to use Lagrange multipliers - I assume you have not taken multivariable calculus yet, so I will not elaborate to confuse you.

*head explodes at "Lagrange"*


PS I tried using LaTeX but fudged it. Where is the fraction function?
 
  • #7
Femme_physics said:
PS I tried using LaTeX but fudged it. Where is the fraction function?

To make a fraction, you can just type

\frac{numerator}{denominator}

But don't type "numerator" and "denominator", just put whatever expression you want to go there.

Also, you can click on any LaTeX that you see somebody else has done, and it will show you the code that created it.
 
  • #8
Femme_physics said:
I'm off the scanner for today, but setting the derivative to zero I did get x=1 and x=-5.

:smile:

Femme_physics said:
Since they said only real numbers, I remove x=-5. Plugging it into the original formula I get y=3. So, answers are, x=1 and y=3

That's true according to the manual! :)

They said "only positive numbers", so your conclusion is correct.
(However note that "real numbers" can also be negative.)

Femme_physics said:
Wait there's one more thing, they're asking for the minimal value of x+y... er...what does it mean? Should I just do... 1+3 = 4?

Because the answers manual says the answer to this question is indeed 4...but it seems like a stupid question.

*pout* it's not stupid :wink:

But yes, that is correct :smile:

Femme_physics said:
PS I tried using LaTeX but fudged it. Where is the fraction function?

The fraction function is "\frac".

So you'd type for instance: [ tex ] y = \frac {9} {x+2} [ /tex ]
But without the spaces around "tex" and "/tex".
That way you'll get this:

[tex] y = \frac {9} {x+2} [/tex]

*oooohhh* it's *magic* :cool:

Click on it and you'll get a popup window with more information and with a link to quick reference documentation.
 
Last edited:
  • #9
They said "only positive numbers", so your conclusion is correct.
(However note that "real numbers" can also be negative.)
Oh, right. You're always picking up on my slips, I like that :)



But yes, that is correct

Neat ^^


To make a fraction, you can just type

\frac{numerator}{denominator}

But don't type "numerator" and "denominator", just put whatever expression you want to go there.

Also, you can click on any LaTeX that you see somebody else has done, and it will show you the code that created it.

Click on it and you'll get a popup window with more information and with a link to quick reference documentation.

Sorry-- I mean when I click the "Show/Hide Latex Reference" buttom. Where do I click next? "Boundaries, Logical, Sets"... I don't find the fraction function, it's like finding a needle in a hay sack.
 
  • #10
Femme_physics said:
Sorry-- I mean when I click the "Show/Hide Latex Reference" buttom. Where do I click next? "Boundaries, Logical, Sets"... I don't find the fraction function, it's like finding a needle in a hay sack.

I've lost you.
Where did you find this "Show/Hide Latex Reference" buttom, or this "Boundaries, Logical, Sets"?

The quick reference I meant is here:
https://www.physicsforums.com/misc/howtolatex.pdf

On the first page it says:

Fractions. Use \frac to display fractions. Example: \frac{\pi^2}{6} gives [tex]\frac{\pi^2}{6}[/tex] .

[edit]Hold on, I understand. That's in the advanced edit mode. That one is useful too to find stuff, but it'll take awhile to take it in. I think I'd start with the quick reference.[/edit]

[edit2]And to answer your question, the \frac is in the "Math" section.[/edit2]
 
  • #11
Ah, yes! That's it. Not used to those symbols as I've never written with it before. I'll try to get the hang of it for the sake of our lovely helpers and you. :) Though, I'll also scan when I can. Thanks!
 
  • #12
Femme_physics said:
Ah, yes! That's it. Not used to those symbols as I've never written with it before. I'll try to get the hang of it for the sake of our lovely helpers and you. :) Though, I'll also scan when I can. Thanks!
Personally, I like to see LaTeX better than I like to see scanned material, because 1) the scanned material doesn't appear when you type a response, and 2) one can insert a comment at the precise point where the work went awry.
 
  • #13
Hmm... Good point, Mark44. As long as my work isn't too long I'll consider LaTeX from now on then. Cheers :)
 

1. What is optimization?

Optimization is the process of finding the best possible solution for a given problem. It involves maximizing or minimizing a specific objective function while satisfying certain constraints.

2. How do you find two numbers whose sum is minimal?

To find two numbers whose sum is minimal, you can use a mathematical technique called optimization. This involves setting up an objective function that represents the sum of the two numbers and using mathematical algorithms to minimize this function.

3. What are the most commonly used algorithms for optimization?

Some of the most commonly used algorithms for optimization include gradient descent, genetic algorithms, simulated annealing, and linear programming. The choice of algorithm depends on the specific problem and the type of constraints involved.

4. Can optimization be applied to real-world problems?

Yes, optimization can be applied to a wide range of real-world problems, including engineering, economics, finance, and operations research. It is a powerful tool for finding optimal solutions and improving efficiency.

5. Are there any limitations to optimization?

Although optimization is a useful tool, it also has its limitations. It assumes that the objective function and constraints are well-defined and can be accurately modeled. Additionally, the optimization process may be computationally expensive for complex problems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
14
Views
913
  • Calculus and Beyond Homework Help
Replies
1
Views
555
  • Calculus and Beyond Homework Help
Replies
12
Views
842
  • Calculus and Beyond Homework Help
Replies
14
Views
238
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
459
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
304
  • Calculus and Beyond Homework Help
Replies
3
Views
278
Replies
9
Views
711
Back
Top