Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am suppose to use calculus to find the max distance between the line $y = x + 2$ and the parabola $y = x^2$ on the interval $x$ greater then or equal to $-1$ and less then or equal to $2$.

I really have no idea what to do. I found the critical numbers and that didn't help at all. I guess all the integers and that didn't help either.

share|improve this question
It is my understanding that the OP wants to maximize $|x+2-x^2|$, not the distance. (I think the stated problem is educationally interesting because it requires a little thought.) – copper.hat Jan 10 at 21:17

4 Answers

up vote 1 down vote accepted

Note: The following solves the problem of maximizing the distance between two points, one on a line and one on a parabola, subject to a constraint. This is what the question above asks, although comments from the OP suggest that the intent was to maximize the difference of the $y$ values for a given $x$.

Here is another way:

Let $(x_1,x_1+2)$ be a point on the line and $(x_2,x_2^2)$ be a point on the parabola. Maximizing the distance is equivalent to maximizing the square of the distance, and the square is more tractable. So, we want to maximize $f(x_1,x_2) = (x_1-x_2)^2+(x_1+2-x_2^2)^2$, subject to $ x_1, x_2 \in [-1,2]$.

First, notice that the function $x_1 \mapsto f(x_1,x_2)$ is always a convex quadratic (ie, a quadratic in $x_1$, and the square term has a non-negative multiplier), regardless of the value of $x_2$. A convex quadratic on a closed interval takes its extreme value at the boundary of the interval. In this case, that gives, $\max(f(-1,x_2),f(2,x_2)) \geq f(x_1,x_2)$. Hence we may presume that $x_1 \in \{-1,2\}$. To find a solution we can maximize $f$ with $x_1$ set to $-1$, and again with $x_1=2$ and pick the maximum value.

Let $f_1(x_2) = f(-1,x_2), f_2(x_2) = f(2,x_2)$. Expanding these gives $f_1(x_2) = (1-x_2^2)^2+(1+x_2)^2$, $f_2(x_2) = (4-x_2^2)^2+(x_2-2)^2$.

We have $f_1'(x_2) = 2(x_2+1)(2x_2^2-2 x_2+1)$. The latter factor has no real roots, hence $f_1$ is non-negative, and is monotonic on the intervals $(-\infty,-1]$ and $[-1,\infty)$. Hence the maximum of $f_1$ on $[-1,2]$ is $f_1(2) = 18$.

$f_2'(x_2)= 2(x_2-2)(x_2+1-\frac{1}{\sqrt{2}})(x_2+1+\frac{1}{\sqrt{2}})$. Hence $f_2$ is monotonic on the intervals $(-\infty, -1-\frac{1}{\sqrt{2}}]$, $[-1-\frac{1}{\sqrt{2}},-1+\frac{1}{\sqrt{2}}]$, $[-1+\frac{1}{\sqrt{2}}, 2]$ and $[2,\infty)$. A moment's thought shows that $f_2$ is maximized at $x_2=-1+\frac{1}{\sqrt{2}}$ on the interval $[-1-\frac{1}{\sqrt{2}}, 2]$, and $f_2(-1+\frac{1}{\sqrt{2}}) = \frac{71+\sqrt{128}}{4} > 18$.

Hence the maximum distance is $\sqrt{\frac{71+\sqrt{128}}{4}}$ and it occurs at $x_1 = 2, x_2 = -1+\frac{1}{\sqrt{2}}$.

Addendum: Here is a solution to the actual problem I think the OP is trying to ask (with apologies to @Git Gud):

First, you should draw a picture. enter image description here

Solve $\max_{x \in [-1,2]} |x+2-x^2|$. First note that $x+2 \geq x^2$ if and only if $x \in [-1,2]$, so the problem becomes $\max x+2-x^2$. Setting the derivative to zero gives $x=\frac{1}{2}$, hence the maximum value is $\frac{9}{4}$ which occurs at $x=\frac{1}{2}$.

