How to find the equation of a tangent line

One common application of the derivative is to find the equation of a tangent line to a function. Usually when you’re doing a problem like this, you will be given a function whose tangent line you need to find. And you will also be given a point or an x value where the line needs to be tangent to the given function.

Using these two pieces of information, you need to create an equation for a line that satisfies the required conditions. This process is very closely related to linear approximation (or linearization) and differentials.

When coming up with the equation of the line, there are a couple different approached you could take. You should decide which one to use based on your own personal preference. The only difference between the different approaches is which template for an equation of a line you prefer to use. Remember, there are two main forms that a line will take: $$y=mx+b$$ $$y=m(x-x_0)+y_0$$ Another thing to keep in mind is that the first form is generally easier when we are given the y-intercept of the line. The second form above is usually easier when we are given any other point that isn’t the y-intercept.

In both of these forms, x and y are variables and m is the slope of the line. In the first equation, b is the y-intercept. And in the second equation, x_0 and y_0 are the x and y coordinates of some point that lies on the line. This could be any point that lies on the line.

It is also important to notice that a line would be tangent to a function at a specific point if and only if the following two conditions are met.

  • The function and its tangent line need to go through the same point
  • and they both need to share the same slope at that shared point.

But how does the derivative apply?

You should always keep in mind that a derivative tells you about the slope of a function. So if we take a function’s derivative, then look at it at a certain point, we have some information about the slope of the function at that point. Since a tangent line has to have the same slope as the function it’s tangent to at the specific point, we will use the derivative to find m.

So let’s jump into a couple examples and I’ll show you how to do something like this.

Example 1

Find the equation of the tangent line to the function \mathbf{y=x^3+4x-6} at the point (2, 10).

In order to find this tangent line, let’s consider the two conditions that need to be met for our line to be a tangent line at the specified point.

  1. The tangent line and the given function need to go through the same point. Since the problem told us to find the tangent line at the point (2, \ 10), we know this will be the point that our line has to go through.
  2. The tangent line and the function need to have the same slope at the point (2, \ 10). In order to find this slope we will need to use the derivative. Let’s start with this.

Finding the slope of the tangent line

Remember that the derivative of a function tells you about its slope. So to find the slope of the given function y=x^3+4x-6 we will need to take its derivative. This will just require the use of the power rule. $$y’=3x^2+4$$

But how can we use this to find the slope of the tangent line when it has variables in it?

This is where the specific point we need to consider comes into play. We know that the tangent line and the function need to have the same slope at the point (2, \ 10). Therefore, they need to have the same slope when x=2. In order to find the slope of the given function y at x=2, all we need to do is plug 2 into the derivative of y.

Therefore, the slope of our line would simply be $$y'(2)=3(2)^2+4=16.$$ And because of this we also know the slope of our tangent line will be $$m=16.$$ So we know this will guarantee that our tangent line has the right slope, now we just need to make sure it goes through the right point.

Making sure the tangent line contains the given point

Since we do know a point that has to lie on our line, but don’t know the y-intercept of the line, it would be easier to use the following form for our tangent line equation. $$y=m(x-x_0)+y_0$$

And since we already know m=16, let’s go ahead and plug that into our equation. $$y=16(x-x_0)+y_0$$

Now to finish our tangent line equation, we just need the x and y coordinates of a point that lies on this line. Then we can simply plug them in for x_0 and y_0. Well, we were given this information! We were told that the line we come up with needs to be tangent at the point (2, \ 10). Therefore, our tangent line needs to go through that point. This tells us our tangent line equation must be $$y=16(x-2)+10$$ $$y=16x-32+10$$ $$y=16x-22$$

And that’s it! We know that the line y=16x-22 will go through the point (2, 10) on our original function. And we know that it will also have the same slope as the function at that point.

We can even use Desmos to check this and see what our function and tangent line look like together.

tangent line to a function
y=x^3+4x-6 and y=16x-22

Example 2

Find the equation of the line that is tangent to the function f(x) = xe^x when x=0.

