# Max and min value, multi variable (open sets)

#### Petrus

##### Well-known member
Calculate max and min value of the function $$\displaystyle f(x,y)=x^2+y^2-2x-4y+8$$
in the range defined by the $$\displaystyle x^2+y^2≤9$$
Progress:
$$\displaystyle f_x(x,y)=2x-2$$
$$\displaystyle f_y(x.y)=2y-4$$
So I get $$\displaystyle x=1$$ and $$\displaystyle y=2$$ We got one end point that I don't know what to do with $$\displaystyle x^2+y^2≤9$$
If I got this right it should be a elips that x can max be 3,-3 and y 3,-3

Last edited:

#### MarkFL

Staff member
You are correct to first find any critical points in the interior of the region, which as you found is (1,2).

In order to examine $f$ on the boundary of the region, we may represent the circle $x^2+y^2=3^2$ by means of the parametric equations $x=3\cos(t),\,y=3\sin(t),\,0\le t\le 2\pi$. Thus, on the boundary we can write $f$ as a function of a single variable $t$:

$$\displaystyle f(\cos(t),\sin(t))=3^2\cos^2(t)+3^2\sin^2(t)-2\cos(t)-4\sin(t)+8=17-2\cos(t)-4\sin(t)$$

Can you proceed now, differentiating $f(t)$ and equating to zero to find the critical point(s)? And don't neglect the endpoints...

#### Petrus

##### Well-known member
You are correct to first find any critical points in the interior of the region, which as you found is (1,2).

In order to examine $f$ on the boundary of the region, we may represent the circle $x^2+y^2=3^2$ by means of the parametric equations $x=3\cos(t),\,y=3\sin(t),\,0\le t\le 2\pi$. Thus, on the boundary we can write $f$ as a function of a single variable $t$:

$$\displaystyle f(\cos(t),\sin(t))=3^2\cos^2(t)+3^2\sin^2(t)-2\cos(t)-4\sin(t)+8=17-2\cos(t)-4\sin(t)$$

Can you proceed now, differentiating $f(t)$ and equating to zero to find the critical point(s)? And don't neglect the endpoints...
I got to this $$\displaystyle 2(\sin(t)-2\cos(t))=0$$ how do I solve that
Can't I also solve this two way? The way I try to use early?

#### MarkFL

Staff member
You cannot use the extrema of the variables, you want the extrema of the function on the boundary.

Now, to solve the equation you found, first divide through by 2 and rearrange to get:

$$\displaystyle \sin(t)=2\cos(t)$$

What do you think you should do next?

Also, you may find the critical points through use of Lagrange multipliers rather than parametrization, using the boundary of the region as the constraint. I would highly recommend doing both just for practice and insight.

#### Petrus

##### Well-known member
You cannot use the extrema of the variables, you want the extrema of the function on the boundary.

Now, to solve the equation you found, first divide through by 2 and rearrange to get:

$$\displaystyle \sin(t)=2\cos(t)$$

What do you think you should do next?

Also, you may find the critical points through use of Lagrange multipliers rather than parametrization, using the boundary of the region as the constraint. I would highly recommend doing both just for practice and insight.
I would love to solve this as lagrange multipliers as well
rewrite sin(t) as 2cos(t) in our orginal function before we derivate?

#### MarkFL

Staff member
We'll deal with the parametrization method first.

You want to find the value(s) of $t$ which satisfy the equation that resulted from equating the derivative to zero. Now, we could observe that $\sin(t)=2\cos(t)$ implies $y=2x$ (which is what you will find with Lagrange) and plug this into the equation of the circle, but let's solve for $t$ first. What happens if we divide through by $\cos(t)$?

#### Petrus

##### Well-known member
We'll deal with the parametrization method first.

You want to find the value(s) of $t$ which satisfy the equation that resulted from equating the derivative to zero. Now, we could observe that $\sin(t)=2\cos(t)$ implies $y=2x$ (which is what you will find with Lagrange) and plug this into the equation of the circle, but let's solve for $t$ first. What happens if we divide through by $\cos(t)$?
$$\displaystyle \tan(t)=2$$

#### MarkFL

Staff member
Correct. We should be aware that we needn't be worried about division by zero as there is no real value of $t$ such that $\sin(t)=\cos(t)=0$.

Now, in which quadrants will we find solutions for $\tan(t)=2$?

#### Petrus

##### Well-known member
Correct. We should be aware that we needn't be worried about division by zero as there is no real value of $t$ such that $\sin(t)=\cos(t)=0$.

Now, in which quadrants will we find solutions for $\tan(t)=2$?

#### MarkFL

Staff member
Yes, there is a first quadrant solution, but there is another...think of the periodicity of the tangent function.

#### Petrus

##### Well-known member
and second, so first and second ?

