Finding Simultaneous Tangent Lines

© 2005 by Karl Hahn
KCT logo (click for Home Page)

Finding Lines Simultaneously Tangent to Two Functions

In the main section you learned how to find the equation of a line that is tangent to a given function. There were two types of problems. One was finding the line when the point of tangency was given. This was pretty easy because knowing the point of tangency is the most important piece of information in any tangent-line problem, and this type of problem gives you that information. The second type of problem is where it gives some point that is not on the function and asks you to find the line that goes through that point and is also tangent to the function in questions. This is a little harder. You have to solve for the point of tangency in order to find the tangent line. On the main page you saw that there are at least two ways to solve this kind of problem.

On this page we go one step further. We will solve an example that gives two functions,  f(x)  and  g(x),  and it asks you to find the equation(s) of the line or lines that are simultaneously tangent to both of them. So now you will have two points of tangency, and you must solve for both of them simultaneously.

The example that I will do here for you, step-by-step, is this:

Find the equation(s) of the line or lines that are simultaneously tangent to:
  f(x) = x2 + 4
and
  g(x) = -(x - 1)2

As mentioned already, there are two points of tangency to solve for -- where the solution-line is tangent to  f(x),  and where it is tangent to  g(x).  We don't know what these points are yet, but the first step to solving for them is to give them names.

Step 1: Name the points of tangency. Each point is an ordered pair of an x component and a y component. You can call the components anything you wish. For clarity's sake, I will call them,  (xf, f(xf))  and  (xg, g(xg)).  Using the same subscripting, I could have named them  (xf, yf)  and  (xg, yg),  (and that also works to solve the problem), but the naming I've selected better illustrates where the ordinate component (i.e., the second component) of each ordered pair comes from. It shows that the first point is on the function,  f(x),  and that the second point is on the function,  g(x)

To solve for these two points, we need to gather what information we have about them. Just above I already mentioned two key facts about the points -- that each is on its respective function. So what else do we know? Any line has the same slope everywhere. So the solution-line will have the same slope, m, at both the points of tangency. Not only that, but at  (xf, f(xf)),  the derivative of  f(x)  will be equal to m and at  (xg, g(xg)),  the derivative of  g(x)  will also be equal to m. To convert these latter two facts into equations, we will have to know the derivatives of both our functions. That is step 2.

Step 2: Find the derivatives of both functions. This step should be pretty easy for you by now. Using the power rule you find that

  f'(x) = 2x
Combining the power rule with the chain rule, you find that
  g'(x) = -2(x - 1)
Remember we already determined that the derivative of the first function at xf must be equal to the slope of the line, m. And we determined that the derivative of the second function at xg must also be equal the slope of the line, m. Two things that are both equal to a third are equal to each other. Hence the next step:

Step 3: Use the derivatives to find the relationship between xf and xg.

  f'(xf)  =  m  =  g'(xg)  hence

  f'(xf)  =  g'(xg)

  2xf  =  -2(xg - 1)

  xf  =  -(xg - 1)

  xf  =  1 - xg
and equivalently
  xg  =  1 - xf
Finally, the remaining fact is that we have a line that passes through two points,  (xf, f(xf))  and  (xg, g(xg)).  A line is completely determined by any two distinct points it passes through. Hence the slope of the line is determined by any two points it passes through. Recall from algebra that the slope of a line is the rise over the run. So the next step is...

Step 4: Write the equation for the slope of the line, m, then substitute for m.


  m  =

  g(xg) - f(xf)
               
     xg - xf

Already we know that m is equal to both  f'(xf)  and  g'(xg).  Take your choice of either of these to substitute for m. I'm choosing the first because it's a simpler expression, but you get the same solution if you choose the second.


  f'(xf)  =  2xf  =

  g(xg) - f(xf)
               
     xg - xf

What remains to be done before we actually solve for one of the variables is to substitute until we have an equation with just one variable in it. We already determined that  xg = 1 - xf.  So

Step 5: Substitute to eliminate one of the variables. I have chosen to eliminate xg, but you can do it just as well eliminating xf.


  2xf  =

  g(1 - xf) - f(xf)
                   
    (1 - xf) - xf

The denominator simplifies to  1 - 2xf.  We still have the function names in the numerator. We need to get the numerator to be an algebraic expression of xf. But that's easy, and is the next step.

Step 6: Use the definitions of f and g to substitute into the numerator. Recall from the original problem that  f(x) = x2 + 4  and  g(x) = -(x2 - 1).  So


  2xf  =

  -((1 - xf) - 1)2 - xf2 - 4
                            
            1 - 2xf

Step 7: Solve for the remaining variable, which, in this case, is xf. The numerator simplifies:


  2xf  =

  -2xf2 - 4
           
   1 - 2xf

Now multiply both sides by the denominator and do some algebra-munging:

   2xf(1 - 2xf)  =  -2xf2  -  4

   2xf - 4xf2  =  -2xf2  -  4

   2xf  =  2xf2  -  4

   0  =  2xf2  -  2xf  -  4
which is a quadratic, so you apply the quadratic formula.


  xf =

  2 ± √4 + 32
               =
       4
  2 ± √36
           =
     4
  2 ± 6
         =
    4
  1
     ±
  2
  3
     =
  2
  -1 or 2

Since there are two solutions for xf, you can expect that there will be two solution-lines.

Step 8: Determine the equations of the solution-lines. So far we have solved for the x component of one of the two points of tangency. But by back-substituting xf it is easy to find out everything else we need to construct the solution-lines. One thing we would like to know is the slopes of the solution-lines. Recall that  m = f'(xf) = 2xf.  Now that we know the values for xf, it's easy to apply this to find m for both lines:  m = -2  for the first line and  m = 4  for the second. We also know that each line must pass through its point of tangency with  f(x).  By definition that point is  (xf, f(xf)).  Plugging in the two solutions for xf you find that the points of tangency for the two solution-lines with  f(x)  are  (-1, 5)  and  (2, 8).  In the figure on the right you can see points of tangency to the upper curve,  f(x),  at these points. Recall that the equation for the line of slope, m, that passes through the point,  (h,k),  is given by the formula,  y-k = m(x-h).  From that you get the equations for the two lines as

  y-5  =  -2(x+1)
  or equivalently  
  y = -2x + 3
  y-8  =  4(x-2)
  or equivalently  
  y = 4x

I leave it as an exercise for you to determine the points of tangency to the lower curve,  g(x)


Return to main page

You can email me by clicking this button:

  Use your own emailer     Use form