My problem is similar to this: Intuitive explanation for formula of maximum length of a pipe moving around a corner?
However my pipe (20m long) must pass through a specific point (5,5) in the X-Y plane and the question is then how high up the wall can it reach? - see diagram below. Diagram to explain setup
So my equations are $x^2 + y^2 = 400$ (function F) and the constraint can be written as $(x-5)(y-5) = 25$ (function G). This second equation is seen via above diagram as $tan(\theta) = x/y$ and also $tan(\theta)= 5/(y-5)$ and $tan(\theta)= (x-5)/5$ by similar triangles.
I use $ L = F - \lambda(G) $.
$ L = x^2 + y^2 - 20^2 - \lambda((x-5)(y-5)-25) $
So $\partial L_x = 2x - \lambda(y-5) = 0 $ Eqn1.
and $\partial L_y = 2y - \lambda(x-5) = 0 $ Eqn2
I then multiply Eqn1 by y and Eqn2 by x and subtract Eqn2 from Eqn1 and I cannot proceed from there. Below is a graph I did that shows the solution (6.811,18.805) for x and y, but I would like to be able to solve it via Lagrange multiplier. Thanks in advance for any clues Graph of the 2 Equations