To start a problem like this I suggest thinking about the two conditions we need to meet.

  1. The tangent line and the given function need to intersect at \mathbf{x=0}. This time we weren’t given the y coordinate of this point so we will need to figure that out.
  2. Then we need to make sure that our tangent line has the same slope as f(x) when \mathbf{x=0}.

Finding the slope of the tangent line

I personally think that it’s a little easier to find the slope of the tangent line first, but you can start with making sure the other condition is met if you prefer.

When you’re asked to find something to do with slope, your first thought should be to use the derivative. The derivative of a function tells you about it’s slope. Since we need the slope of f(x), we’ll need its derivative.

Looking at our function f(x)=xe^x you can see that it is the product of two simpler functions. To find it’s derivative we will need to use the product rule. I’m not going to show every step of this, but if you aren’t 100% sure how to find this derivative you should click the link in the last sentence. $$f'(x) = e^x + xe^x$$ $$f'(x) = e^x \big(1+x \big)$$

Now consider the fact that we need our tangent line to have the same slope as f(x) when x=0. To find the slope of f(x) at x=0 we just need to plug in 0 for x into the equation we found for f'(x). $$f'(0) = e^{(0)} \big( 1 + (0) \big)$$ $$f'(0) = 1(1)=1$$

So we know that the slope of our tangent line needs to be 1.

Making sure the tangent line contains the required point

Now we just need to make sure that our tangent line shares the same point as the function when x=0. In order to do this, we need to find the y value of the function when x=0. This would be the same as finding f(0). $$f(0) = (0)e^{(0)} = 0$$

Since this is the y value when x=0, we can also say that this is the y-intercept. We know the y intercept of our tangent line is 0. Since we figured out the y-intercept, it would be easiest to use the y=mx+b form of the line for the tangent line equation.

We already found that the slope will be 1 and that the y-intercept will need to be 0, so we can plug these values in for m and b. Doing this tells us that the equation of our tangent line is $$y=(1)x+(0)$$ $$y=x.$$

Again, we can see what this looks like and check our work by graphing these two functions with Desmos.

tangent lines example 2
y=xe^x and y=x

Finding the Tangent Line Equation with Implicit Differentiation

Depending on the curve whose tangent line equation you are looking for, you may need to apply implicit differentiation to find the slope.

Example 3

Find the equation of the line that is tangent to the curve \mathbf{y^3+xy-x^2=9} at the point (1, 2).

First we need to apply implicit differentiation to find the slope of our tangent line.

$$\frac{d}{dx} \big[ y^3 + xy – x^2 \big] = \frac{d}{dx} [9]$$ $$3y^2 \frac{dy}{dx} + 1\cdot y + x \cdot \frac{dy}{dx} – 2x = 0$$ $$3y^2 \frac{dy}{dx} + x \frac{dy}{dx} = -y + 2x$$ $$\frac{dy}{dx} \big[ 3y^2 + x \big] = -y + 2x$$ $$\frac{dy}{dx} = \frac{-y+2x}{3y^2+x}$$

Now we can plug in the given point (1, 2) into our equation for \mathbf{\frac{dy}{dx}} to find the slope of the tangent line.

$$m=\frac{-(2)+2(1)}{3(2)^2+(1)}=\frac{0}{13}=0$$

With this slope, we can go back to the point slope form of a line. Since we know the slope and a point that lies on this line, we can plug that information into the general point slope form for a line. This will leave us with the equation for a tangent line at the given point.

$$y=m(x-x_0)+y_0$$ $$y=0(x-1)+2$$ $$y=2$$

So the constant function \mathbf{y=2} is tangent to the curve \mathbf{y^3+xy-x^2=9} at the point (1, 2).

Example 4

Find the equation of the line that is tangent to the curve \mathbf{16x^2 + y^2 = xy + 4} at the point (0, 2).

Again, we will start by applying implicit differentiation to find the slope of the tangent line.

