Calculus How To

Tangent Line: Definition, Formula & Newton’s Method

Contents:

  1. What is a Tangent Line?
  2. Finding Tangent Lines
  3. Newton’s Method

1. What is a Tangent Line?

finding tangent linesA tangent line is a line that touches a graph at only one point and is practically parallel to the graph at that point. It is the same as the instantaneous rate of change or the derivative .

tangent line examples
If a line goes through a graph at a point but is not parallel, then it is not a tangent line. This image on the left shows a tangent line at the top left (touching at the red dot). However, the line also crosses the graph at the bottom right (the blue dot); it is not parallel to the graph at that point and therefore it is not a tangent line at that second point.tangent line example

Finding the Tangent Line

Finding tangent lines for straight graphs is a simple process, but with curved graphs it requires calculus in order to find the derivative of the function, which is the exact same thing as the slope of the tangent line. Once you have the slope of the tangent line, which will be a function of x, you can find the exact slope at specific points along the graph.

Keep in mind that f(x) is also equal to y, and that the slope-intercept formula for a line is y = mx + b where m is equal to the slope, and b is equal to the y intercept of the line. In order to find the tangent line at a point, you need to solve for the slope function of a secant line. You can find any secant line with the following formula:
(f(x + Δx) – f(x))/Δx or lim (f(x + h) – f(x))/h.

Example problem: Find the tangent line at a point for f(x) = x2.

Note: If you have gone further into calculus, you will recognize the method used here as taking the derivative of the graph. If you know how to take derivatives of a function, you can skip ahead to the asterisked point (*) of step 2.

Step 1: Set up the limit formula. Substituting in the formula x2:
lim ((x + h)22 – x2)/h
h → 0

Step 2: Use algebra to solve the limit formula.
lim (x2 + 2xh + h2 – x2)/h
h → 0
lim (2xh + h2)/h
h → 0
lim h(2x + h)/h
h → 0
*lim 2x + h = 2x
h → 0
This gives the slope of any tangent line on the graph.

Step 3: Substitute in an x value to solve for the tangent line at the specific point.
At x = 2,
2(2) = 4.

That’s it!

What is Newton’s Method?

Newton’s method (also called the Newton–Raphson method) is a way to find x-intercepts (roots) of functions. In other words, you want to know where the function crosses the x-axis. The method works well when you can’t use other methods to find zeros of functions, usually because you just don’t have all the information you need to use easier methods. While Newton’s method might look complex, all you’re actually doing is finding a tangent line…then another tangent line…and repeat, until you think you’re close enough to the actual solution.

The general form of Newton’s Method is:

If xn is an approximate solution of f(x) = 0,f'(x)n ≠ 0, then the next approximate solution is given by:
newton's method

Where:

  • xn is the x-intercept (initially, your best guess),
  • fxn is the function you’re working with,
  • f’xn is the derivative of the function you’re working with.

What’s basically happening with this equation is each iteration (subsequent calculation) takes you closer and closer to the true solution, as the following image shows. The true solution is marked in red. The blue line is the tangent line for x0 (Guess 1) and the green line is the tangent line for the second iteration. Eventually, your answers will get closer and closer (converge) to the red x-value.
newtons method example

Newton’s Method: Step by Step Example

Example: Find the x-intercept for f(x) = cos x – x on the interval [0,2]

Step 1: Insert your function into the general form of the equation. The bottom half of the equation is the derivative. The derivative of cos x – x is -sin x – 1, so:
finding tangent lines

Step 2: Take a guess for the actual x-intercept and insert that guess into your function from Step 1. We’re given the interval [0,2] in the question, so a good guess to start with is 1 (because it’s in the middle of the interval).

Step 3: Evaluate the function from Step 2 using any calculator (I just used the Google calculator):
= 1 -( cos(1)-1) / ( – sin(1) – 1))
= 0.7503638679

Step 4: Repeat Steps 2 and 3, using the new guess for the x-intercept that you obtained from Step 3. This is the second iteration, x2.
0.7503638679 -( cos(0.7503638679 )-0.7503638679 ) / ( – sin(0.7503638679 ) – 1)) =
0.73911289091

Step 5: Repeat Steps 2 and 3 with your new estimate for as many times as you need. Eventually your answer will converge to a single number. If you compare x1(Step 2) with x2 (Step 3), you’ll notice that the first digit is “7” in both cases. That means we’ve got an
accuracy of one decimal place. If you perform a third iteration, you’ll have an accuracy to three decimal places (0.739xxxxxxx). Repeat Steps for as many decimal places as you need.

Warning: A downside to Newton’s method; it will not work if you pick a point where the tangent line is horizontal.

Related Articles

------------------------------------------------------------------------------

Need help with a homework or test question? With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!