Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2014 June 10

From Wikipedia, the free encyclopedia
Mathematics desk
< June 9 << May | June | Jul >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


June 10

[edit]

constrained ratios

[edit]

As you know, Bob, the continued fraction expression of a real number x provides a sequence of "best" rational approximations to x, in the sense that if you cut off the CF at i steps the resulting approximation cannot be improved with smaller integers. But the problem that interests me at the moment requires to be odd and even. Does the sequence include all the "best" constrained ratios? (I would guess not.) If not, is there an efficient algo that does list them? —Tamfang (talk) 05:35, 10 June 2014 (UTC)[reply]

Try searching Stern–Brocot tree. I don't know how fast it could be, anyway the tree contains all rationals, so eventually you will find your number in it. --CiaPan (talk) 07:11, 11 June 2014 (UTC)[reply]

Maximizing an implicit equation

[edit]

It's a rather simple problem: Given , find (x,y) that maximizes the value of y. I solved it by using the quadratic formula to solve for y and then taking the derivative with respect to x, leading to the answer x=y=1/2. It was very cumbersome.

But I noticed that finding the derivative implicitly rather than explicitly leads to from which it follows that I could solve the system of equations . Would this latter method be the preferred way to solve problems of this kind?--Jasper Deng (talk) 07:03, 10 June 2014 (UTC)[reply]

You seem to prefer it :) If you have a constrained maximisation / minimisation problem, my favourite way of solving it is to use generalized coordinates that automatically make you satisfy the constraint. If that is not easy or not possible, the next best thing in general is to use Lagrange multipliers. In your example, I don't see a good way to find generalised coordinates that work, and as the function that you want to maximise is so simple, your method is faster than using Lagrange multipliers. But if you want to find the (x,y) that maximises x+y^2, Lagrange multipliers are the way to go. —Kusma (t·c) 08:35, 10 June 2014 (UTC)[reply]
I thought about Lagrange multipliers, but I don't find them useful for functions that are simply from R to R rather than R2 (and up) to R; y is of course the former case, even if implicit. I thought that I could maybe get away with turning this into a constrained optimization problem using the constraint from the implicit differentiation above, but I'd think that's a dangerous thing to do as applying Lagrange multipliers could lead to phony critical points.--Jasper Deng (talk) 08:37, 10 June 2014 (UTC)[reply]
I don't see how Lagrange multipliers can lead to phony critical points (do you mean critical points that are not minimisers / maximisers? That can happen in any optimisation problem, and is not made worse by Lagrange multipliers). In your case, they are easy: Set , take derivatives with respect to x and y, use the constraint, find as the only solution of . —Kusma (t·c) 09:13, 10 June 2014 (UTC)[reply]
Yes, I kinda mean critical points that aren't extrema; it wouldn't be a problem with the method of Lagrange multipliers, but with my proposed constraint above.--Jasper Deng (talk) 17:27, 10 June 2014 (UTC)[reply]

In your problem, you are maximizing the function y subject to the constraint y^2-x+2x^2y=0. An approach to the general problem of constrained optimization which is more in the spirit of the implicit function approach to the problem is to use differentials systematically. To maximize a function f(x,y) subject to a constraint g(x,y)=0, you want to solve the equation df=0 for all infinitely small displacements (dx,dy) that lie on the constraint surface dg=0. If you do this in your example, you recover exactly your approach (this is how implicit differentiation works). Sławomir Biały (talk) 18:25, 10 June 2014 (UTC)[reply]

For any y you have a quadratic equation in x. Assuming there is a maximal y for which there is a solution for x, with this y you have exactly one solution. So the discriminant, which is , must be 0. So and then you can find . -- Meni Rosenfeld (talk) 13:54, 16 June 2014 (UTC)[reply]
Plot of

I view this sort of question as finding the algebraic curve . The normal to the curve is and when the tangent is horizontal and you have a turning point. Here intersection of that curve with gives the critical point as above. Similar you can find the intersection with to find the two other turning points.--Salix alba (talk): 16:27, 16 June 2014 (UTC)[reply]