$$\frac{d}{dx} \big[ 16x^2 + y^2 \big] = \frac{d}{dx} [xy + 4]$$ $$32x + 2y \frac{dy}{dx} = 1\cdot y + x \cdot \frac{dy}{dx}$$ $$2y \frac{dy}{dx} – x \frac{dy}{dx}= -32x + y$$ $$\frac{dy}{dx} \big[ 2y-x \big] = -32x+y$$ $$\frac{dy}{dx} = \frac{-32x+y}{2y-x}$$

Now we can plug in the given point (0, 2) into our equation for \mathbf{\frac{dy}{dx}} to find the slope of the tangent line.

$$m = \frac{-32(0)+(2)}{2(2)-(0)}$$ $$m=\frac{2}{4}$$ $$m=\frac{1}{2}$$

With this slope, we can go back to the point slope form of a line. Since we know the slope and a point that lies on this line, we can plug that information into the general point slope form for a line. This will leave us with the equation for a tangent line at the given point.

$$y=m(x-x_0)+y_0$$ $$y=\frac{1}{2}(x-0)+2$$ $$y=\frac{1}{2}x+2$$

Tangent Line Equation Without Derivatives

There are some cases where you can find the slope of a tangent line without having to take a derivative. This is not super common because it does require being able to take advantage of additional information. Usually you will be able to do this if you know some geometrical fact about the curve whose tangent line equation you are looking for.

The most common example of this is finding the a line that is tangent to a circle.

Example 5

Find the equation of the line that is tangent to the circle \mathbf{(x-2)^2+(y+1)^2=25} at the point (5, 3).

We already are given a point that we know needs to lie on our tangent line. This tells us that if we can find the slope of the tangent line, we would just be able to plug it all into the point slope form for a linear function and we would have a tangent line. So we just need to find the slope of the tangent line.

In order to find this slope we can take advantage of a geometrical fact about circles: a line connecting the center of a circle to its edge will be perpendicular to a line that is tangent to the circle at that edge point. Below you can see what this looks like on a graph of this circle, or at least a portion of it.

Graph of a circle and its tangent line
\mathbf{(x-2)^2+(y+1)^2=25} and the tangent line at (5, 3)

Therefore, if we know the slope of a line connecting the center of our circle to the point (5, 3) we can use this to find the slope of our tangent line. Based on the general form of a circle, we know that \mathbf{(x-2)^2+(y+1)^2=25} is the equation for a circle that is centered at (2, -1) and has a radius of 5. So we need to find the slope of a line connecting the points (5, 3) and (2, -1). We can do this using the formula for the slope of a line between two points.

$$slope = \frac{y_2 – y_1}{x_2 – x_1}$$ $$slope = \frac{3 – (-1)}{5 – 2}$$ $$slope = \frac{4}{3}$$

Now we can simply take the negative reciprocal of \mathbf{\frac{4}{3}} to find the slope of our tangent line. So we know the slope of our tangent line will be \mathbf{- \frac{3}{4}}.

Knowing that the slope of our tangent line will be \mathbf{- \frac{3}{4}} and that it will go through the point (5, 3), we can put this into the point slope form of a line to find the equation of our tangent line.

$$y=m(x-x_0)+y_0$$ $$y= \ – \frac{3}{4}(x-5)+3$$ $$y= \ – \frac{3}{4}x + \frac{15}{4}+3$$ $$y= \ – \frac{3}{4}x + \frac{15}{4}+ \frac{12}{4}$$ $$y= \ – \frac{3}{4}x + \frac{27}{4}$$

Hopefully all of this helps you gain a bit of a better understanding of finding tangent lines, but as always I’d love to hear your questions if you have any. Just email me at jakesmathlessons@gmail.com and I’ll see if I can help provide a bit more clarification. You can also use the form below to subscribe to my email list and I’ll send you my FREE bonus study guide to help you survive calculus! Just put in your name and email address and I’ll be sure to let you know when I post new content! Feel free to go check out my other lessons and solutions about derivatives as well.

Washer Method – Rotate around a vertical line

Find the volume obtained by rotating the region bounded by y=\frac{1}{4} x^2, x=2, and y=0 about the y-axis.

