The question is: Find the points on the ellipse defined by the equation $x^2 + 4y^2 = 4$ nearest the point $(1,0)$. I'm having a hard time coming up with the change in x half of the distance formula.
Optimization of an Ellipse
1.6k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
Hint: find a function that gives the distance between points on the ellipse and the point $(1,0)$, then find the critical points of its implicit derivative.
On
The best way to solve this problem I have found is: $$x^2+4y^2=4$$ Solve for $y(x)$ $$y=\pm\frac{\sqrt{4-x^2}}{2}$$ Actual point. $$p_x=1, p_y=0$$ $$dist=\sqrt{(p_x-x)^2+(p_y-y)^2}$$ To minimize, differentiate $dist$ with respect to $x$. Remember $y=y(x)$! $$dist'=\frac{2(p_x-x)(-1)+2(p_y-y(x))y'(x)}{2*\sqrt{(p_x-x)^2+(p_y-y)^2}}$$ Differentiate $y(x)$ separately for clarity. $$y'(x)=\mp\frac{2x}{2*2*\sqrt{4-x^2}}$$ Plug in and expand. $$dist'=\frac{2(p_x-x)(-1)+2(p_y-\left(\pm\frac{\sqrt{4-x^2}}{2}\right))\left(\mp\frac{2x}{2*2*\sqrt{4-x^2}}\right)}{2*\sqrt{(p_x-x)^2+(p_y-y)^2}}$$ Set this expression equal to zero and solve for $x$: $$0=\frac{2(p_x-x)(-1)+2(p_y-\left(\pm\frac{\sqrt{4-x^2}}{2}\right))\left(\mp\frac{2x}{2*2*\sqrt{4-x^2}}\right)}{2*\sqrt{(p_x-x)^2+(p_y-y)^2}}$$ $$0={2(p_x-x)(-1)+2(p_y-\left(\pm\frac{\sqrt{4-x^2}}{2}\right))\left(\mp\frac{2x}{2*2*\sqrt{4-x^2}}\right)}$$ $$0={-2p_x+2x+2p_y\left(\mp\frac{x}{2*\sqrt{4-x^2}}\right)-2\left(\pm\frac{\sqrt{4-x^2}}{2}\right)\left(\mp\frac{x}{2*\sqrt{4-x^2}}\right)}$$ Notice that the $\pm*\mp=-1$. $$0={-2p_x+2x+2p_y\left(\mp\frac{x}{2*\sqrt{4-x^2}}\right)+2\left(\frac{\sqrt{4-x^2}}{2}\right)\left(\frac{x}{2*\sqrt{4-x^2}}\right)}$$ $$0={-2p_x+2x+2p_y\left(\mp\frac{x}{2*\sqrt{4-x^2}}\right)+\left(\frac{x}{2}\right)}$$ Collect some terms: $$0={-2p_x+\frac{3x}{2} \mp\frac{p_y *x}{\sqrt{4-x^2}}}$$ Trig substitution $x=2\sin \theta$: $$0={-2p_x+\frac{3*2\sin\theta}{2} \mp\frac{p_y *2\sin\theta}{\sqrt{4-(2\sin\theta)^2}}}$$ Simplify: $$0={-2p_x+{3\sin\theta} \mp\frac{p_y *2\sin\theta}{\sqrt{4-4\sin^2 \theta}}}$$ $$0={-2p_x+{3\sin\theta} \mp\frac{p_y *2\sin\theta}{2\sqrt{\cos^2 \theta}}}$$ $$0={-2p_x+{3\sin\theta} \mp\frac{p_y *\sin\theta}{\cos \theta}}$$ $$0=-2p_x+{3\sin\theta} \mp{p_y \tan\theta}$$ $$2p_x={3\sin\theta} \mp{p_y \tan\theta}$$ At this point, I don't think there is an exact analytical solution.
Hang on: for $p_x=1,p_y=0$, there is, since the $\tan \theta$ term drops out: $$2*1={3\sin\theta} \mp{0*\tan\theta}$$ $$2={3\sin\theta}$$ Solve: $$\theta=\sin^{-1} \frac{2}{3}$$ Back substitute into $x=2\sin \theta$ $$x=2\sin \left(\sin^{-1} \frac{2}{3} \right)$$ $$x=\frac{4}{3},y=\frac{\sqrt{4-\frac{16}{9}}}{2}=\frac{\sqrt{20}}{6}$$ So your solution is, I believe: $$x=\frac{4}{3},y=\pm\frac{\sqrt{20}}{6}$$
First of all, a general tip on problems about minimizing (or maximizing) distance:
Do not write a function for distance; instead write one for the square of the distance. This saves you from having to differentiate expressions involving square root.
That said, here is my approach to the problem: Parameterize the ellipse by $x(\theta) = 2\cos{\theta}$ and $y(\theta) = \sin{\theta}$, where $0≤\theta≤2\pi$. Then the square of the distance from $(x(\theta),y(\theta))$ to $(1,0)$ is given by $$f(\theta) = (2\cos{\theta}-1)^2+\sin^2{\theta}.$$ Differentiating, we have $$f’(\theta) = 2(2\cos{\theta}-1)(-2\sin{\theta})+2\sin{\theta}\cos{\theta} = 2\sin{\theta}(-3\cos{\theta}+2).$$Now, $f’(\theta) = 0$ when $\sin{\theta} = 0$ or when $\cos{\theta}=\frac{2}{3}$.
If $\sin{\theta} = 0$, then $\theta=0$ or $\theta=\pi$. Substituting into $f$, we have $f(0)=1$ and $f(\pi)=9$.
Meanwhile, if $\cos{\theta}=\frac{2}{3}$, then $$f(\theta) = (\frac{4}{3}-1)^2+\frac{5}{9} = \frac{2}{3}<1.$$
Thus, the minimum distance is $\sqrt{\frac{2}{3}}$, occurring when $x=\frac{4}{3}$ and $y=\pm\frac{\sqrt{5}}{3}$.