2
$\begingroup$

I want to find the shortest distance between point $(2,0)$ and function $\sqrt{16x^2 + 5x+16}$, So I did the optimization but the answer is always wrong.

$$\begin{align}D=&\sqrt{(x-2)^2+(y)^2}\\ y^2=&{16x^2 + 5x+16}\\ &\text{(by substituting)}\\ D=&\sqrt{(x-2)^2+(16x^2 + 5x+16)}\\ D=& \sqrt{17{x}^{2}+ x + 20}\\ &\text{(Convert to a polynomial since root doesn't matter in the domain)}\\ D(x)=& 17x^2+x+20 \\ D^\prime(x)=& 34x+1 \\ x =& \frac{-1}{34}\end{align}$$

Which is clearly not the closest point, So what did I do wrong?

Here is the question and my answer, which is evaluated as wrong. enter image description here

$\endgroup$
  • $\begingroup$ I was wrong, it actually looks strange :) $\endgroup$ – Sil Nov 27 '16 at 18:11
  • $\begingroup$ Have you substituted $x$ into $D$ to find the distance? $\endgroup$ – Namaste Nov 27 '16 at 18:12
  • $\begingroup$ @amWhy Yes I did, I assumed that my answer was wrong after I looked at a plot which didn't really convince me that the closest point is at $\frac{-1}{34}$ $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:14
  • $\begingroup$ Should the path to the closest point be perpendicular to the tangent line or does this apply only for straight lines? $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:16
  • $\begingroup$ I'm wondering about your decision to to equate $D(x) = \sqrt{17x^2+ x + 20}$ to $D(x) = 17x^2 + x + 20 = (D(x))^2$? You should have $(D(x))^2 = 17x^2 + x + 20?$ $\endgroup$ – Namaste Nov 27 '16 at 18:29
2
$\begingroup$

Your result is correct. The confusion is caused by the software you use to vizualize the graph - they do scale the axis differently AND they hide values of $y$ (see some graphs below for omitted values between $0$ and $3$).

Maple (even with 1:1 ratio checked, values hidden on $y$ axis):

enter image description here

Google: (all $y$ values shown, but scale is different)

enter image description here

Mathematica (with AspectRatio->1, again missing values on $y$ axis)

enter image description here

You need to be careful about this and setup tools properly. Here is for example Geogebra which is using 1:1 scale by default and does not hide any values from the plot since you see whole canvas (https://www.geogebra.org/graphing). You can see that your result now makes sense visually.

enter image description here

$\endgroup$
  • $\begingroup$ Ok, but when i insert the result I got in the quiz it get evaluated as wrong, May be it has something with the power 2 (look at the question's comments). $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:55
  • 1
    $\begingroup$ What are you inserting where? $\endgroup$ – Sil Nov 27 '16 at 18:56
  • $\begingroup$ Quiz on Optimization on Coursera, Calculus One course. $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:58
  • $\begingroup$ Well based on your updated question, you are inserting function value, not the distance value. $\endgroup$ – Sil Nov 27 '16 at 19:10
  • $\begingroup$ Maple should give a better plot with the "scaling=constrained" option. $\endgroup$ – tilper Nov 27 '16 at 19:29
1
$\begingroup$

We can minimize $(x-2)^2+y^2$ for convenience, since squaring is increasing on positive reals. Then as you substituted $$ f(x)=(x-2)^2+16x^2+5x+16\Rightarrow f(x)=17x^2+x+20\Rightarrow f'(x)=34x+1=0\Rightarrow x=-\frac{1}{34} $$ As you found. Making the closest point on the curve $$ (-\frac{1}{34},\sqrt{16(1/34)^2-5/34+16})\sim (-.03,3.99) $$ What's the problem?

$\endgroup$
  • 1
    $\begingroup$ And the distance should be somewhere close to 3.98, but the quiz I am taking evaluate this as a wrong answer. $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:27
  • $\begingroup$ @OmarAhmad, try giving an exact answer instead of an approximate one. e.g. $\sqrt 2$ and not $1.414$ etc. $\endgroup$ – tilper Nov 27 '16 at 18:50
  • $\begingroup$ @tilper Actually we insert the formula itself not numbers, so it is not about perception. $\endgroup$ – Omar Ahmad Nov 27 '16 at 18:52
  • $\begingroup$ @OmarAhmad insert what formula? I'm not sure I understand. $\endgroup$ – tilper Nov 27 '16 at 18:53
  • 1
    $\begingroup$ @OmarAhmad ah, got it. Aren't you supposed to give the distance though? So you should be using $\sqrt{17x^2 + x +20}$. $\endgroup$ – tilper Nov 27 '16 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.