Minimizing a multivariable function

In summary, the conversation discusses finding the shortest distance from the origin to the surface defined by the equation x=yz+10. The person walks through their attempt at solving the problem by setting up a main function and constraint function, taking partial derivatives, and setting up equations to solve for x, y, and z. After encountering some confusion, they realize that lambda=2 does not lead to any solutions, but lambda=-2 does, giving the points (1,3,-3) and (1,-3,3). These points can then be tested to find the shortest distance from the origin to the surface.
  • #1
Yosty22
185
4

Homework Statement



Find the shortest distance from the origin to the surface x=yz+10

Homework Equations





The Attempt at a Solution



So I said that my main function, f(x,y,z) = x^2 + y^2 + z^2 (the function I want to minimize)
Then I said that g(x,y,z) is my constraint function where g(x,y,z) is yz-x=-10. I took the partial derivative with respect to each variable of both g and f. I got fx=2x, fy=2y, fz=2z, gx=-1, gy=z, and gz=y. Once I did this, set fx = λ gx etc. (same format for each partial). This is where I am confused.

My final equations are:
2x + λ = 0 (1)
2y - λz = 0 (2)
2z - λy = 0 (3)
yz - x = 10 (4)

Once I have these, I am confused as to how to solve them properly. What I did so far was solve equation 2 for z. Once I solved for z in terms of y and λ, I substituted it back into equation 3 and got 4y/λ - λy = 0. Multiplying lambda across, I get 4y = λ2y. This shows me that either λ=2 or y=0. Once I get these, for each case I solved and when y = 0, plugging back into equation 2, I get z = 0, and this means that x=10 (equation 4). However, if λ = 2, then by equation 1, x=-1.

My question is:
What should I be looking for here? What do I solve for to answer the question properly?
 
Physics news on Phys.org
  • #2
Yosty22 said:

Homework Statement



Find the shortest distance from the origin to the surface x=yz+10

Homework Equations


The Attempt at a Solution



So I said that my main function, f(x,y,z) = x^2 + y^2 + z^2 (the function I want to minimize)
Then I said that g(x,y,z) is my constraint function where g(x,y,z) is yz-x=-10. I took the partial derivative with respect to each variable of both g and f. I got fx=2x, fy=2y, fz=2z, gx=-1, gy=z, and gz=y. Once I did this, set fx = λ gx etc. (same format for each partial). This is where I am confused.

My final equations are:
2x + λ = 0 (1)
2y - λz = 0 (2)
2z - λy = 0 (3)
yz - x = 10 (4)

Once I have these, I am confused as to how to solve them properly. What I did so far was solve equation 2 for z. Once I solved for z in terms of y and λ, I substituted it back into equation 3 and got 4y/λ - λy = 0. Multiplying lambda across, I get 4y = λ2y. This shows me that either λ=2 or y=0. Once I get these, for each case I solved and when y = 0, plugging back into equation 2, I get z = 0, and this means that x=10 (equation 4). However, if λ = 2, then by equation 1, x=-1.

My question is:
What should I be looking for here? What do I solve for to answer the question properly?

You want all of the possible sets of three values x, y and z that solve all of those equations. You've got one x=10, y=0, z=0. Now just keep following all of the possibilities. And be careful, ##\lambda^2=4## has two solutions. And you've got a typo in equation (4). It should be yz-x=(-10).
 
Last edited:
  • #3
Okay, so I continued with what I was doing before and fixed lambda = 2 to lambda = +/- 2. Doing this, I got three points:
1). (10,0,0)
2). (-1,-1,11)
3). (1,1-9)

Now that I have these points, the question confuses me. The question asks for the shortest distance from the origin to the plane. All of these points are on the plane, so do I use the distance formula to calculate the magnitude of the distance from the point on the plane to the origin?
 
  • #4
Yosty22 said:
Okay, so I continued with what I was doing before and fixed lambda = 2 to lambda = +/- 2. Doing this, I got three points:
1). (10,0,0)
2). (-1,-1,11)
3). (1,1-9)

