# Quadratic equation to find max and min

• Lifeforbetter
In summary: Okay, I'll just provide the summary for now.In summary, the problem is to find the maximum and minimum values of ##f(x, y) = 4x + y^2## subject to the constraint ##2x^2 + y^2 = 4##. There are a few different ways to approach this problem, such as solving for one variable in the constraint and then substituting it into the function, or using Lagrange multipliers. However, there appears to be some confusion with the solutions, as x = 4 and y = undefined are incorrect. It would be beneficial to sketch the ellipse and understand the domain before attempting to solve the problem.
Lifeforbetter
Homework Statement
##2x^2 + y^2 = 4##
Max and min of
##4x + y^2## ?
Relevant Equations
F'(x) = 0
To find critical point
Problem Statement: ##2x^2 + y^2 = 4##
Max and min of
##4x + y^2## ?
Relevant Equations: F'(x) = 0
To find critical point

X = 0 -> y = +- 2
Y =0 -> x = +- ##\sqrt 2##

I input that
Find f(xy) = 4 and f(xy) = +-##4\sqrt 2##

To find with derivative i find both x and y are zero

Last edited by a moderator:
Lifeforbetter said:
Problem Statement: ##2x^2 + y^2 = 4##
Max and min of
##4x + y^2## ?
Relevant Equations: F'(x) = 0
To find critical point

X = 0 -> y = +- 2
Y =0 -> x = +- ##\sqrt 2##

I input that
Find f(xy) = 4 and f(xy) = +-##4\sqrt 2##

To find with derivative i find both x and y are zero
There are a couple of ways to go for this problem. The goal is to find the max. and min. values of ##f(x, y) = 4x + y^2## subject to the constraint ##2x^2 + y^2 = 4##. The constraint means that you're looking for the largest/smallest values of ##f(x, y) = 4x + y^2## for points (x, y) that lie on the ellipse ##2x^2 + 4y^2 = 4##. It might be helpful to sketch the ellipse. Doing so might give you some insight into which points on the ellipse maximize or minimize the function you're working with.

One way is to solve for y in the constraint equation, and then substitute for y in f(x, y). You should then be able to use differentiation to find the max and min values.

Another way is to use Lagrange multipliers, if you know that technique.

Also, you have attempted to use LaTeX markup, but what you did doesn't work on this site. Instead of $\sqrt2$, write this as ##\sqrt 2##, which renders as ##\sqrt 2##. And similar for exponents.

Mark44 said:
There are a couple of ways to go for this problem. The goal is to find the max. and min. values of ##f(x, y) = 4x + y^2## subject to the constraint ##2x^2 + y^2 = 4##. The constraint means that you're looking for the largest/smallest values of ##f(x, y) = 4x + y^2## for points (x, y) that lie on the ellipse ##2x^2 + 4y^2 = 4##. It might be helpful to sketch the ellipse. Doing so might give you some insight into which points on the ellipse maximize or minimize the function you're working with.

One way is to solve for y in the constraint equation, and then substitute for y in f(x, y). You should then be able to use differentiation to find the max and min values.

Another way is to use Lagrange multipliers, if you know that technique.
With Lagrange multipliers i only get one critical point. How to get the other critical point?

Your first attempt involved differentiation. Extreme points can occur at points where the derivative is zero, at points in the domain where the derivative is undefined, or at endpoints of the domain. Because the constraint equation represents an ellipse, there is a domain for the x values to consider.

Mark44 said:
There are a couple of ways to go for this problem. The goal is to find the max. and min. values of ##f(x, y) = 4x + y^2## subject to the constraint ##2x^2 + y^2 = 4##. The constraint means that you're looking for the largest/smallest values of ##f(x, y) = 4x + y^2## for points (x, y) that lie on the ellipse ##2x^2 + 4y^2 = 4##. It might be helpful to sketch the ellipse. Doing so might give you some insight into which points on the ellipse maximize or minimize the function you're working with.

One way is to solve for y in the constraint equation, and then substitute for y in f(x, y). You should then be able to use differentiation to find the max and min values.

Another way is to use Lagrange multipliers, if you know that technique.
what "to solve for y in the constraint" means?
Why Lagrange Method only gets me 1 critical point?

Lifeforbetter said:
what "to solve for y in the constraint" means?
It means to isolate y in the equation ##2x^2 + 4y^2 = 4##.
Lifeforbetter said:
Why Lagrange Method only gets me 1 critical point?
It gives you one value of x, but that corresponds to two y values.