To solve this problem, I’m going to use the same 4 step process as I did in my disk method lesson and my first washer method practice problem. There is one key difference this time around: here we are rotating the region around a vertical line. Previously, I have only shown examples of rotating around a horizontal line.

1. Graph the 2-D functions

As I did in the other examples mentioned above, the first thing we should always do is graph the given functions. This will help us visualize what we’re dealing with and will make it easier to come up with the function we’ll need to integrate later.

All I will do here is plug these functions into Desmos, but see if you can graph these without the help of a calculator. That a skill that may come in handy at some point.

washer method around y axis
y=\frac{1}{4} x^2, x=2, and y=0

2. Rotate the 2-D area around the given axis

This is another step that is mostly helpful for visualization. Visualizing each step required to create the 3-D figure we’re looking for will make things a lot easier when we come up with the function that we need to integrate.

Remember, the problem said that we will need to rotate the region trapped between these three functions around the y-axis. So imagine this 2-D region rotating off the page (or screen) and around the y-axis. Doing this would create a round 3-D figure. This is the figure whose volume we need to find.

I encourage you to imagine this happening on your page and try drawing a rough sketch of the resulting figure. I will do this using Wolfram Alpha.

3D rotation around y axis
Result of rotating the region about the y-axis.

3. Setting up the integral

This step is at the heart of these problems. All of the graphing and sketching is to help us visualize what is being described so we can correctly formulate our integral.

We could solve this problem using the cylinder method as well, but that’s for another lesson. For this example, we will proceed using the washer method. This is important to distinguish here because we need to imagine all of the washers that make up this 3-D figure. What we need to think about is a stack of very, very, very thin washers stacked one on top of the other, in the same shape as the figure shown a couple paragraphs ago.

You will notice that if we imagine this figure as a stack of washers, the washers would be stacked vertically, one on top of the other. This is different from the first washer method example I did, where the washers were all side by side.

This is an important difference because adding up the volume of all of these washers will require us to move vertically throughout this figure to get the next washer and add its volume to the total. As a result of this, we will be integrating with respect to y! Since we move in the y direction to get to the next washer, we need to integrate with respect to y. Therefore, when we create our integral, it will all need to be in terms of y rather than x.

How do we set the integral up with respect to y?

Take a look at the drawing below. You can see one of these infinitely thin washers drawn in the figure. Let’s take a minute to consider the dimensions of this particular washer. Remember, as we showed in the first washer method practice problem, the volume of a washer is given by V=\pi h(R^2-r^2) where r is the inner radius and R is the outer radius.

labeled rotation around y axis

The large washer in the middle of our graph is there to help you visualize where these washers would be if we were to stack them up to create this figure. Take a look at the smaller washer in the upper left section of our graph. This will be used to help us find the inner and outer radii of the washers.

Finding the inner radius

The inner radius of a washer will be the distance between the center of the washer and the inner edge. In the drawing above, this is shown in the smaller washer off to the side as the distance between the points labeled (0, \ y) and (x, \ y).

(0, \ y) is some point on the y-axis. The y will be different depending on which washer we’re looking at, but since it lies on the y-axis we know that the x-coordinate will always be 0.

(x, \ y) is some point that lies on the function y=\frac{1}{4}x^2. But remember, I said earlier that we need to integrate with respect to y because our washers are stacked vertically so we move in the y direction to add up all of their volumes. Therefore, we need everything just in terms of y without having any x‘s around. So we need to rewrite (x, \ y) just in terms of y. In order to do this we will need to think about how we can write x in terms of y.

Since we know that this point lies on the function y=\frac{1}{4}x^2 we can use this relationship to find x in terms of y. All we need to do is take that equation and solve for x. $$y=\frac{1}{4}x^2$$ $$4y=x^2$$ $$\pm \sqrt{4y}=x$$ Notice, in general when we take the square root of both sides of the equation we need the positive and negative square root. In this case, the positive square root is the right half of the parabola and the negative square root represents the left half. Since the right half of the parabola is the part that formed the region we’re looking at, we only need the positive square root. So, $$x=\sqrt{4y}.$$

