# Help forming equation. Constrained extrema.

1. Nov 18, 2011

### Kuma

1. The problem statement, all variables and given/known data

show that for any triangle inscribed in a circle with radius r , the equilateral triangle has the largest perimeter. I'm supposed to use the larangian method.

2. Relevant equations

3. The attempt at a solution

ok so my problem is forming an equation for the perimeter in terms of x and y.

basically the constraint is to maximize perimeter with respect to the circle x^2 + y^2 = r

so if a b c are the sides of the triangle, how can I form an equation for each side with respect to x and y? The distance from the origin to each vertex is r. But I'm not sure how to get an equation for the distance of each side. I just want some hints.

2. Nov 18, 2011

### I like Serena

Pick point 1 at (r,0), point 2 at an angle theta1, and point 3 at an angle theta2.
Now you can calculate the length of the sides as a function of theta1 and theta2...

3. Nov 19, 2011

### Kuma

Hi, thanks for the reply. I'm not sure if this is what you meant but this is what i did.

If i drew a triangle in the circle i noticed that the length of the origin to any vertex of the triangle is R.

So applying that this is what I did, I can basically split the triangle into 3 parts to find each side of the triangle from the law of cosines:

c^2 = a^2 + b^2 - 2ab cos C

For example is c was a side of the triangle I can get its length through R. Here is my bad mspaint interpretation.

http://i.imgur.com/7NMne.png

c^2 = R^2 + R^2 - 2R^2 cos C

and R = x^2+y^2

so i can do that for the other sides as well, and form the perimeter equation

P(a,b,c) = a + b + c

I can now sub in R as x^2 + y^2 in the perimeter equation to get it in terms of x and y, but after doing that and simplifying, then solving it with the larangian with the constraint as x^y + y^2 = R, I dont get an expression for lamda in terms of x and y. All i get is a constant which is in terms of the angles.

Help?

4. Nov 19, 2011

### I like Serena

Oh sorry.
What you got is an expression for which you don't need Lagrangian multipliers, since it does not have a boundary condition any more.
It will work to take the derivative to theta1 and to theta2 of course which both should be zero.

To use Lagrangian multipliers, I think you would need to define for instance (x1, y1) and (x2, y2) as the 2nd and 3rd point of the triangle.
Both need to satisfy your boundary condition.
So you would need to solve for 4 variables and 2 multipliers.

Last edited: Nov 19, 2011
5. Nov 19, 2011

### Ray Vickson

If I were doing it, I would use angles. For inscribed triangle ABC, let t1 be the angle subtended by AB at the center O of the circle. In terms of r and t1, what is the expression for the length of AB? You have angles t2 and t3 associated with sides BC and CA. What is the constraint on angles t1, t2, and t3?

RGV

Last edited: Nov 19, 2011
6. Nov 19, 2011

### Kuma

Hmm, why would (r,0) be the first point of my triangle? There doesn't necessarily have to be a vertex at (r,0) like in my mspaint drawing. I get what you mean for 2 multipliers, I will try that.

7. Nov 19, 2011

### I like Serena

The first point is an arbitrary choice.
Any point on the circle will do.
It seems smart to pick the simplest point there is, which is (r,0).

8. Nov 19, 2011

### Kuma

Okay so the perimeter equation would not involve the angles then right? Using 2 arbitrary points x1,y1 and x2,y2 i got something like this

P(x1,x2,y1,y2,R) = sqrt (x1 - R)^2 + (y1)^2 + sqrt (x1-x2)^2 + (y1-y2)^2 + sqrt (x2-R)^2 + (y2)^2

Edit:

Ok im a bit confused now. When you said two multipliers, how would that work? I'm constraining the perimeter to the circle.

9. Nov 19, 2011

### Kuma

Just noticed this post, isn't that the way i was doing it earlier? the constraint on angles t1,t2,and t3 is that they have to add up to 360 or 2pi?

10. Nov 20, 2011

### Ray Vickson

Well, you did something like it, but I could not understand your sentence about getting a "constant in terms of the angles". I don't know whether you think you have solved the problem, or not. The Lagrangian method, using angles, solves the problem completely. You don't get expressions for x and y (at least, not immediately), but you do get the angles, which is all you need to prove your required result.

RGV

11. Nov 20, 2011

### I like Serena

You have 2 constraints, one for (x1,y1) and one for (x2,y2).

The Lagrange multiplier would be:
$$\Lambda(x_1,x_2,y_1,y_2,\lambda_1,\lambda_2) = P(x_1,x_2,y_1,y_2;R) - \lambda_1 (x_1^2+y_1^2-R^2) - \lambda_2 (x_2^2+y_2^2-R^2)$$

12. Nov 20, 2011

### Ray Vickson

I would very much prefer to work with the Lagrangian
$$L = 2r(\sin(\theta_1/2) + \sin(\theta_2/2) + \sin(\theta_3/2)) - \lambda(\theta_1 + \theta_2 +\theta_3-2 \pi).$$

RGV

13. Nov 21, 2011

### Kuma

I noticed you did this with sin. My larangian involved the angles as well as x and y so I think its wrong because I got stuck with a huge mess of substitutions. I'm wondering how you formed that equation of the larangian. Law of sines?

14. Nov 21, 2011

### I like Serena

RGV used just the definition of the sine, applied to a half-angle.
The resulting r sin(theta/2) is half of an edge.

The resulting formula is nice and simple.
However,
$$L = 2r(\sin(\theta_1/2) + \sin(\theta_2/2) + \sin((2 \pi - \theta_1 - \theta_2)/2))$$
will work even better.
It makes use of the Lagrangian multiplier completely redundant though.

15. Nov 21, 2011

### Kuma

I haven't tried the sine method yet because I was trying the perimeter larangian with two constraints but I got to a weird point now.

so first off when I did the partials I noticed that

fx1 = fy1
fx2 = fy2

that results in solving for g1 from fx1 and fy1 to be the same thing. The same goes for g2 which you can solve for from fx2 and fy2.

when you take the partial fxR, you end up with an equation that includes g1 and g2. If I subsitute those, everything cancels to 0. I'm kind of stuck here.

16. Nov 21, 2011

### I like Serena

Don't take the partial with respect to R.
R is not one of your coordinates, but a constant.

If you're still stuck, perhaps you can show the equations that you got?

17. Nov 21, 2011

### Kuma

right!

but then what do I do here to make a substitution? I have a value for g1 and g2 in terms of the length of the sides (which are in terms of the co ordinates and R). For simplicity I will call a b c the length of the sides. So I got

g1 = 1/a - 1/c
g2 = 1/b + 1/c

how can I use this when I take the partials fg1 and fg2?

I'm trying to show that a = b = c as a maximum.

18. Nov 21, 2011

### I like Serena

Huh?
I do not recognize these equations.
What are g1 and g2?

What is your set of equations?

19. Nov 21, 2011

### Kuma

g1 is lamda1 from your equation. Same for g2.

so when I took the partials and setting them to 0 I get

g1 =[1/2sqrt (x1-R)² + y1²] - [1/2sqrt (x2-x1)² + (y2-y1)²]

g2 = [1/2sqrt (x2-R)² + (y2)²] + [1/2sqrt (x2-x1)² + (y2-y1)²]

20. Nov 21, 2011

### I like Serena

Sorry, I still don't understand what you did, or which partials you took, or what the placement of parentheses should be.