# Find a parabola so that the curve is continuous

I need to fit a parabola between

1) $y = -0.25x + 1.5$, on the interval $[0, 2]$

2) $y = 3$, on the interval $[4,6]$

Such that the resulting curve is continuous.

My thought process was as follows: Since it only has to be continuous, I need to make sure the right- and left endpoint of the graphs need to be hit.

I thought to fit a parabola using $(2,1)$ as the vertex of the parabola and making sure $(4, 3)$ (since that's the right endpoint of $y=3$), is on the graph.

As a possible solution, I came up with the parabola: $0.5x^2 - 2x + 3$ (see figure below). I would argue that $$\lim_{x \to 4^-} 0.5x^2 - 2x + 3 == \lim_{x \to 4^+} 3$$

Alas, my solution was incorrect. What would be a better way to approach this?

The required parabola is $$\color{red}{y=0.625x^2-2.75x+4}$$

Both $(2,1)$ and $(4,3)$ lie on this parabola, and the slope at $(2,1)$ is $-0.25$.

The curve is obtained by using a general quadratic and specifying that both the given points lie on it, and that the slope $2ax+b$ at $(2,1)$ is $-0.25$.

• This indeed is the correct answer – Apeiron Jun 28 '17 at 10:22
• ?? it's not differentiable at x=4 – Saketh Malyala Jun 29 '17 at 23:17
• From the diagram in the question it appears that OP wants it to be differentiable at $(2,1)$. Not possible to be both. – hypergeometric Jun 30 '17 at 0:36
• @Apeiron - Thank you. Glad to know it was useful. – hypergeometric Jun 30 '17 at 16:08

You actually almost had it. Probably some silly mistake.

We place the vertex at $(2,1)$, and make sure it hits the point $(4,3)$.

Our parabola should be of the form $y=a(x-2)^2+1$.

Plugging in $y=3$, $x=4$, gives us $3=a(4-2)^2+1$, or $3=4a+1$, so $\displaystyle a=\frac{1}{2}$.

We have $\displaystyle y=\frac{1}{2}(x-2)^2+1$.

If you want to put that into standard form, it is $\displaystyle y=\frac{1}{2}x^2-2x+3$.

Which is what you got.

This curve is continuous. SO how exactly are you wrong?

UPDATE

The curve must be differentiable.

We have the curve $y=ax^2+bx+c$.

We obtain $y'=2ax+b$.

We need that $y'(4)=0$, so $0=8a+b$.

We also need that $y'(2)=-0.25$, so $-0.25=4a+b$.

Solving this system gives us $\displaystyle a=\frac{1}{16}$, and $\displaystyle b=-\frac{1}{2}.$

Therefore, $\displaystyle y=\frac{1}{16}x^2-\frac{1}{2}x+c$.

We plug in $y=3$, $x=4$, to get $3=1-2+c$, so $c=4$.

UPDATE:

Just kidding. This isn't even possible.

By the Mean Value Theorem, we need some point on the parabola to have slope $1$.

A fitted parabola must begin decreasing, then start increasing. However, if it begins increasing, then it can no longer have a flat tangent at $x=4$, and be differentiable to $y=3$.

• Hmm, after reading the exercise again, I should have made sure the curve is smooth i.e. tangent lines of endpoints must match (so it does have to be differentiable). And: what software do you use to graph? – Apeiron Jun 28 '17 at 7:55
• I used desmos. also in that case i'll show you how to make it differentiable – Saketh Malyala Jun 28 '17 at 8:00
• The answer is not correct. $y=\frac {x^2}{16}-\frac x2+4$ does not pass through $(2,1)$. – hypergeometric Jun 28 '17 at 13:50
• The parabola cannot be differentiable and pass through both points. @hypergeometric – Saketh Malyala Jun 29 '17 at 19:27
• It can pass through both points and be differentiable at one, in this case $(2,1)$. – hypergeometric Jun 30 '17 at 0:37

An endpoint is (2; 1) on the slant line. Another endpoint is (4; 3) on the horizontal line. So consider a general parabola of equation

$$y=ax^2+bx+c$$

We know that for $x=2$ must be $y=1$ and for $x=4$ must be $y=3$. Thus substituting you get two equations

$$4 a + 2 b + c=1;\;16 a + 4 b + c = 3$$

Solving for $a;\;b$ you get

$$a= \frac{c+1}{8};\;b= \frac{1}{4} (1-3 c)$$

if you want no fraction you can freely set $c=7$ and have the parabola

$$y=x^2 - 5 x + 7$$

Hope it is clear

• Nope. It isn't differentiable. – Saketh Malyala Jun 29 '17 at 19:27