Now that we know x=\sqrt{4y} for any (x, \ y) pair that lies on our function, we can use this to say that (x, \ y) can instead be written as (\sqrt{4y}, \ y). Therefore, to find the inner radius we need to find the distance between \mathbf{(0, \ y)} and \mathbf{(\sqrt{4y}, \ y)}. To find this distance we simply need to find the difference between their x-values because they will always have the same y-coordinate. So, $$r= \sqrt{4y} \ – 0$$ $$r= \sqrt{4y}.$$

Finding the outer radius

Finding the outer radius will be very similar to finding the inner radius. The only difference is that we now need to find the distance between the point in the center of the washer and the outer edge. This is shown in the labeled washer by the distance between the two points labeled (0, \ y) and (2, \ y).

We know that any point that lies on the line x=2 will have an x-coordinate of 2. No matter what the y-coordinate is, if it lies on \mathbf{x=2} we know the x-coordinate must be 2. This is the reason why the point on the outer edge of the washer is labeled (2, \ y). Although the y-coordinate changes as we move up the side of our figure, the x-coordinate stays equal to 2.

So we need to find the distance between the points (0, \ y) and (2, \ y). Clearly these two points will have the same y-coordinate. The y-coordinate changes depending on which washer we are looking at in our figure, but these two points will have the same y-coordinate when they are on the same washer. Since they have the same y-value, to find the distance between them, we just need to find the distance between their x-coordinates. Therefore, $$R=2-0$$ $$R=2.$$

Finding the height (or thickness)

In order to find the volume of a washer we will also need it’s height.

The height of our infinitely thin washers is actually quite simple. Just like when we integrate a 2-D function to find the area under the curve, our slices here are all the same width. We don’t have to worry about each washer, having a different height.

The height of each washer will just be how far we always move over before taking another slice. Since we are moving up in the y direction as we imagine the next slice, this can simply be our change in y between the slices. Change in y is always represented as dy. So we can simply say the height of each cylinder is $$h=dy.$$

Back to the integral

Like I said before, all the integral will do is go through all the y values that our figure covers and add up the volumes of all of the infinitely thin washers. In order for it to achieve this, we need to put a function for the volume of each washer that depends on y. We already know that the volume of a washer in general would be $$V = \pi h \big( R^2 – r^2 \big).$$

This means that our integral might look something like this $$\int \pi h \big( R^2 – r^2 \big).$$

But this doesn’t really have any meaning on its own. In order to give this meaning we need to represent this volume in terms of y and give the integral a range of y values to integrate over.

Remember we also found the inner radius, outer radius, and height of the washers that make up our figure to be $$r=\sqrt{4y},$$ $$R=2,$$ $$h=dy.$$

Putting all of this into an integral along with the fact that this figure goes across all y-values between 0 and 1, give us $$V= \int_0^1 \pi (dy) \bigg( (2)^2 – \Big(\sqrt{4y}\Big)^2 \bigg).$$

Of course, this looks a little strange. Let’s simplify this integral and rearrange the pieces a bit. $$V= \pi \int_0^1 4 – 4y \ dy$$

4. Solve the integral

Now we’ve gotten through the hard part. All we need to do now is evaluate the volume integral by finding the anti-derivative and evaluating the bounds. All we need in this case is the power rule for integration. $$V= \pi \int_0^1 4 – 4y \ dy$$ $$V= \pi \bigg[ 4y – 2y^2 \bigg]_0^1$$ $$V= \pi \bigg[ \Big( 4(1) – 2(1)^2 \Big) – \Big( 4(0) – 2(0)^2 \Big) \bigg]$$ $$V=\pi(4-2)$$ $$V=2 \pi$$

So the volume of this solid is 2 \pi cubic units! I hope that helps, but if you are still looking for some practice with the washer method go check out my first washer method problem. That one explains the rational behind some of the steps in a bit more detail. You should also check out my other lessons and problems about integrals.

If you still have any questions, comments, or suggestions I’d love to hear them. Email me at jakesmathlessons@gmail.com or us the form below to submit your name and email and I’ll send you my calculus 1 study guide as a free gift!