# Thread: minimise maximise problem

1. ## minimise maximise problem

maximise and minimise x+2y-z st constraint x2 + y2 + z2<=1. Please exp steps, thank you.

2. Originally Posted by fiksi
maximise and minimise x+2y-z st constraint x2 + y2 + z2<=1. Please exp steps, thank you.
Sry, had a mistake... there is z in the end.
Now it can be done, i guess anyone have an idea?

3. if you mean by x2 the square of x then the constraint $\displaystyle x^2+y^2+z^2\leq 1$ determines the unit ball of $\displaystyle \mathbb{R}^3$. The equation $\displaystyle x+2y-z=c$ represent a line for any real number c. So how do you maximize and minimize this c?

4. Originally Posted by tah
if you mean by x2 the square of x then the constraint $\displaystyle x^2+y^2+z^2\leq 1$ determines the unit ball of $\displaystyle \mathbb{R}^3$. The equation $\displaystyle x+2y-z=c$ represent a line for any real number c. So how do you maximize and minimize this c?
Hm... this is what i tried:

1+ lambda 2x = 0
2 + lambda 2y=0
-1 + lambda 2z=0
and x2+y2+z2=1

derivatives of orig function wrt xyz all give some number equal to zero...

5. If I understand well, you want to use the Lagrange multiplier method right. you should notice that the constraint in this methods has to be an equation, not an inequality like here (unless there are some new variation which I don't know). But still i don't understand how did you get the first 3 equations

As I said, you can still solve the problem geometrically. Think of a circle and a line which distance from the origin of you axes in $\displaystyle \mathbb{R}^2$ is parametrized the [tex]c[\math]

6. Originally Posted by tah
If I understand well, you want to use the Lagrange multiplier method right. you should notice that the constraint in this methods has to be an equation, not an inequality like here (unless there are some new variation which I don't know). But still i don't understand how did you get the first 3 equations

As I said, you can still solve the problem geometrically. Think of a circle and a line which distance from the origin of you axes in $\displaystyle \mathbb{R}^2$ is parametrized the [tex]c[\math]
We haven't done this properly, almost at all... u can see i'm trying to combine something, maybe unsucessfully. I tried to diff each function, wrt to xyz so that u have d f/d x + lambda d g/ d x, then with y etc and g =0. with g being constraint.

7. Originally Posted by fiksi
We haven't done this properly, almost at all... u can see i'm trying to combine something, maybe unsucessfully. I tried to diff each function, wrt to xyz so that u have d f/d x + lambda d g/ d x, then with y etc and g =0. with g being constraint.
Which functions are you trying to differentiate ? Could you make your reasoning more explicit so I could understand it easier ?

8. As Tah said, you cannot use the Lagrange multiplier method on an inequality constraint like this.

What you can do is find x, y, z such that $\displaystyle \nabla f= 0$. IF those are inside the ball, that is, if $\displaystyle x^2+ y^2+ z^2< 1$ then that might be a max or min. Here, of course, f(x,y,z)= x+ 2y- z which is linear so $\displaystyle \nabla f= \vec{i}+ 2\vec{j}- \vec{k}$ which is never 0. That means the max and min values must be ON the sphere, not inside it.

Now, there are two things you could do: use the Lagrange multiplier method on $\displaystyle x^2+ y^2+ z^2= 1$ as you have done. Yes, that gives $\displaystyle 1+ \lambda 2x = 0$, $\displaystyle 2 + \lambda 2y=0$, $\displaystyle -1 + \lambda 2z=0$ and $\displaystyle x2+y^2+zk^2=1$. One way I like to handle equations like these, since we really don't want to know $\displaystyle \lambda$ is to divide one equation by another. Since $\displaystyle 2\lambda x= -1$ and $\displaystyle 2\lambda y= -2$, y/x= 2 and y= 2x. Since, also, $\displaystyle 2\lambda z= 1$, z/x= -1 so z= -x. Put y= 2x and z= -x into $\displaystyle x^2+ y^2+ z^2= 1$ and solve for x.

The other thing you could do is write f(x,y,z) ON the surface of the sphere. In spherical coordinates, $\displaystyle x= \rho cos(\theta)sin(\phi)$, $\displaystyle y= \rho sin(\theta)sin(\phi)$, $\displaystyle z= \rho cos(\phi)$. On the surface of this sphere, $\displaystyle \rho= 1$ so $\displaystyle x= cos(\theta)sin(\phi)$, $\displaystyle y= sin(\theta)sin(\phi)$, $\displaystyle z= cos(\phi)$. f(x,y,z)= x+ 2y- z= $\displaystyle cos(\theta)cos(\phi)+ 2\sin(\theta)cos(\phi)- cos(\phi)$. Now minimize that.

9. Originally Posted by HallsofIvy
As Tah said, you cannot use the Lagrange multiplier method on an inequality constraint like this.

What you can do is find x, y, z such that $\nabla f= 0$. IF those are inside the ball, that is, if $x^2+ y^2+ z^2< 1$ then that might be a max or min. Here, of course, f(x,y,z)= x+ 2y- z which is linear so $\nabla f= \vec{i}+ 2\vec{j}- \vec{k}$ which is never 0. That means the max and min values must be ON the sphere, not inside it.

Now, there are two things you could do: use the Lagrange multiplier method on $x^2+ y^2+ z^2= 1$ as you have done. Yes, that gives $1+ \lambda 2x = 0[6/itex], [itex]2 + \lambda 2y=0$, $-1 + \lambda 2z=0$ and $x2+y^2+zk^2=1$. One way I like to handle equations like these, since we really don't want to know $\lambda$ is to divide one equation by another. Since $2\lambda x= -1$ and $2\lambda y= -2$, y/x= 2 and y= 2x. Since, also, $2\lambda z= 1$, z/x= -1 so z= -x. Put y= 2x and z= -x into $x^2+ y^2+ z^2= 1$ and solve for x.

The other thing you could do is write f(x,y,z) ON the surface of the sphere. In spherical coordinates, $x= \rho cos(\theta)sin(\phi)$, $y= \rho sin(\theta)sin(\phi)$, $z= \rho cos(\phi)$. On the surface of this sphere, $\rho= 1$ so $x= cos(\theta)sin(\phi)$, $y= sin(\theta)sin(\phi)$, $z= cos(\phi)$. f(x,y,z)= x+ 2y- z= $cos(\theta)cos(\phi)+ 2\sin(\theta)cos(\phi)- cos(\phi)$. Now minimize that.
Thx, but why is the post garbled? I just see loads od itex itex etc.

10. I went to do my laundry and didn't catch that in time! Some boards use $and$ for LaTex while this board uses [ math ] and [ /math ]. I used the wrong one. You saw it before I had time to edit. It is correct now.