Find quadratic equation based on 2 tangents

I would like to know a way to find an quadratic equation that had 2 given tangents:

For example here is 2 tangents equations:

• y = 1/2 x
• y = 2 x + 2

and 2 abscisses

• x = 0
• x = 3

Is there a simple way to find a quadratic equation that saitisfies those two tangents at respective abscisses?

I'm working in Clojure if it needs to be computer related

• This question appears to be off-topic because it is about mathematics. Questions on Stackoverflow should be at least tangentially related to computer programming.
– Joni
Jan 2, 2014 at 10:43
• I have flagged it for moderator attention. Jan 2, 2014 at 10:44
• You should be a bit more clear: exactly what do you mean by 'quadratic equation', and what do you mean by an equation 'satisfying a tangent'?
– Andreas Rejbrand
Jan 2, 2014 at 10:49
• In comments below you say you are looking for a parabola, and not just any quadratic equation. Do you have any limitations or preferences on the kind of a parabola, for example if its axis should be parallel to the X or Y axis?
– Joni
Jan 2, 2014 at 18:29

Given that:

y = 1/2 x         <=>    1/2 x - y = 0
y = 2 x + 2       <=>    2 x + 2  - y = 0


Therefore

(1/2 x - y)(2 x + 2  - y) = 0


is one quadratic equation that has these two lines as tangents. In fact, if you plot its solutions you'll find they consist of the two lines.

• Yes, I realised the wording was unclear.
– Joni
Jan 2, 2014 at 10:44
• Although your answer is technically correct, I suspect the OP is actually looking for parabolae! :)
– Andreas Rejbrand
Jan 2, 2014 at 10:46
• yes i'm searching for a parabolae, maybe i can specify my question by giving the abscisses at wich the parabolae is tangent to those linear equations
– szymanowski
Jan 2, 2014 at 11:02

From the little that you provide, I infer that you are looking for a parabola equation of the form

y = A x^2 + B x + C


tangent to the two lines at the given abscissas.

The slope is given by

y' = 2 A x + b


Expressing the equal slope conditions, we have

2 A 0 + B = 1/2
2 A 3 + B = 2


giving A = 1/4, B = 1/2.

Expressing the equal ordinate conditions, we have

A 0^2 + B 0 + C = 0 / 2
A 3^2 + B 3 + C = 2 3 + 2


leading to 9/4 + 3/2 = 8 !!!

There is no solution, as there are too many constraints.