Mark44 said:
It means to isolate y in the equation ##2x^2 + 4y^2 = 4##.
It gives you one value of x, but that corresponds to two y values.
I solve for y in the constraint and substitute it to y at f(xy). Gets me x = 4. But how to find y? I get y = undefined

About Lagrange Method, i get 2 y that is ##\sqrt{1/2}## and ##\sqrt{6/4}## but the answer it's wrong..

Lifeforbetter said:
I solve for y in the constraint and substitute it to y at f(xy). Gets me x = 4. But how to find y? I get y = undefined
x = 4 is obviously wrong. Any point (x, y) has to lie on the ellipse ##2x^2 + 4y^2 = 4##.

Please show what you did to solve for y in this equation.
Lifeforbetter said:
About Lagrange Method, i get 2 y that is ##\sqrt{1/2}## and ##\sqrt{6/4}## but the answer it's wrong..
That's wrong as well. For an example of how to use the technique of Lagrange Multipliers, see https://en.wikipedia.org/wiki/Lagrange_multiplier, examples 1a, 1b, and 2.

Mark44 said:
x = 4 is obviously wrong. Any point (x, y) has to lie on the ellipse ##2x^2 + 4y^2 = 4##.

Please show what you did to solve for y in this equation.
That's wrong as well. For an example of how to use the technique of Lagrange Multipliers, see https://en.wikipedia.org/wiki/Lagrange_multiplier, examples 1a, 1b, and 2.
The domain = {+-##\sqrt2## and +- 2}
When x = +-2 y is undefined
How is the ellipse looks like then?

Lifeforbetter said:
The domain = {+-##\sqrt2## and +- 2}
I think I know what you're trying to say, but this is not a good way to say it.
A better way would be to state the intervals along the x- and y-axes for the equation.

As you wrote above, the domain consists of four numbers, which is not correct.
Lifeforbetter said:
When x = +-2 y is undefined
How is the ellipse looks like then?
Well, do you know how to sketch the graph of an ellipse? In standard form, the equation is ##\frac {x^2}2 + \frac {y^2} 4 = 1##. The standard form provides information about the major and minor semiaxes of the ellipse.

Do you know how to isolate y in the equation ##2x^2 + y^2 = 4##?

Mark44 said:
I think I know what you're trying to say, but this is not a good way to say it.
A better way would be to state the intervals along the x- and y-axes for the equation.

As you wrote above, the domain consists of four numbers, which is not correct.
Well, do you know how to sketch the graph of an ellipse? In standard form, the equation is ##\frac {x^2}2 + \frac {y^2} 4 = 1##. The standard form provides information about the major and minor semiaxes of the ellipse.

Do you know how to isolate y in the equation ##2x^2 + y^2 = 4##?
To isolates y. I think i know. I get x = 1 y = ##\sqrt2##
The domain is the major and minor semiaxes right?
I realized that
Major x-axis = +-##\sqrt2##
Minor y-axis = +-2
Right?
So the critical point is
(0, -2) (0,2) (##-\sqrt2##,0)(##\sqrt2##,0)
So Lagrange Method is to find major x-axis only? I can't find minor axis?

Last edited:
Lifeforbetter said:
To isolates y. I think i know. I get x = 1 y = ##\sqrt2##
No!
All you have done here is to find one point on the graph of the ellipse. To "solve an equation for y," you need to rewrite the equation so that y is on one side of the equals sign, and everything else is on the other side.

For example, solving for y in the equation 2x - y = 5 results in a new equation y = 2x - 5. Both equations are equivalent, meaning that both describe the same set of points.
Lifeforbetter said:
The domain is the major and minor semiaxes right?
No!
Considering the equation as representing a function (which in this case it is not one), the domain is the interval that contains all of the possible x-values.
Lifeforbetter said:
I realized that
Major x-axis = +-##\sqrt2##
Minor y-axis = +-2
Right?
No!
The major axis is 4, and runs along the y-axis. The minor axis is ##2\sqrt 2## and runs along the x-axis.
Lifeforbetter said:
So the critical point is
(0, -2) (0,2) (##-\sqrt2##,0)(##\sqrt2##,0)
No!
These are the vertices of the ellipse. They are useful in graphing the ellipse, but they are not critical points, and really have nothing to do with finding the max or min values of the function ##f(x, y) = 4x + y^2##.
Lifeforbetter said:
So Lagrange Method is to find major x-axis only? I can't find minor axis?
Did you look at the link I wrote in post #9? In it there are several examples of how to use Lagrange multipliers, but you don't need to use that technique in this problem. I mentioned another way back in post #2.

Lifeforbetter
One can set $x = \sqrt{2} \cos \theta$, $y = \sin \theta$ for $\theta \in [0, 2\pi]$ and the constraint $2x^2 + 4y^2 = 4$ is then satisfied automatically.

Mark44 said:
No!
All you have done here is to find one point on the graph of the ellipse. To "solve an equation for y," you need to rewrite the equation so that y is on one side of the equals sign, and everything else is on the other side.

For example, solving for y in the equation 2x - y = 5 results in a new equation y = 2x - 5. Both equations are equivalent, meaning that both describe the same set of points.
No!
Considering the equation as representing a function (which in this case it is not one), the domain is the interval that contains all of the possible x-values.
No!
The major axis is 4, and runs along the y-axis. The minor axis is ##2\sqrt 2## and runs along the x-axis.
No!
These are the vertices of the ellipse. They are useful in graphing the ellipse, but they are not critical points, and really have nothing to do with finding the max or min values of the function ##f(x, y) = 4x + y^2##.

Did you look at the link I wrote in post #9? In it there are several examples of how to use Lagrange multipliers, but you don't need to use that technique in this problem. I mentioned another way back in post #2.
Domain:{-##\sqrt2##, ##\sqrt2##}
Range:{-2,2}
Major axis is on y-axis = 4
Minor axis is on x-axis = 2##\sqrt2##
Vertices (0,-2)(0,2)
The ends point of minor axis is (-##\sqrt2##,0) (##\sqrt2##,0)

I don't have to use Lagrange because the critical points can be seen in the ellipse? That is the x of vertices and the x of end points of minor axis?
So these are the critical points to test
X1 = 1
X2 = 0
X3 = +-##\sqrt2##

Last edited:
pasmith said:
One can set $x = \sqrt{2} \cos \theta$, $y = \sin \theta$ for $\theta \in [0, 2\pi]$ and the constraint $2x^2 + 4y^2 = 4$ is then satisfied automatically.
How to find the angle then?

Mark44 said:
There are a couple of ways to go for this problem. The goal is to find the max. and min. values of ##f(x, y) = 4x + y^2## subject to the constraint ##2x^2 + y^2 = 4##. The constraint means that you're looking for the largest/smallest values of ##f(x, y) = 4x + y^2## for points (x, y) that lie on the ellipse ##2x^2 + 4y^2 = 4##. It might be helpful to sketch the ellipse. Doing so might give you some insight into which points on the ellipse maximize or minimize the function you're working with.

One way is to solve for y in the constraint equation, and then substitute for y in f(x, y). You should then be able to use differentiation to find the max and min values.

Another way is to use Lagrange multipliers, if you know that technique.
So. The 3 method mentioned. At least 2 method applied to get all the x.
Because using differentiation only gets me x=1
And using ellipse graph only gets me x=+-##\sqrt2##
By Lagrange only gets me x = +-##\sqrt2##
But by the Lagrange doesn't give me x=1?

Last edited:
Lifeforbetter said:
Domain:{-##\sqrt2##, ##\sqrt2##}
Range:{-2,2}
Major axis is on y-axis = 4
Minor axis is on x-axis = 2##\sqrt2##
Vertices (0,-2)(0,2)
The ends point of minor axis is (-##\sqrt2##,0) (##\sqrt2##,0)
These are all correct, but when you talk about domain and range, you are talking about a function, and the equation##2x^2 + y^2 = 4## doesn't represent a function. Each x value in the interval ##[-\sqrt 2, \sqrt 2]## pairs with two y values.
Lifeforbetter said:
I don't have to use Lagrange because the critical points can be seen in the ellipse?
You don't have to use Lagrange multipliers because there is at least one other method you can use. Obviously and critical points have to be on the ellipse, but I don't think you can get them merely by inspection.
Lifeforbetter said:
That is the x of vertices and the x of end points of minor axis?
So these are the critical points to test
X1 = 1
X2 = 0
X3 = +-##\sqrt2##
x = 1 and x = ##\pm \sqrt 2## are critical points, but x = 0 is not.

Lifeforbetter said:
So. The 3 method mentioned. At least 2 method applied to get all the x.
Because using differentiation only gets me x=1
And using ellipse graph only gets me x=+-##\sqrt2##
By Lagrange only gets me x = +-##\sqrt2##
But by the Lagrange doesn't give me x=1?
If you use Lagrange multipliers correctly, it does give you x = 1.

Mark44 said:
These are all correct, but when you talk about domain and range, you are talking about a function, and the equation##2x^2 + y^2 = 4## doesn't represent a function. Each x value in the interval ##[-\sqrt 2, \sqrt 2]## pairs with two y values.
You don't have to use Lagrange multipliers because there is at least one other method you can use. Obviously and critical points have to be on the ellipse, but I don't think you can get them merely by inspection.

x = 1 and x = ##\pm \sqrt 2## are critical points, but x = 0 is not.
What is the other method besides Lagrange and without inspection? Since i have to find max and min.
Because Lagrange gives me x=1
Differentiation gives me x=1

From post #2:
Mark44 said:
One way is to solve for y in the constraint equation, and then substitute for y in f(x, y). You should then be able to use differentiation to find the max and min values.
Do you know how to get y isolated in the equation ##2x^2 + y^2 = 4##? It's not clear to me that you are able to do this. If you are able to do so, then replace y in ##f(x, y) = 4x + y^2##, which will give you a function with only one variable. Differentiating that equation gives you a critical point at x = 1, and you can check the two endpoints of the x-interval ##[-\sqrt 2, \sqrt 2]##.

Lifeforbetter
Mark44 said:
From post #2:Do you know how to get y isolated in the equation ##2x^2 + y^2 = 4##? It's not clear to me that you are able to do this. If you are able to do so, then replace y in ##f(x, y) = 4x + y^2##, which will give you a function with only one variable. Differentiating that equation gives you a critical point at x = 1, and you can check the two endpoints of the x-interval ##[-\sqrt 2, \sqrt 2]##.
##2x^2 + y^2 = 4##
##y^2 = 4 - 2x^2##
##f(x, y) = 4x + y^2##
##f(x) = 4x + 4 - 2x^2##
f'(x) = 0
x = 1

Lifeforbetter said:
##2x^2 + y^2 = 4##
##y^2 = 4 - 2x^2##
##f(x, y) = 4x + y^2##
##f(x) = 4x + 4 - 2x^2##
f'(x) = 0
x = 1
Yes.
There are two points on the ellipse associated with x = 1. One of them gives the maximum value for the function of interest. The other point of interest occurs at one of the endpoints of the interval on the x-axis.

Lifeforbetter said:
@Mark44 Thanks for the help
You're welcome!

Mark44 said:
Yes.
There are two points on the ellipse associated with x = 1. One of them gives the maximum value for the function of interest. The other point of interest occurs at one of the endpoints of the interval on the x-axis.
Associated with x =1? The other point of interest occurs at one of the endpoints of the interval on the x-axis not associated with x=1?

Lifeforbetter said:
Associated with x =1?
When x = 1, there are two y values on the ellipse. One of them gives the maximum value for the function you're working with (##g(x, y) = 4x + y^2##), but the other y value doesn't.
Lifeforbetter said:
The other point of interest occurs at one of the endpoints of the interval on the x-axis not associated with x=1?
Keep in mind that you're looking for both the maximum and minimum values for ##g(x, y) = 4x + y^2## for points that are on the ellipse. You need to be sure to check endpoints of the x-interval, not just the critical points that you get from the Lagrange method.

Mark44 said:
When x = 1, there are two y values on the ellipse. One of them gives the maximum value for the function you're working with (##g(x, y) = 4x + y^2##), but the other y value doesn't.
Keep in mind that you're looking for both the maximum and minimum values for ##g(x, y) = 4x + y^2## for points that are on the ellipse. You need to be sure to check endpoints of the x-interval, not just the critical points that you get from the Lagrange method.
x = 1 indeed produces 2 y values. That is ##+-\sqrt2## and both of the y's give the same value for f(xy) that is 6. Don't you agree?
While the end points of interval that gives you different value for f(xy).

This is Lagrange. And i was wrong before. You're right that it does give you x=1. But also x =+-##\sqrt2## don't you agree?

Last edited:
Lifeforbetter said:
x = 1 indeed produces 2 y values. That is ##+-\sqrt2## and both of the y's give the same value for f(xy) that is 6. Don't you agree?
I agree, but you shouldn't write f(xy) if you mean f(x, y). The first is a function of one variable (the product of x and y); the second is a function of two variables.
Lifeforbetter said:
While the end points of interval that gives you different value for f(xy).

This is Lagrange. And i was wrong before. You're right that it does give you x=1. But also x =+-##\sqrt2## don't you agree?
I don't agree that Lagrange produces ##x = \pm \sqrt 2##.
Lifeforbetter said:
The image you uploaded is rotated, and there is a crease running down the page about 1/3 of the way over from the left margin. These make what you wrote difficult to read in places, and impossible to read in some others. Everything you wrote can be done directly in the input pane using LaTeX. There's a link to our tutorial at the lower left corner of the input pane.

Mark44 said:
I agree, but you shouldn't write f(xy) if you mean f(x, y). The first is a function of one variable (the product of x and y); the second is a function of two variables.
I don't agree that Lagrange produces ##x = \pm \sqrt 2##.

The image you uploaded is rotated, and there is a crease running down the page about 1/3 of the way over from the left margin. These make what you wrote difficult to read in places, and impossible to read in some others. Everything you wrote can be done directly in the input pane using LaTeX. There's a link to our tutorial at the lower left corner of the input pane.
##2x^2 + y^2 = 4##
##4x + y^2 = f(x,y)##
##4x + y^2 -\lambda( 2x^2 + y^2 - 4 )##
F(x) = 4 + ## -4\lambda x## =0
x = ##\frac{1}{\lambda}##
F(y) = 2y ##-2\lambda y## = 0
y = 0, ##\lambda## = 1
x = 1 -> y=+-##\sqrt2##
y = 0 -> x=+-##\sqrt2##

Lifeforbetter said:
x = 1 -> y=+-##\sqrt2##
y = 0 -> x=+-##\sqrt2##
OK, those look fine.

Lifeforbetter
##2x^2 + y^2 = 4##
##4x + y^2##

I know you are done with the question, but I wanted to say that lagrange multipliers is not the best for this problem.

Set ##x=\sqrt{2}cos(\theta), y=2sin(\theta)##

So now we need to optimize ##4(\sqrt{2}cos(\theta)+sin^2(\theta) )##

So now we need to optimize ##\sqrt{2}cos(\theta)+sin^2(\theta)##Differentiate it w.r.t ##\theta## we get ## -\sqrt{2}sin(\theta)+2sin(\theta)cos(\theta)=0##Implies ##sin(\theta)=0## or ##cos(\theta)=\frac{1}{\sqrt{2}}##

So max when x=1 and ##y=\sqrt{2}## (so max is 6) and minimum when y=0 and ##x=-\sqrt{2}## (so min is ##-4\sqrt{2}##).

Last edited:
Pi-is-3 said:
##2x^2 + y^2 = 4##
##4x + y^2##

I know you are done with the question, but I wanted to say that lagrange multipliers is not the best for this problem.

Set ##x=\sqrt{2}cos(\theta), y=2sin(\theta)##

So now we need to optimize ##4(\sqrt{2}cos(\theta)+sin^2(\theta) )##

So now we need to optimize ##\sqrt{2}cos(\theta)+sin^2(\theta)##Differentiate it w.r.t we get ## -\sqrt{2}sin(\theta)+2sin(\theta)cos(\theta)=0##Implies ##sin(\theta)=0## or ##cos(\theta)=\frac{1}{\sqrt{2}}##

So max when x=1 and ##y=\sqrt{2}## (so max is 6) and minimum when y=0 and ##x=-\sqrt{2}## (so min is ##-4\sqrt{2}##).
Ok. Thanks. But where can i know to set ##x=\sqrt{2}cos(\theta), y=2sin(\theta)##

Lifeforbetter said:
Ok. Thanks. But where can i know to set ##x=\sqrt{2}cos(\theta), y=2sin(\theta)##

It is very simple. Let us consider ##2x^{2} +y^{2}=4##

Then ##\frac{x^{2}}{2}+\frac{y^{2}}{4}=1##

Here we make the substitution ##\frac{x^2}{2}=cos^2(\theta)## and ##\frac{y^2}{4}=sin^2(\theta)##

And that is how we get it.

Lifeforbetter
Also, if you ever need, ## - \sqrt{a^2+b^2} \leq acos(\theta)+bsin(\theta) \leq \sqrt{a^2+b^2}##

Lifeforbetter

• Calculus and Beyond Homework Help
Replies
1
Views
565
• Calculus and Beyond Homework Help
Replies
2
Views
627
• Calculus and Beyond Homework Help
Replies
4
Views
686
• Calculus and Beyond Homework Help
Replies
27
Views
500
• Calculus and Beyond Homework Help
Replies
9
Views
1K
• Calculus and Beyond Homework Help
Replies
12
Views
944
• Calculus and Beyond Homework Help
Replies
6
Views
730
• Calculus and Beyond Homework Help
Replies
2
Views
674
• Calculus and Beyond Homework Help
Replies
4
Views
844
• Calculus and Beyond Homework Help
Replies
2
Views
254