{
  "index": "1938-B-6",
  "type": "GEO",
  "tag": [
    "GEO",
    "ALG"
  ],
  "difficulty": "",
  "question": "13. Find the shortest distance between the plane \\( A x+B y+C z+1=0 \\) and the ellipsoid \\( x^{2} / a^{2}+y^{2} / b^{2}+z^{2} / c^{2}=1 \\). (For brevity, let\n\\[\n\\left.h=1 / \\sqrt{A^{2}+B^{2}+C^{2}} \\text { and } m=\\sqrt{a^{2} A^{2}+b^{2} B^{2}+c^{2} C^{2}} .\\right)\n\\]\n\nState algebraically the condition that the plane shall lie outside the ellipsoid.",
  "solution": "Solution. If the given plane intersects the ellipsoid, then the minimum distance is zero. If the plane fails to intersect the ellipsoid, then the shortest distance is the distance between the given plane and the nearer of the two tangent planes to the ellipsoid that are parallel to the given plane.\n\nThe tangent plane to the ellipsoid at the point \\( \\left(x_{0}, y_{0}, z_{0}\\right) \\) is\n\\[\n\\frac{x_{0} x}{a^{2}}+\\frac{y_{0} y}{b^{2}}+\\frac{z_{0} z}{c^{2}}=1\n\\]\n\nIf this plane is parallel to \\( A x+B y+C z+1=0 \\), then\n\\[\n\\frac{x_{0}}{a^{2}}=k A, \\quad \\frac{y_{0}}{b^{2}}=k B, \\quad \\text { and } \\quad \\frac{z_{0}}{c^{2}}=k C\n\\]\nwhere \\( k \\) is a constant. Since\n\\[\n1=\\frac{x_{0}^{2}}{a^{2}}+\\frac{y_{0}^{2}}{b^{2}}+\\frac{z_{0}^{2}}{c^{2}}=k^{2}\\left[a^{2} A^{2}+b^{2} B^{2}+c^{2} C^{2}\\right]\n\\]\nwe get \\( |k|=1 / m \\).\nThe distance from the origin to the given plane is\n\\[\n\\frac{1}{\\sqrt{A^{2}+B^{2}+C^{2}}}=h\n\\]\n\nSince the parallel tangent plane can be written in the form\n\\[\nk(A x+B y+C z)=1\n\\]\nthe distance from the origin to either parallel tangent plane is\n\\[\n\\frac{1}{|k| \\sqrt{A^{2}+B^{2}+C^{2}}}=h m .\n\\]\n\nHence if \\( m<1 \\), the given plane lies farther from the origin than the tangent planes, and it does not cut the ellipsoid. The distance from the ellipsoid to the given plane in this case is \\( h(1-m) \\). But if \\( m \\geq 1 \\), the given plane either lies between the tangent planes or coincides with one of them, so it cuts the ellipsoid and the distance is zero.",
  "vars": [
    "x",
    "y",
    "z",
    "x_0",
    "y_0",
    "z_0"
  ],
  "params": [
    "A",
    "B",
    "C",
    "a",
    "b",
    "c",
    "h",
    "m",
    "k"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "xposvar",
        "y": "yposvar",
        "z": "zposvar",
        "x_0": "xzeropt",
        "y_0": "yzeropt",
        "z_0": "zzeropt",
        "A": "planecoa",
        "B": "planecob",
        "C": "planecoc",
        "a": "ellipa",
        "b": "ellipb",
        "c": "ellipc",
        "h": "planedist",
        "m": "ellipcoef",
        "k": "scalepar"
      },
      "question": "13. Find the shortest distance between the plane \\( planecoa\\,xposvar + planecob\\,yposvar + planecoc\\,zposvar + 1 = 0 \\) and the ellipsoid \\( xposvar^{2} / ellipa^{2} + yposvar^{2} / ellipb^{2} + zposvar^{2} / ellipc^{2} = 1 \\). (For brevity, let\n\\[\n\\left. planedist = 1 / \\sqrt{ planecoa^{2} + planecob^{2} + planecoc^{2} } \\text { and } ellipcoef = \\sqrt{ ellipa^{2} planecoa^{2} + ellipb^{2} planecob^{2} + ellipc^{2} planecoc^{2} } .\\right)\n\\]\n\nState algebraically the condition that the plane shall lie outside the ellipsoid.",
      "solution": "Solution. If the given plane intersects the ellipsoid, then the minimum distance is zero. If the plane fails to intersect the ellipsoid, then the shortest distance is the distance between the given plane and the nearer of the two tangent planes to the ellipsoid that are parallel to the given plane.\n\nThe tangent plane to the ellipsoid at the point \\( \\left( xzeropt, yzeropt, zzeropt \\right) \\) is\n\\[\n\\frac{ xzeropt\\,xposvar }{ ellipa^{2} } + \\frac{ yzeropt\\,yposvar }{ ellipb^{2} } + \\frac{ zzeropt\\,zposvar }{ ellipc^{2} } = 1\n\\]\n\nIf this plane is parallel to \\( planecoa\\,xposvar + planecob\\,yposvar + planecoc\\,zposvar + 1 = 0 \\), then\n\\[\n\\frac{ xzeropt }{ ellipa^{2} } = scalepar\\,planecoa, \\quad \\frac{ yzeropt }{ ellipb^{2} } = scalepar\\,planecob, \\quad \\text { and } \\quad \\frac{ zzeropt }{ ellipc^{2} } = scalepar\\,planecoc\n\\]\nwhere \\( scalepar \\) is a constant. Since\n\\[\n1 = \\frac{ xzeropt^{2} }{ ellipa^{2} } + \\frac{ yzeropt^{2} }{ ellipb^{2} } + \\frac{ zzeropt^{2} }{ ellipc^{2} } = scalepar^{2}\\left[ ellipa^{2} planecoa^{2} + ellipb^{2} planecob^{2} + ellipc^{2} planecoc^{2} \\right]\n\\]\nwe get \\( |scalepar| = 1 / ellipcoef \\).\nThe distance from the origin to the given plane is\n\\[\n\\frac{1}{ \\sqrt{ planecoa^{2} + planecob^{2} + planecoc^{2} } } = planedist\n\\]\n\nSince the parallel tangent plane can be written in the form\n\\[\nscalepar\\,( planecoa\\,xposvar + planecob\\,yposvar + planecoc\\,zposvar ) = 1\n\\]\nthe distance from the origin to either parallel tangent plane is\n\\[\n\\frac{1}{ |scalepar| \\sqrt{ planecoa^{2} + planecob^{2} + planecoc^{2} } } = planedist\\,ellipcoef .\n\\]\n\nHence if \\( ellipcoef < 1 \\), the given plane lies farther from the origin than the tangent planes, and it does not cut the ellipsoid. The distance from the ellipsoid to the given plane in this case is \\( planedist(1-ellipcoef) \\). But if \\( ellipcoef \\geq 1 \\), the given plane either lies between the tangent planes or coincides with one of them, so it cuts the ellipsoid and the distance is zero."
    },
    "descriptive_long_confusing": {
      "map": {
        "A": "blueprint",
        "B": "horsetail",
        "C": "snowflake",
        "a": "woodpeck",
        "b": "scarecrow",
        "c": "buttercup",
        "h": "goldcrest",
        "m": "kingfisher",
        "k": "arrowroot",
        "x": "sailplane",
        "y": "lampstand",
        "z": "teardrop",
        "x_0": "quagmire",
        "y_0": "foxtrott",
        "z_0": "drumstick"
      },
      "question": "13. Find the shortest distance between the plane \\( blueprint sailplane+horsetail lampstand+snowflake teardrop+1=0 \\) and the ellipsoid \\( sailplane^{2} / woodpeck^{2}+lampstand^{2} / scarecrow^{2}+teardrop^{2} / buttercup^{2}=1 \\). (For brevity, let\n\\[\n\\left.goldcrest=1 / \\sqrt{blueprint^{2}+horsetail^{2}+snowflake^{2}} \\text { and } kingfisher=\\sqrt{woodpeck^{2} blueprint^{2}+scarecrow^{2} horsetail^{2}+buttercup^{2} snowflake^{2}} .\\right)\n\\]\n\nState algebraically the condition that the plane shall lie outside the ellipsoid.",
      "solution": "Solution. If the given plane intersects the ellipsoid, then the minimum distance is zero. If the plane fails to intersect the ellipsoid, then the shortest distance is the distance between the given plane and the nearer of the two tangent planes to the ellipsoid that are parallel to the given plane.\n\nThe tangent plane to the ellipsoid at the point \\( \\left(quagmire, foxtrott, drumstick\\right) \\) is\n\\[\n\\frac{quagmire sailplane}{woodpeck^{2}}+\\frac{foxtrott lampstand}{scarecrow^{2}}+\\frac{drumstick teardrop}{buttercup^{2}}=1\n\\]\n\nIf this plane is parallel to \\( blueprint sailplane+horsetail lampstand+snowflake teardrop+1=0 \\), then\n\\[\n\\frac{quagmire}{woodpeck^{2}}=arrowroot blueprint, \\quad \\frac{foxtrott}{scarecrow^{2}}=arrowroot horsetail, \\quad \\text { and } \\quad \\frac{drumstick}{buttercup^{2}}=arrowroot snowflake\n\\]\nwhere \\( arrowroot \\) is a constant. Since\n\\[\n1=\\frac{quagmire^{2}}{woodpeck^{2}}+\\frac{foxtrott^{2}}{scarecrow^{2}}+\\frac{drumstick^{2}}{buttercup^{2}}=arrowroot^{2}\\left[woodpeck^{2} blueprint^{2}+scarecrow^{2} horsetail^{2}+buttercup^{2} snowflake^{2}\\right]\n\\]\nwe get \\( |arrowroot|=1 / kingfisher \\).\nThe distance from the origin to the given plane is\n\\[\n\\frac{1}{\\sqrt{blueprint^{2}+horsetail^{2}+snowflake^{2}}}=goldcrest\n\\]\n\nSince the parallel tangent plane can be written in the form\n\\[\narrowroot(blueprint sailplane+horsetail lampstand+snowflake teardrop)=1\n\\]\nthe distance from the origin to either parallel tangent plane is\n\\[\n\\frac{1}{|arrowroot| \\sqrt{blueprint^{2}+horsetail^{2}+snowflake^{2}}}=goldcrest kingfisher .\n\\]\n\nHence if \\( kingfisher<1 \\), the given plane lies farther from the origin than the tangent planes, and it does not cut the ellipsoid. The distance from the ellipsoid to the given plane in this case is \\( goldcrest(1-kingfisher) \\). But if \\( kingfisher \\geq 1 \\), the given plane either lies between the tangent planes or coincides with one of them, so it cuts the ellipsoid and the distance is zero."
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "fixedvalue",
        "y": "constantpos",
        "z": "steadylevel",
        "x_0": "roamingpoint",
        "y_0": "driftinglat",
        "z_0": "floatingalt",
        "A": "curvature",
        "B": "flexurcoef",
        "C": "twistfactor",
        "a": "narrowaxis",
        "b": "slenderaxis",
        "c": "thinaxis",
        "h": "neardist",
        "m": "easyscale",
        "k": "unstablevar"
      },
      "question": "Find the shortest distance between the plane \\( curvature fixedvalue+flexurcoef constantpos+twistfactor steadylevel+1=0 \\) and the ellipsoid \\( fixedvalue^{2} / narrowaxis^{2}+constantpos^{2} / slenderaxis^{2}+steadylevel^{2} / thinaxis^{2}=1 \\). (For brevity, let\n\\[\n\\left.neardist=1 / \\sqrt{curvature^{2}+flexurcoef^{2}+twistfactor^{2}} \\text { and } easyscale=\\sqrt{narrowaxis^{2} curvature^{2}+slenderaxis^{2} flexurcoef^{2}+thinaxis^{2} twistfactor^{2}} .\\right)\n\\]\n\nState algebraically the condition that the plane shall lie outside the ellipsoid.",
      "solution": "Solution. If the given plane intersects the ellipsoid, then the minimum distance is zero. If the plane fails to intersect the ellipsoid, then the shortest distance is the distance between the given plane and the nearer of the two tangent planes to the ellipsoid that are parallel to the given plane.\n\nThe tangent plane to the ellipsoid at the point \\( \\left(roamingpoint, driftinglat, floatingalt\\right) \\) is\n\\[\n\\frac{roamingpoint fixedvalue}{narrowaxis^{2}}+\\frac{driftinglat constantpos}{slenderaxis^{2}}+\\frac{floatingalt steadylevel}{thinaxis^{2}}=1\n\\]\n\nIf this plane is parallel to \\( curvature fixedvalue+flexurcoef constantpos+twistfactor steadylevel+1=0 \\), then\n\\[\n\\frac{roamingpoint}{narrowaxis^{2}}=unstablevar\\, curvature, \\quad \\frac{driftinglat}{slenderaxis^{2}}=unstablevar\\, flexurcoef, \\quad \\text { and } \\quad \\frac{floatingalt}{thinaxis^{2}}=unstablevar\\, twistfactor\n\\]\nwhere \\( unstablevar \\) is a constant. Since\n\\[\n1=\\frac{roamingpoint^{2}}{narrowaxis^{2}}+\\frac{driftinglat^{2}}{slenderaxis^{2}}+\\frac{floatingalt^{2}}{thinaxis^{2}}=unstablevar^{2}\\left[narrowaxis^{2} curvature^{2}+slenderaxis^{2} flexurcoef^{2}+thinaxis^{2} twistfactor^{2}\\right]\n\\]\nwe get \\( |unstablevar|=1 / easyscale \\).\nThe distance from the origin to the given plane is\n\\[\n\\frac{1}{\\sqrt{curvature^{2}+flexurcoef^{2}+twistfactor^{2}}}=neardist\n\\]\n\nSince the parallel tangent plane can be written in the form\n\\[\nunstablevar(curvature fixedvalue+flexurcoef constantpos+twistfactor steadylevel)=1\n\\]\nthe distance from the origin to either parallel tangent plane is\n\\[\n\\frac{1}{|unstablevar| \\sqrt{curvature^{2}+flexurcoef^{2}+twistfactor^{2}}}=neardist\\, easyscale .\n\\]\n\nHence if \\( easyscale<1 \\), the given plane lies farther from the origin than the tangent planes, and it does not cut the ellipsoid. The distance from the ellipsoid to the given plane in this case is \\( neardist(1-easyscale) \\). But if \\( easyscale \\geq 1 \\), the given plane either lies between the tangent planes or coincides with one of them, so it cuts the ellipsoid and the distance is zero."
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "y": "hjgrksla",
        "z": "vmdkrpqe",
        "x_0": "lrzqmhud",
        "y_0": "fskgpeit",
        "z_0": "dbycjnor",
        "A": "pnbxgcvh",
        "B": "sldfkqmv",
        "C": "wczmhgrt",
        "a": "tkrslbvd",
        "b": "rxpczjwm",
        "c": "gnfqyhdl",
        "h": "kzhvdwsp",
        "m": "qbclrsnf",
        "k": "mvtqshpz"
      },
      "question": "13. Find the shortest distance between the plane \\( pnbxgcvh qzxwvtnp+sldfkqmv hjgrksla+wczmhgrt vmdkrpqe+1=0 \\) and the ellipsoid \\( qzxwvtnp^{2} / tkrslbvd^{2}+hjgrksla^{2} / rxpczjwm^{2}+vmdkrpqe^{2} / gnfqyhdl^{2}=1 \\). (For brevity, let\n\\[\n\\left.kzhvdwsp=1 / \\sqrt{pnbxgcvh^{2}+sldfkqmv^{2}+wczmhgrt^{2}} \\text { and } qbclrsnf=\\sqrt{tkrslbvd^{2} pnbxgcvh^{2}+rxpczjwm^{2} sldfkqmv^{2}+gnfqyhdl^{2} wczmhgrt^{2}} .\\right)\n\\]\n\nState algebraically the condition that the plane shall lie outside the ellipsoid.",
      "solution": "Solution. If the given plane intersects the ellipsoid, then the minimum distance is zero. If the plane fails to intersect the ellipsoid, then the shortest distance is the distance between the given plane and the nearer of the two tangent planes to the ellipsoid that are parallel to the given plane.\n\nThe tangent plane to the ellipsoid at the point \\( \\left(lrzqmhud, fskgpeit, dbycjnor\\right) \\) is\n\\[\n\\frac{lrzqmhud qzxwvtnp}{tkrslbvd^{2}}+\\frac{fskgpeit hjgrksla}{rxpczjwm^{2}}+\\frac{dbycjnor vmdkrpqe}{gnfqyhdl^{2}}=1\n\\]\n\nIf this plane is parallel to \\( pnbxgcvh qzxwvtnp+sldfkqmv hjgrksla+wczmhgrt vmdkrpqe+1=0 \\), then\n\\[\n\\frac{lrzqmhud}{tkrslbvd^{2}}=mvtqshpz pnbxgcvh, \\quad \\frac{fskgpeit}{rxpczjwm^{2}}=mvtqshpz sldfkqmv, \\quad \\text { and } \\quad \\frac{dbycjnor}{gnfqyhdl^{2}}=mvtqshpz wczmhgrt\n\\]\nwhere \\( mvtqshpz \\) is a constant. Since\n\\[\n1=\\frac{lrzqmhud^{2}}{tkrslbvd^{2}}+\\frac{fskgpeit^{2}}{rxpczjwm^{2}}+\\frac{dbycjnor^{2}}{gnfqyhdl^{2}}=mvtqshpz^{2}\\left[tkrslbvd^{2} pnbxgcvh^{2}+rxpczjwm^{2} sldfkqmv^{2}+gnfqyhdl^{2} wczmhgrt^{2}\\right]\n\\]\nwe get \\( |mvtqshpz|=1 / qbclrsnf \\).\nThe distance from the origin to the given plane is\n\\[\n\\frac{1}{\\sqrt{pnbxgcvh^{2}+sldfkqmv^{2}+wczmhgrt^{2}}}=kzhvdwsp\n\\]\n\nSince the parallel tangent plane can be written in the form\n\\[\nmvtqshpz(pnbxgcvh qzxwvtnp+sldfkqmv hjgrksla+wczmhgrt vmdkrpqe)=1\n\\]\nthe distance from the origin to either parallel tangent plane is\n\\[\n\\frac{1}{|mvtqshpz| \\sqrt{pnbxgcvh^{2}+sldfkqmv^{2}+wczmhgrt^{2}}}=kzhvdwsp qbclrsnf .\n\\]\n\nHence if \\( qbclrsnf<1 \\), the given plane lies farther from the origin than the tangent planes, and it does not cut the ellipsoid. The distance from the ellipsoid to the given plane in this case is \\( kzhvdwsp(1-qbclrsnf) \\). But if \\( qbclrsnf \\geq 1 \\), the given plane either lies between the tangent planes or coincides with one of them, so it cuts the ellipsoid and the distance is zero."
    },
    "kernel_variant": {
      "question": "Let $n\\ge 2$.  Fix  \n\n• a non–zero vector $\\mathbf n\\in\\mathbb R^{n}$,  \n• a real number $d$,  \n• a symmetric positive–definite matrix $Q\\in\\mathbb R^{n\\times n}$, and  \n• a centre vector $\\mathbf c\\in\\mathbb R^{n}$.\n\nConsider the hyperplane  \n\\[\n   H:\\;\\mathbf n^{\\mathsf T}\\mathbf x+d=0,\\qquad \\mathbf x\\in\\mathbb R^{n},\n\\]\nand the (translated and rotated) ellipsoid  \n\\[\n   E:\\;(\\mathbf x-\\mathbf c)^{\\mathsf T}Q^{-1}(\\mathbf x-\\mathbf c)=1 .\n\\]\n\nIntroduce the scalars  \n\\[\n   h=\\frac{\\lvert\\mathbf n^{\\mathsf T}\\mathbf c+d\\rvert}{\\lVert\\mathbf n\\rVert},\n   \\qquad\n   m=\\sqrt{\\mathbf n^{\\mathsf T}Q\\mathbf n},\n   \\qquad\n   \\mu=\\frac{m}{\\lVert\\mathbf n\\rVert}\n   \\;\\bigl(=\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}\\bigr),\n   \\quad\n   \\widehat{\\mathbf n}:=\\frac{\\mathbf n}{\\lVert\\mathbf n\\rVert}.\n\\]\n\n(a)  Prove that the hyperplane $H$ meets the ellipsoid $E$ if and only if  \n\\[\n   \\boxed{\\,h\\le\\mu\\,}.\n\\]\n\n(b)  Assume from now on that $H$ is disjoint from $E$ (so $h>\\mu$).  \n\n(i)  Show that there are exactly two hyperplanes that are tangent to $E$ and parallel to $H$.  \n\n(ii)  Prove that the minimum distance between $H$ and $E$ equals  \n\\[\n   \\displaystyle\\operatorname{dist}(H,E)=h-\\mu\n\\]\nand is attained at a unique point of $E$.\n\n(c)  Give explicit formulas (in terms only of $\\mathbf n,d,Q,\\mathbf c$) for  \n     • the unique nearest point $P\\in E$ to $H$;  \n     • the two parallel tangent hyperplanes found in part (b).\n\n(d)  Specialise your results to the three–dimensional, axis–aligned ellipsoid  \n\\[\n   \\frac{x^{2}}{a^{2}}+\\frac{y^{2}}{b^{2}}+\\frac{z^{2}}{c^{2}}=1\n\\]\nand the plane $Ax+By+Cz+1=0$.  Verify that  \n\n• the intersection criterion becomes $m\\ge 1$ (equivalently $h\\le\\mu$);  \n\n• if $m<1$ (so the plane lies outside the ellipsoid), the minimum distance is  \n\\[\n   \\displaystyle\\operatorname{dist}=h(1-m)=\\frac{1-m}{\\sqrt{A^{2}+B^{2}+C^{2}}}.\n\\]\n\n--------------------------------------------------------------------",
      "solution": "Preliminaries.  \nBecause $Q$ is symmetric positive–definite, $Q^{-1}$ exists and  \n$\\mathbf v^{\\mathsf T}Q\\mathbf v>0$ for every $\\mathbf v\\neq\\mathbf 0$.  \nPut $\\widehat{\\mathbf n}=\\mathbf n/\\lVert\\mathbf n\\rVert$; then  \n$\\widehat{\\mathbf n}$ is the unit normal of every hyperplane parallel to $H$.  Moreover  \n\n\\[\n   \\mu=\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}\n\\]\nis the value of the support function of the ellipsoid in direction $\\widehat{\\mathbf n}$.\n\n--------------------------------------------------------------------\n(a)  Intersection criterion.\n\nFor $\\mathbf x\\in\\mathbb R^{n}$ its signed distance to $H$ is  \n\\[\n   \\operatorname{dist}_{\\pm}(\\mathbf x,H)=\n        \\widehat{\\mathbf n}^{\\mathsf T}\\mathbf x+\\frac{d}{\\lVert\\mathbf n\\rVert}.\n\\]\nWrite $\\mathbf x=\\mathbf c+\\mathbf y$ with $\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y=1$. Then  \n\\[\n   \\operatorname{dist}_{\\pm}(\\mathbf x,H)=\n        \\widehat{\\mathbf n}^{\\mathsf T}\\mathbf c+\\frac{d}{\\lVert\\mathbf n\\rVert}\n        +\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y .\n\\]\n\nFor fixed $(\\mathbf n,Q)$ the scalar  \n$s=\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y$ ranges over $[-\\mu,\\mu]$.  \nIndeed, maximise $\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y$ under the constraint $\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y=1$:\n\nLagrange multipliers:  \n\\[\n   \\mathcal L(\\mathbf y,\\lambda)=\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y\n      -\\lambda\\bigl(\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y-1\\bigr).\n\\]\nCritical points satisfy $\\,\\widehat{\\mathbf n}=2\\lambda Q^{-1}\\mathbf y$, whence  \n$\\mathbf y=\\dfrac{Q\\widehat{\\mathbf n}}{2\\lambda}$.  Substituting in the constraint gives  \n$4\\lambda^{2}= \\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}$, so  \n$|\\lambda|=\\dfrac{1}{2}\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}$.  Consequently  \n\\[\n   \\max_{\\mathbf y\\in E}\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y\n      =\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}=\\mu ,\n\\]\nand the minimum is $-\\mu$ (by changing $\\mathbf y\\mapsto-\\mathbf y$).\n\nHence $H$ meets $E$ precisely when one can choose $\\mathbf y$ so that the signed distance is $0$, i.e. whenever  \n\\[\n   -\\mu\\le\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf c+\\frac{d}{\\lVert\\mathbf n\\rVert}\\le\\mu .\n\\]\nTaking absolute values yields the announced condition  \n\\[\n   \\boxed{h\\le\\mu}.\n\\]\n\nFor $h=\\mu$ the intersection degenerates to a single point (tangency); for $h<\\mu$ the intersection is an $(n-2)$–dimensional ellipsoid.\n\n--------------------------------------------------------------------\n(b)  The disjoint case $h>\\mu$.\n\n(i)  Existence and uniqueness of the two parallel tangent hyperplanes.\n\nAt any point $\\mathbf p\\in E$ the outward normal of $E$ is proportional to  \n\\[\n   \\nabla\\!\\bigl[(\\mathbf x-\\mathbf c)^{\\mathsf T}Q^{-1}(\\mathbf x-\\mathbf c)\\bigr]_{\\mathbf x=\\mathbf p}\n      =2Q^{-1}(\\mathbf p-\\mathbf c).\n\\]\nA tangent hyperplane parallel to $H$ must satisfy  \n\\[\n   Q^{-1}(\\mathbf p-\\mathbf c)=\\lambda\\mathbf n\n\\]\nfor some scalar $\\lambda$.  Thus $\\mathbf p=\\mathbf c+\\lambda Q\\mathbf n$.  Since $\\mathbf p\\in E$,\n\\[\n   (\\lambda Q\\mathbf n)^{\\mathsf T}Q^{-1}(\\lambda Q\\mathbf n)\n      =\\lambda^{2}\\mathbf n^{\\mathsf T}Q\\mathbf n\n      =\\lambda^{2}m^{2}=1\n   \\;\\Longrightarrow\\;\n   \\lambda=\\pm\\frac1m .\n\\]\nHence the only contact points are  \n\\[\n   \\mathbf p_{\\pm}=\\mathbf c\\pm\\frac1m\\,Q\\mathbf n .\n\\]\nConsequently exactly two tangent hyperplanes parallel to $H$ exist, namely  \n\\[\n   H_{\\pm}:\\;\\mathbf n^{\\mathsf T}\\mathbf x+d_{\\pm}=0,\n   \\qquad\n   d_{\\pm}=-\\mathbf n^{\\mathsf T}\\mathbf c\\mp m .\n\\]\n\n(ii)  Minimum distance.\n\nLet  \n\\[\n   s=\\mathbf n^{\\mathsf T}\\mathbf c+d,\\qquad\n   \\sigma=\\operatorname{sgn}s\\in\\{+1,-1\\}.\n\\]\nBecause two parallel hyperplanes  \n$\\mathbf n^{\\mathsf T}\\mathbf x+d_{1}=0$ and\n$\\mathbf n^{\\mathsf T}\\mathbf x+d_{2}=0$\nare separated by the distance $\\lvert d_{1}-d_{2}\\rvert/\\lVert\\mathbf n\\rVert$, we obtain\n\\[\n   \\operatorname{dist}(H,H_{\\pm})\n      =\\frac{\\lvert d-d_{\\pm}\\rvert}{\\lVert\\mathbf n\\rVert}\n      =\\frac{\\lvert\\,s\\pm m\\,\\rvert}{\\lVert\\mathbf n\\rVert}\n      =\\lvert\\,\\sigma h\\pm\\mu\\,\\rvert .\n\\]\n\nThe two values are the unordered pair $\\{\\,h-\\mu,\\,h+\\mu\\,\\}$, because  \n\\[\n   \\lvert\\sigma h-\\mu\\rvert=\\begin{cases}\n        h-\\mu & \\text{if }\\sigma=+1,\\\\[2pt]\n        h+\\mu & \\text{if }\\sigma=-1,\n   \\end{cases}\n   \\qquad\n   \\lvert\\sigma h+\\mu\\rvert=\\begin{cases}\n        h+\\mu & \\text{if }\\sigma=+1,\\\\[2pt]\n        h-\\mu & \\text{if }\\sigma=-1 .\n   \\end{cases}\n\\]\nSince $h>\\mu>0$, the minimum is always $h-\\mu$.  It is realised by the hyperplane whose index is $-\\sigma$; its point of tangency is the unique point of $E$ that attains the minimum distance.  Therefore  \n\\[\n   \\boxed{\\operatorname{dist}(H,E)=h-\\mu}.\n\\]\n\n--------------------------------------------------------------------\n(c)  Explicit nearest point and tangent hyperplanes.\n\nWith $\\sigma=\\operatorname{sgn}(\\mathbf n^{\\mathsf T}\\mathbf c+d)$,  \n\nNearest point on $E$:  \n\\[\n   \\boxed{P=\\mathbf c-\\frac{\\sigma}{m}\\,Q\\mathbf n}\n\\]\n\nParallel tangent hyperplanes:  \n\\[\n   \\boxed{\\mathbf n^{\\mathsf T}\\mathbf x+d_{\\pm}=0,\\quad\n          d_{\\pm}=-\\mathbf n^{\\mathsf T}\\mathbf c\\mp m}.\n\\]\nThe plane with index $-\\sigma$ is the closer one.\n\n--------------------------------------------------------------------\n(d)  Axis–aligned three–dimensional specialisation.\n\nLet $Q=\\operatorname{diag}(a^{2},b^{2},c^{2})$ and $\\mathbf c=\\mathbf 0$,  \nand take the plane $Ax+By+Cz+1=0$ (so $d=1$).  Then\n\\[\n   m=\\sqrt{a^{2}A^{2}+b^{2}B^{2}+c^{2}C^{2}},\\qquad\n   \\lVert\\mathbf n\\rVert=\\sqrt{A^{2}+B^{2}+C^{2}},\\qquad\n   h=\\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}.\n\\]\nHence $\\mu=m/\\lVert\\mathbf n\\rVert$ and the intersection occurs iff $h\\le\\mu$, i.e.  \n\\[\n   \\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}\\le\n   \\frac{m}{\\sqrt{A^{2}+B^{2}+C^{2}}}\\;\\Longleftrightarrow\\; m\\ge 1 .\n\\]\nIf $m<1$ (so the plane does not meet the ellipsoid) the minimum distance is\n\\[\n   \\operatorname{dist}=h-\\mu\n      =\\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}(1-m)\n      =h(1-m),\n\\]\nwhich coincides with the classical result.\n\n--------------------------------------------------------------------",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.347271",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension: the problem is set in arbitrary \\(\\mathbb{R}^{n}\\) (with \\(n\\ge 3\\)), rather than a fixed \\(3\\)-space.  \n2. Additional structure: the ellipsoid is obtained from an arbitrary positive–definite matrix \\(Q\\) and may be both translated (\\(\\mathbf{c}\\neq 0\\)) and rotated (\\(Q\\) not necessarily diagonal).  \n3. Deeper theory: the solution demands familiarity with quadratic forms, support functions of convex bodies, gradients on manifolds, and properties of symmetric positive–definite matrices.  \n4. Multiple concepts: the solver must combine linear algebra, differential geometry (normals to a quadric), convex–analytic separation arguments, and classical distance-to-a-set ideas.  \n5. More steps: compared with the axis-aligned, centred ellipsoid, extra work is needed to shift the centre, rotate the axes, compute the support function, manage signs, and verify uniqueness.  \n6. Non-trivial verification: part (d) forces the solver to track constants carefully and prove that the complicated general answer indeed reduces to the known simple one.\n\nThese additions collectively raise the technical and conceptual load far above that of both the original problem and the current kernel variant, while preserving the core idea of finding the minimum distance between a quadric surface and a hyperplane."
      }
    },
    "original_kernel_variant": {
      "question": "Let $n\\ge 2$.  Fix  \n\n• a non–zero vector $\\mathbf n\\in\\mathbb R^{n}$,  \n• a real number $d$,  \n• a symmetric positive–definite matrix $Q\\in\\mathbb R^{n\\times n}$, and  \n• a centre vector $\\mathbf c\\in\\mathbb R^{n}$.\n\nConsider the hyperplane  \n\\[\n   H:\\;\\mathbf n^{\\mathsf T}\\mathbf x+d=0,\\qquad \\mathbf x\\in\\mathbb R^{n},\n\\]\nand the (translated and rotated) ellipsoid  \n\\[\n   E:\\;(\\mathbf x-\\mathbf c)^{\\mathsf T}Q^{-1}(\\mathbf x-\\mathbf c)=1 .\n\\]\n\nIntroduce the scalars  \n\\[\n   h=\\frac{\\lvert\\mathbf n^{\\mathsf T}\\mathbf c+d\\rvert}{\\lVert\\mathbf n\\rVert},\n   \\qquad\n   m=\\sqrt{\\mathbf n^{\\mathsf T}Q\\mathbf n},\n   \\qquad\n   \\mu=\\frac{m}{\\lVert\\mathbf n\\rVert}\n   \\;\\bigl(=\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}\\bigr),\n   \\quad\n   \\widehat{\\mathbf n}:=\\frac{\\mathbf n}{\\lVert\\mathbf n\\rVert}.\n\\]\n\n(a)  Prove that the hyperplane $H$ meets the ellipsoid $E$ if and only if  \n\\[\n   \\boxed{\\,h\\le\\mu\\,}.\n\\]\n\n(b)  Assume from now on that $H$ is disjoint from $E$ (so $h>\\mu$).  \n\n(i)  Show that there are exactly two hyperplanes that are tangent to $E$ and parallel to $H$.  \n\n(ii)  Prove that the minimum distance between $H$ and $E$ equals  \n\\[\n   \\displaystyle\\operatorname{dist}(H,E)=h-\\mu\n\\]\nand is attained at a unique point of $E$.\n\n(c)  Give explicit formulas (in terms only of $\\mathbf n,d,Q,\\mathbf c$) for  \n     • the unique nearest point $P\\in E$ to $H$;  \n     • the two parallel tangent hyperplanes found in part (b).\n\n(d)  Specialise your results to the three–dimensional, axis–aligned ellipsoid  \n\\[\n   \\frac{x^{2}}{a^{2}}+\\frac{y^{2}}{b^{2}}+\\frac{z^{2}}{c^{2}}=1\n\\]\nand the plane $Ax+By+Cz+1=0$.  Verify that  \n\n• the intersection criterion becomes $m\\ge 1$ (equivalently $h\\le\\mu$);  \n\n• if $m<1$ (so the plane lies outside the ellipsoid), the minimum distance is  \n\\[\n   \\displaystyle\\operatorname{dist}=h(1-m)=\\frac{1-m}{\\sqrt{A^{2}+B^{2}+C^{2}}}.\n\\]\n\n--------------------------------------------------------------------",
      "solution": "Preliminaries.  \nBecause $Q$ is symmetric positive–definite, $Q^{-1}$ exists and  \n$\\mathbf v^{\\mathsf T}Q\\mathbf v>0$ for every $\\mathbf v\\neq\\mathbf 0$.  \nPut $\\widehat{\\mathbf n}=\\mathbf n/\\lVert\\mathbf n\\rVert$; then  \n$\\widehat{\\mathbf n}$ is the unit normal of every hyperplane parallel to $H$.  Moreover  \n\n\\[\n   \\mu=\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}\n\\]\nis the value of the support function of the ellipsoid in direction $\\widehat{\\mathbf n}$.\n\n--------------------------------------------------------------------\n(a)  Intersection criterion.\n\nFor $\\mathbf x\\in\\mathbb R^{n}$ its signed distance to $H$ is  \n\\[\n   \\operatorname{dist}_{\\pm}(\\mathbf x,H)=\n        \\widehat{\\mathbf n}^{\\mathsf T}\\mathbf x+\\frac{d}{\\lVert\\mathbf n\\rVert}.\n\\]\nWrite $\\mathbf x=\\mathbf c+\\mathbf y$ with $\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y=1$. Then  \n\\[\n   \\operatorname{dist}_{\\pm}(\\mathbf x,H)=\n        \\widehat{\\mathbf n}^{\\mathsf T}\\mathbf c+\\frac{d}{\\lVert\\mathbf n\\rVert}\n        +\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y .\n\\]\n\nFor fixed $(\\mathbf n,Q)$ the scalar  \n$s=\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y$ ranges over $[-\\mu,\\mu]$.  \nIndeed, maximise $\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y$ under the constraint $\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y=1$:\n\nLagrange multipliers:  \n\\[\n   \\mathcal L(\\mathbf y,\\lambda)=\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y\n      -\\lambda\\bigl(\\mathbf y^{\\mathsf T}Q^{-1}\\mathbf y-1\\bigr).\n\\]\nCritical points satisfy $\\,\\widehat{\\mathbf n}=2\\lambda Q^{-1}\\mathbf y$, whence  \n$\\mathbf y=\\dfrac{Q\\widehat{\\mathbf n}}{2\\lambda}$.  Substituting in the constraint gives  \n$4\\lambda^{2}= \\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}$, so  \n$|\\lambda|=\\dfrac{1}{2}\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}$.  Consequently  \n\\[\n   \\max_{\\mathbf y\\in E}\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf y\n      =\\sqrt{\\widehat{\\mathbf n}^{\\mathsf T}Q\\widehat{\\mathbf n}}=\\mu ,\n\\]\nand the minimum is $-\\mu$ (by changing $\\mathbf y\\mapsto-\\mathbf y$).\n\nHence $H$ meets $E$ precisely when one can choose $\\mathbf y$ so that the signed distance is $0$, i.e. whenever  \n\\[\n   -\\mu\\le\\widehat{\\mathbf n}^{\\mathsf T}\\mathbf c+\\frac{d}{\\lVert\\mathbf n\\rVert}\\le\\mu .\n\\]\nTaking absolute values yields the announced condition  \n\\[\n   \\boxed{h\\le\\mu}.\n\\]\n\nFor $h=\\mu$ the intersection degenerates to a single point (tangency); for $h<\\mu$ the intersection is an $(n-2)$–dimensional ellipsoid.\n\n--------------------------------------------------------------------\n(b)  The disjoint case $h>\\mu$.\n\n(i)  Existence and uniqueness of the two parallel tangent hyperplanes.\n\nAt any point $\\mathbf p\\in E$ the outward normal of $E$ is proportional to  \n\\[\n   \\nabla\\!\\bigl[(\\mathbf x-\\mathbf c)^{\\mathsf T}Q^{-1}(\\mathbf x-\\mathbf c)\\bigr]_{\\mathbf x=\\mathbf p}\n      =2Q^{-1}(\\mathbf p-\\mathbf c).\n\\]\nA tangent hyperplane parallel to $H$ must satisfy  \n\\[\n   Q^{-1}(\\mathbf p-\\mathbf c)=\\lambda\\mathbf n\n\\]\nfor some scalar $\\lambda$.  Thus $\\mathbf p=\\mathbf c+\\lambda Q\\mathbf n$.  Since $\\mathbf p\\in E$,\n\\[\n   (\\lambda Q\\mathbf n)^{\\mathsf T}Q^{-1}(\\lambda Q\\mathbf n)\n      =\\lambda^{2}\\mathbf n^{\\mathsf T}Q\\mathbf n\n      =\\lambda^{2}m^{2}=1\n   \\;\\Longrightarrow\\;\n   \\lambda=\\pm\\frac1m .\n\\]\nHence the only contact points are  \n\\[\n   \\mathbf p_{\\pm}=\\mathbf c\\pm\\frac1m\\,Q\\mathbf n .\n\\]\nConsequently exactly two tangent hyperplanes parallel to $H$ exist, namely  \n\\[\n   H_{\\pm}:\\;\\mathbf n^{\\mathsf T}\\mathbf x+d_{\\pm}=0,\n   \\qquad\n   d_{\\pm}=-\\mathbf n^{\\mathsf T}\\mathbf c\\mp m .\n\\]\n\n(ii)  Minimum distance.\n\nLet  \n\\[\n   s=\\mathbf n^{\\mathsf T}\\mathbf c+d,\\qquad\n   \\sigma=\\operatorname{sgn}s\\in\\{+1,-1\\}.\n\\]\nBecause two parallel hyperplanes  \n$\\mathbf n^{\\mathsf T}\\mathbf x+d_{1}=0$ and\n$\\mathbf n^{\\mathsf T}\\mathbf x+d_{2}=0$\nare separated by the distance $\\lvert d_{1}-d_{2}\\rvert/\\lVert\\mathbf n\\rVert$, we obtain\n\\[\n   \\operatorname{dist}(H,H_{\\pm})\n      =\\frac{\\lvert d-d_{\\pm}\\rvert}{\\lVert\\mathbf n\\rVert}\n      =\\frac{\\lvert\\,s\\pm m\\,\\rvert}{\\lVert\\mathbf n\\rVert}\n      =\\lvert\\,\\sigma h\\pm\\mu\\,\\rvert .\n\\]\n\nThe two values are the unordered pair $\\{\\,h-\\mu,\\,h+\\mu\\,\\}$, because  \n\\[\n   \\lvert\\sigma h-\\mu\\rvert=\\begin{cases}\n        h-\\mu & \\text{if }\\sigma=+1,\\\\[2pt]\n        h+\\mu & \\text{if }\\sigma=-1,\n   \\end{cases}\n   \\qquad\n   \\lvert\\sigma h+\\mu\\rvert=\\begin{cases}\n        h+\\mu & \\text{if }\\sigma=+1,\\\\[2pt]\n        h-\\mu & \\text{if }\\sigma=-1 .\n   \\end{cases}\n\\]\nSince $h>\\mu>0$, the minimum is always $h-\\mu$.  It is realised by the hyperplane whose index is $-\\sigma$; its point of tangency is the unique point of $E$ that attains the minimum distance.  Therefore  \n\\[\n   \\boxed{\\operatorname{dist}(H,E)=h-\\mu}.\n\\]\n\n--------------------------------------------------------------------\n(c)  Explicit nearest point and tangent hyperplanes.\n\nWith $\\sigma=\\operatorname{sgn}(\\mathbf n^{\\mathsf T}\\mathbf c+d)$,  \n\nNearest point on $E$:  \n\\[\n   \\boxed{P=\\mathbf c-\\frac{\\sigma}{m}\\,Q\\mathbf n}\n\\]\n\nParallel tangent hyperplanes:  \n\\[\n   \\boxed{\\mathbf n^{\\mathsf T}\\mathbf x+d_{\\pm}=0,\\quad\n          d_{\\pm}=-\\mathbf n^{\\mathsf T}\\mathbf c\\mp m}.\n\\]\nThe plane with index $-\\sigma$ is the closer one.\n\n--------------------------------------------------------------------\n(d)  Axis–aligned three–dimensional specialisation.\n\nLet $Q=\\operatorname{diag}(a^{2},b^{2},c^{2})$ and $\\mathbf c=\\mathbf 0$,  \nand take the plane $Ax+By+Cz+1=0$ (so $d=1$).  Then\n\\[\n   m=\\sqrt{a^{2}A^{2}+b^{2}B^{2}+c^{2}C^{2}},\\qquad\n   \\lVert\\mathbf n\\rVert=\\sqrt{A^{2}+B^{2}+C^{2}},\\qquad\n   h=\\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}.\n\\]\nHence $\\mu=m/\\lVert\\mathbf n\\rVert$ and the intersection occurs iff $h\\le\\mu$, i.e.  \n\\[\n   \\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}\\le\n   \\frac{m}{\\sqrt{A^{2}+B^{2}+C^{2}}}\\;\\Longleftrightarrow\\; m\\ge 1 .\n\\]\nIf $m<1$ (so the plane does not meet the ellipsoid) the minimum distance is\n\\[\n   \\operatorname{dist}=h-\\mu\n      =\\frac1{\\sqrt{A^{2}+B^{2}+C^{2}}}(1-m)\n      =h(1-m),\n\\]\nwhich coincides with the classical result.\n\n--------------------------------------------------------------------",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.303178",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension: the problem is set in arbitrary \\(\\mathbb{R}^{n}\\) (with \\(n\\ge 3\\)), rather than a fixed \\(3\\)-space.  \n2. Additional structure: the ellipsoid is obtained from an arbitrary positive–definite matrix \\(Q\\) and may be both translated (\\(\\mathbf{c}\\neq 0\\)) and rotated (\\(Q\\) not necessarily diagonal).  \n3. Deeper theory: the solution demands familiarity with quadratic forms, support functions of convex bodies, gradients on manifolds, and properties of symmetric positive–definite matrices.  \n4. Multiple concepts: the solver must combine linear algebra, differential geometry (normals to a quadric), convex–analytic separation arguments, and classical distance-to-a-set ideas.  \n5. More steps: compared with the axis-aligned, centred ellipsoid, extra work is needed to shift the centre, rotate the axes, compute the support function, manage signs, and verify uniqueness.  \n6. Non-trivial verification: part (d) forces the solver to track constants carefully and prove that the complicated general answer indeed reduces to the known simple one.\n\nThese additions collectively raise the technical and conceptual load far above that of both the original problem and the current kernel variant, while preserving the core idea of finding the minimum distance between a quadric surface and a hyperplane."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation"
}