#### MarkFL

Staff member
No, the period of the tangent function is $\pi$ units, i.e., $\tan(\theta+k\pi)=\tan(\theta)$. To stay within the given domain of $t$, we let $k=1$, so we will add $\pi$ radians to the first quadrant solution to find we are in which quadrant?

#### Petrus

##### Well-known member
No, the period of the tangent function is $\pi$ units, i.e., $\tan(\theta+k\pi)=\tan(\theta)$. To stay within the given domain of $t$, we let $k=1$, so we will add $\pi$ radians to the first quadrant solution to find we are in which quadrant?
pi is half way (180 degree) and if se are in first quadant and add pi Then we get to third quadant

#### MarkFL

Staff member
Correct!

This means there are first and third quadrant solutions. Can you state the first quadrant solution and how the third quadrant solution relates to this in terms of the $x$ and $y$ coordinates?

#### Petrus

##### Well-known member
Correct!

This means there are first and third quadrant solutions. Can you state the first quadrant solution and how the third quadrant solution relates to this in terms of the $x$ and $y$ coordinates?
What you mean:O? There is a normal tangent function and Then i draw à line in y=2 and it Will hit tan function in y=2 when x is something? I dont know what third quadant got with this problem but i guess y=-2? Hmm is this correct?

#### MarkFL

Staff member
You have the right idea, but if $\tan(t)=2$, then you essentially want to find the points of intersection of the circle and the line $y=2x$.

There are many ways to look at this though, so first let's just work with the first quadrant solution. Can you state this solution?

T=Arctan(2)

#### MarkFL

Staff member
Good, yes $t=\tan^{-1}(2)$. Now, when you plug this value of $t$ into the parametric equations for $x$ and $y$, what do you find?

#### Petrus

##### Well-known member
Good, yes $t=\tan^{-1}(2)$. Now, when you plug this value of $t$ into the parametric equations for $x$ and $y$, what do you find?
$$\displaystyle x=3\cos(\arctan(2))$$
$$\displaystyle y=3\sin(\arctan(2))$$
I am correct?

#### MarkFL

Staff member
Yes, now can you evaluate them, using a right triangle if necessary? Recall you want the side of the triangle opposite the angle $t$ to be 2 and the side adjacent to be 1, then use the Pythagorean theorem to compute the hypotenuse, and finally use the definitions of sine and cosine to complete the evaluations.

While there are simpler ways to go about this, which we will explore next, I think this is good practice.

#### Petrus

##### Well-known member
Yes, now can you evaluate them, using a right triangle if necessary? Recall you want the side of the triangle opposite the angle $t$ to be 2 and the side adjacent to be 1, then use the Pythagorean theorem to compute the hypotenuse, and finally use the definitions of sine and cosine to complete the evaluations.

While there are simpler ways to go about this, which we will explore next, I think this is good practice.
I get hypotenusan to $$\displaystyle \sqrt{5}$$ is that correct?

#### MarkFL

Staff member
Yes, as $$\displaystyle \sqrt{2^2+1^1}=\sqrt{5}$$. Good work!

So, what do you find as the critical coordinates in the first quadrant?

#### Petrus

##### Well-known member
Yes, as $$\displaystyle \sqrt{2^2+1^1}=\sqrt{5}$$. Good work!

So, what do you find as the critical coordinates in the first quadrant?
$$\displaystyle x=\frac{3}{\sqrt{5}}$$
$$\displaystyle y=\frac{6}{\sqrt{5}}$$

#### MarkFL

Staff member
Excellent! Now, what do you find when you let $t=\pi+\tan^{-1}(2)$ to get the 3rd quadrant critical point? And remember to consider the endpoints of the domain for $t$.

Hint: what are $\sin(\theta+\pi)$ and $\cos(\theta+\pi)$ using the angle-sum identities?

Note: I must once again run off for about 4.5 hours, so if anyone else wants to jump in, that's fine. I will check back here first thing when I return, and we can look at some other methods for obtaining these critical points so you can see how they relate.

#### Petrus

##### Well-known member
Excellent! Now, what do you find when you let $t=\pi+\tan^{-1}(2)$ to get the 3rd quadrant critical point? And remember to consider the endpoints of the domain for $t$.

Hint: what are $\sin(\theta+\pi)$ and $\cos(\theta+\pi)$ using the angle-sum identities?

Note: I must once again run off for about 4.5 hours, so if anyone else wants to jump in, that's fine. I will check back here first thing when I return, and we can look at some other methods for obtaining these critical points so you can see how they relate.
Well in third quadrant x and y is negative so $$\displaystyle x=-\frac{3}{\sqrt{5}}$$
$$\displaystyle y=-\frac{6}{\sqrt{5}}$$? I am correct?