Now that I have these points, the question confuses me. The question asks for the shortest distance from the origin to the plane. All of these points are on the plane, so do I use the distance formula to calculate the magnitude of the distance from the point on the plane to the origin?

It's not a plane, but yes, you would check those points to find out which minimizes distance. If they were correct. But they aren't. I think you went a little too fast. If ##\lambda=2## can't you conclude ##y=z##?
 
  • #5
Oh, yes I see that. So if y=z, I can change the last equation to y^2-x=-10 when lambda = 2. After that, however, I seem to hit a wall of sorts. So I used equation 1 and lambda = 2 to solve for x. That gives me: 2x+2=0, so x=-1. However, when I plug that back into the equation, it cannot work out correctly. That means I have y^2+1=-10, or y^2=-11, which cannot be right. Any ideas where I'm going wrong?
 
  • #6
Yosty22 said:
Oh, yes I see that. So if y=z, I can change the last equation to y^2-x=-10 when lambda = 2. After that, however, I seem to hit a wall of sorts. So I used equation 1 and lambda = 2 to solve for x. That gives me: 2x+2=0, so x=-1. However, when I plug that back into the equation, it cannot work out correctly. That means I have y^2+1=-10, or y^2=-11, which cannot be right. Any ideas where I'm going wrong?

You aren't doing anything wrong. You hit a correct wall. ##\lambda=2## doesn't lead to any solutions. What about ##\lambda=-2##?
 
  • #7
Okay, so after looking at the points again, I have 3 points. When lambda is 2, y=z, but it doesn't work. However, when lambda = -2, y=-z. Doing some substitutions, I get the points (1,3,-3) and (1,-3,3,). Testing the points (10,0,0) and (1,+/-3,+/-3) I get sqrt (19) and 10 (using the distance formula). This shows that the shortest distance between yz-x=-10 and the origin is sqrt(19), or about 4.36. Does this sound correct?
 
  • #8
Yosty22 said:
Okay, so after looking at the points again, I have 3 points. When lambda is 2, y=z, but it doesn't work. However, when lambda = -2, y=-z. Doing some substitutions, I get the points (1,3,-3) and (1,-3,3,). Testing the points (10,0,0) and (1,+/-3,+/-3) I get sqrt (19) and 10 (using the distance formula). This shows that the shortest distance between yz-x=-10 and the origin is sqrt(19), or about 4.36. Does this sound correct?

Sounds correct.
 
  • Like
Likes 1 person

Related to Minimizing a multivariable function

1. How do you define a multivariable function?

A multivariable function is a mathematical function that depends on more than one independent variable. It can be represented in the form of f(x, y) where x and y are the independent variables and f is the dependent variable.

2. Why is it important to minimize a multivariable function?

Minimizing a multivariable function allows us to find the optimal values of the independent variables that will result in the minimum value of the dependent variable. This is useful in various fields such as economics, engineering, and physics where finding the minimum value is crucial for optimal solutions.

3. What is the process for minimizing a multivariable function?

The process for minimizing a multivariable function involves finding the partial derivatives of the function with respect to each independent variable, setting them equal to zero, and solving for the values of the variables that will result in the minimum value of the function.

4. What are the common methods for minimizing a multivariable function?

Some common methods for minimizing a multivariable function include gradient descent, Newton's method, and the method of steepest descent. These methods use different approaches to iteratively find the minimum value of the function.

5. Can multivariable functions be minimized with constraints?

Yes, multivariable functions can be minimized with constraints. This is known as constrained optimization and involves finding the minimum value of a function while satisfying a set of constraints on the independent variables. This is commonly used in real-world problems where there are limitations or restrictions on the variables.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
592
  • Calculus and Beyond Homework Help
Replies
2
Views
656
  • Calculus and Beyond Homework Help
Replies
7
Views
853
  • Calculus and Beyond Homework Help
Replies
7
Views
957
  • Calculus and Beyond Homework Help
Replies
5
Views
525
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
701
  • Calculus and Beyond Homework Help
Replies
8
Views
380
  • Calculus and Beyond Homework Help
Replies
4
Views
487
  • Calculus and Beyond Homework Help
Replies
26
Views
1K
Back
Top