Finding the Equation of a Line Tangent to a Function

Rhett Allain
The Startup
Published in
5 min readJun 21, 2020

--

There is no particular reason for this post. I’m just going to solve a math problem. Why? Because I think it’s fun. Here is the problem.

Find the equation of the lines that pass through the point (-1,-4) and are tangent to the function f(x) = 3x².

That’s it. That’s the problem. Here’s the plan. I’m going to solve this particular problem and then show you a cool way to do it with python (for fun).

So, let’s break down the question. First, what does this even mean? Well, there will be a line that passes through the point (-1,-4) — that much is clear. But it also must be tangent to the function. A line tangent to the function would “touch” it in just one point. The slope of the line would be equal to the derivative of that function at the point it touches.

Just in case you don’t remember derivatives, here is a quick review.

OK, now for a sketch to us “grok” this whole thing. Here is the function, the point (-1,-4) and the point where it is tangent (which we don’t yet know).

--

--

Rhett Allain
The Startup

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.