X = p * y. Find x, y when both are as close to 1 as possible

  • Thread starter simplex1
  • Start date
In summary, given the equations x = p * y where p = (0, 1] and x, y = (0, 2], the goal is to find values for x and y that are as close as possible to 1 simultaneously. The suggested solution is x = 1/y = sqrt(p), but the proof is unknown. The conversation also discusses using Lagrange multipliers to minimize a function with a given constraint.
  • #1
simplex1
50
1
Knowing that:

x = p * y where p = (0, 1] and x, y = (0, 2]

find x and y in such a way that both of them be as close as possible to 1 simultaneously.

I guess that the solution is x = 1/y = sqrt(p) but I do not know how to prove it.
 
Mathematics news on Phys.org
  • #2
simplex1 said:
Knowing that:

x = p * y where p = (0, 1] and x, y = (0, 2]
What does p = (0, 1] mean? What does x, y = (0, 2] mean? Does the first one mean ##x \in (0, 1]##?
Can you pick p = 1, and then let x = y = 1?
simplex1 said:
find x and y in such a way that both of them be as close as possible to 1 simultaneously.

I guess that the solution is x = 1/y = sqrt(p) but I do not know how to prove it.
 
  • #3
- Yes, x,y=(0,2] means x∈(0,2] and y∈(0,2].
- p is a given constant. In my specific case p = 0.457.
 
  • #4
Since p is a constant, then for a given x value, the y value is y = x/p = x/.457 .
If you let w = (x - 1)2 + (x/.457 - 1)2, you're looking for the value of x that minimizes w.

Edited above to fix my earlier mistake.
 
Last edited:
  • #5
I believe it should be w(x) = (x - 1)^2 + (x/p - 1)^2 = minim which has the solution:
x = p(p+1)/(p^2+1)
It appears that x is not sqrt(p).
 
  • #6
simplex1 said:
I believe it should be w(x) = (x - 1)^2 + (x/p - 1)^2 = minim
Yes, I switched p and x due to a silly mistake on my part. I have edited my earlier post.
simplex1 said:
which has the solution:
x = p(p+1)/(p^2+1)
It appears that x is not sqrt(p).
 
  • #7
I want now to minimize ## w(x) = (x - 1)^2 + (y - 1)^2 ## knowing that ## px^3+qx^2y+rxy^2+ty^3=0 ## but without solving the equation to obtain y as a function of x and then replace it in ## w(x) ## because this appears to be impractical. Is it possible?
 
  • #8
Use "Lagrange multipliers". Since [itex]w(x,y)= (x- 1)^2+ (y- 1)^2[/itex], [itex]\nabla w= 2(x- 1)\vec{i}+ 2(y- 1)\vec{j}[/itex]. Writing the constraint as [itex]f(x,y)= px^3+ qx^2y+ rxy^2+ ty^3[/itex], [itex]\nabla f= (3px^2+ 2qxy+ ry^2)\vec{i}+ (qx^2+ 3rxy+ 3ty^3)\vec{j}[/itex]. At a max or min of w, with constraint f, those two gradient vectors must be parallel. That is, there must exist a number, [itex]\lambda[/itex] (the "Lagrange Multiplier") such that [itex]2(x- 1)\vec{i}+ 2(y- 1)\vec{j}[/itex][itex]= \lambda[(3px^2+ 2qxy+ ry^2)\vec{i}+ (qx^2+ 3rxy+ 3ty^3)]\vec{j}[/itex].

That gives the equations [itex]2(x- 1)= \lambda (3px^2+ 2qxy+ ry^2)[/itex] and [itex]2(y- 1)= \lambda(qx^2+ 3rxy+ 3y^3)[/itex] which, together with the constraint, give three equations to solve or x, y, and [itex]\lambda[/itex]. Since a value for [itex]\lambda[/itex] is not part of the solution to this problem, I find that it is often simplest to first eliminate [itex]\lambda[/itex] by dividing one equation by the other. Dividing the first of those two equations by the second,
[tex]\frac{2(x- 1)}{2(y- 1}= \frac{3px^2+ 2qxy+ ry^2}{qx^2+ 2rxy+ 3ty^3}[/tex].

That is, of course, equivalent to [tex](x- 1)(qx^2+ 2rxy+ 3ty^3)= (y- 1)(3px^2+ 2qxy+ ry^2)[/tex].
 
  • Like
Likes T Damen
  • #9
Yes, the method of Lagrange is a good idea because numeric solutions for x and y can be found with Mathcad if the parameters are known. Thank you all for your help.
 

1. What does the equation X = p * y mean?

The equation X = p * y means that the value of X is equal to the product of p and y. In other words, the value of X is the result of multiplying p and y together.

2. How do you find the values of X and y when they are as close to 1 as possible?

To find the values of X and y that are as close to 1 as possible, you need to use a mathematical method called optimization. This involves finding the values of X and y that will minimize the difference between their product and 1.

3. What does it mean for X and y to be as close to 1 as possible?

When we say that X and y are as close to 1 as possible, we mean that their product is as close to 1 as possible. In other words, we are looking for values of X and y that will make the equation X = p * y as close to 1 as possible.

4. Can X and y be any real numbers?

Yes, X and y can be any real numbers. However, in order for the equation X = p * y to have a solution where both X and y are as close to 1 as possible, there are certain constraints on the values of p and y. For example, p and y cannot be negative, as this would make their product negative and therefore not as close to 1 as possible.

5. What are some real-life applications of this equation?

This equation has many real-life applications, particularly in the fields of optimization and modeling. For example, it can be used to find the most efficient way to allocate resources or to minimize costs in a business setting. It can also be used in physics and engineering to model various phenomena and find the optimal values for different variables.

Similar threads

Replies
2
Views
249
Replies
8
Views
1K
  • General Math
Replies
5
Views
445
Replies
3
Views
707
  • General Math
Replies
1
Views
716
  • General Math
Replies
3
Views
1K
  • General Math
Replies
24
Views
2K
Replies
1
Views
802
  • General Math
Replies
1
Views
702
Replies
1
Views
1K
Back
Top