share|improve this answer
I have no clue what you are going on about. I can't even follow what you say at all without a dictionary. I have no idea what maximizing the square of the distance is or where it came from. I don't know what subject to means, I don't know what the E means I don't know what that arrow implies I don't know what a convex quadratic is, this makes all the math impossible to follow. – user56699 Jan 10 at 20:41
Settle down. I am trying to help you by answering your question. Can you confirm that the problem is to find the maximum distance between the two curves, or did you mean to maximize the difference between the two functions? The first problem takes some effort, which I have expended, the latter is straightforward. – copper.hat Jan 10 at 20:48
I am finding the max vertical distance. – user56699 Jan 10 at 20:51
That is not what your question asked. – copper.hat Jan 10 at 20:57
So what do I do? – user56699 Jan 10 at 21:01
show 5 more comments

Clearly, $P(t,t^2)$ is any point of the parabola.

The distance of the line: $y=x+2$ from $P(t,t^2)$ is $$\left|\frac{t-t^2+2}{\sqrt{1^2+1^2} }\right|=\frac{|t-t^2+2|}{\sqrt2}$$

Let $f(t)=t-t^2+2$

so, $f'(t)=1-2t$

For the extreme values of $f(t), f'(t)=0\implies t=\frac12$

Now, $f''(t)=-2<0$

So, $f(t)$ will be maximum at $t=\frac12$

$$f(t)_{max}=\frac12-\left(\frac12\right)^2+2=\frac94$$

So, the maximum distance is $\frac{\frac94}{\sqrt 2}$ unit $=\frac 9{4\sqrt2}$ unit and $P$ being $(\frac12, \left(\frac12\right)^2)$ or $(\frac12,\frac14)$

The maximum value of $f(t)$ can also be derived in the following way.

Let $y=t-t^2+2\implies t^2-t+2-y=0$ which is a quadratic equation in $t$.

As $t$ is real, the discriminant $(-1)^2-4(y-2)\ge 0\implies y\le \frac94$

share|improve this answer
Clearly? I don't understand what you mean by P(t, t^2) – user56699 Jan 10 at 18:42
@user56699, have you heard parametric equation. If we put $x=t, y=x^2=t^2$ so ,any point on the parabola $y=x^2$ can be written as $(t,t^2)$ – lab bhattacharjee Jan 10 at 18:44
I have never heard of a parametric equation before. – user56699 Jan 10 at 20:38
This is incorrect. You are finding the maximum of the minimum distances, not the maximum. – copper.hat Jan 10 at 21:04
@copper.hat, could you please elaborate a bit? – lab bhattacharjee Jan 11 at 15:03
show 1 more comment

What is 'distance'? My guess is you don't understand what's being asked, so let me clarify:

Hint: You're looking for the number, if it exists, $\max \limits_{x\in[-1,2]}\left (|f(x)|\right)$ where $f(x)=x^2-(x+2)$, for all $x\in [-1,2]$. Notice that $[-1,2]$ is closed and bounded, therefore any continuous function defined on that interval will attain a maximum and a minimum. This proves that the number exists. Now just look at the critical points of $f$ and take their absolute values (for both maxima and minima).

share|improve this answer
Why do you presume that the OP is not asking for actual $\mathbb{R}^2$ distance? – copper.hat Jan 10 at 18:44
I did this and I get 1 being the smallest number the line can be and 4 being the largest the arablo can be and that is wrog. – user56699 Jan 10 at 18:45
@user56699 As copper.hat pointed out, what I wrote is for the distance in $\mathbb{R}$. Is that not what you want? – Git Gud Jan 10 at 18:57
I don't know the difference or what R is. – user56699 Jan 10 at 20:50
@GitGud: I believe that your interpretation is correct. – copper.hat Jan 10 at 20:59
show 4 more comments

Hint. See the Math Java Applet in

http://www.ies.co.jp/math/java/conics/draw_parabola/draw_parabola.html

for a geometry ideia.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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