# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/derivative-function/equation-of-a-tangent-line-to-a-curve
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/derivative-function/equation-of-a-tangent-line-to-a-curve/en.mdx

Learn how derivatives give tangent line equations through slope calculations, visual examples, and curve problems.

---

## Relationship Between Derivatives and Tangent Lines

You probably already know that derivatives can tell us a lot about the properties of a function. One of the coolest uses of derivatives is to find the **slope** or **gradient** of a tangent line to a curve.

Imagine "zooming in" on a point on a curve over and over. Eventually, the curved line will start to look like a straight line, right? Well, that imaginary straight line is what we call the **tangent line**. The gradient of the tangent line at a point $$x=a$$ on the curve $$y=f(x)$$ is exactly equal to the derivative of the function at that point, which is <InlineMath math="m = f'(a)" />.

Visible text: Imagine "zooming in" on a point on a curve over and over. Eventually, the curved line will start to look like a straight line, right? Well, that imaginary straight line is what we call the **tangent line**. The gradient of the tangent line at a point on the curve is exactly equal to the derivative of the function at that point, which is <InlineMath math="m = f'(a)" />.

## Determining the Equation of a Tangent Line

To create the equation of a straight line, we need two main things: a point the line passes through and the gradient of the line itself. In this context:

1.  **Point of Tangency:** A point $$P(a, b)$$ where the line touches the curve.
2.  **Gradient (m):** The slope of the line at that point, which we get from the derivative, <InlineMath math="m = f'(a)" />.

Visible text: 1. **Point of Tangency:** A point where the line touches the curve.
2. **Gradient (m):** The slope of the line at that point, which we get from the derivative, <InlineMath math="m = f'(a)" />.

Once we have both, we can plug them directly into the basic formula for a line equation that you're already familiar with:

```math
y - b = m(x - a)
```

> In short, to find the equation of a tangent line, first find its gradient by differentiating the function, then plug the point of tangency and the gradient into the line equation formula.

## Breaking Down a Case

Let's see how it works with an example. Determine the equation of the tangent line to the parabola $$y = 2 - 4x^2$$ at the point $$(1, -2)$$.

Visible text: Let's see how it works with an example. Determine the equation of the tangent line to the parabola at the point .

**Solution:**

**Step** $$1$$: Find the gradient of the tangent line

Visible text: **Step** : Find the gradient of the tangent line

First, we differentiate the function $$f(x) = 2 - 4x^2$$ to get its gradient expression.

Visible text: First, we differentiate the function to get its gradient expression.

```math
f'(x) = -8x
```

Since we want to find the gradient at the point where the $$x$$-coordinate is $$x=1$$, we substitute this value into the derivative.

Visible text: Since we want to find the gradient at the point where the -coordinate is , we substitute this value into the derivative.

```math
m = f'(1) = -8(1) = -8
```

So, the gradient of the tangent line is $$-8$$.

Visible text: So, the gradient of the tangent line is .

**Step** $$2$$: Construct the equation

Visible text: **Step** : Construct the equation

Now we have everything we need:

-   Point of tangency $$(a, b) = (1, -2)$$
-   Gradient $$m = -8$$

Visible text: - Point of tangency 
- Gradient

Plug them into the line equation formula:

Component: MathContainer
Children:

```math
y - b = m(x - a)
```

```math
y - (-2) = -8(x - 1)
```

```math
y + 2 = -8x + 8
```

```math
y = -8x + 6
```

So, the equation of the tangent line is $$y = -8x + 6$$.

Visible text: So, the equation of the tangent line is .

Component: LineEquation
Props:
- title: Visualization of the Tangent Line on the Parabola
- description: This graph shows the parabola curve $$y = 2 - 4x^2$${" "}
and its tangent line $$y = -8x + 6$$ meeting
exactly at the point of tangency $$(1, -2)$$.
  Visible text: This graph shows the parabola curve {" "}
and its tangent line meeting
exactly at the point of tangency .
- showZAxis: false
- cameraPosition: [0, 0, 15]
- data: [
{
points: Array.from({ length: 41 }, (_, i) => {
const x = -2 + i * 0.1;
return { x, y: 2 - 4 * x * x, z: 0 };
}),
color: getColor("LIME"),
showPoints: false,
labels: [
{
text: "y = 2 - 4x^2",
at: 5,
offset: [-2, 3, 0],
},
],
},
{
points: [
{ x: 0, y: 6, z: 0 },
{ x: 2, y: -10, z: 0 },
],
color: getColor("YELLOW"),
smooth: false,
showPoints: false,
labels: [
{
text: "y = -8x + 6",
at: 0,
offset: [2.5, -2.5, 0],
},
],
},
{
points: [{ x: 1, y: -2, z: 0 }],
color: getColor("ORANGE"),
showPoints: true,
labels: [
{
text: "(1, -2)",
offset: [1.5, -0.5, 0],
},
],
},
]

## Exercises

1.  Find the equation of the tangent line to the curve $$y = x^2 - 6\frac{1}{5}x + 14\frac{1}{2}$$ which is parallel to the line $$x + 2y + 3 = 0$$.

2.  Determine the equation of the tangent line to the parabola $$y = 2x^2 - 3x + 5$$ at the point with an ordinate of $$4$$.

3.  A curve $$y = 3x - \frac{3}{x^2}$$ intersects the $$x$$-axis at P. Find the equation of the tangent line to the curve at point $$P$$!

4.  The curve $$y = (x^2 + 2)^2$$ intersects the $$y$$-axis at point $$A$$. Show that the tangent line to the curve at point $$A$$ is parallel to the $$x$$-axis and is $$4 \text{ units}$$ away from the origin!

5.  Determine the coordinates of the point on the curve $$y = 2x^2 - 7x + 1$$, if the tangent line to the curve at that point forms an angle of $$45^\circ$$ with the positive $$x$$-axis. Also, determine the equation of the tangent line to the curve that passes through that point!

Visible text: 1. Find the equation of the tangent line to the curve which is parallel to the line .

2. Determine the equation of the tangent line to the parabola at the point with an ordinate of .

3. A curve intersects the -axis at P. Find the equation of the tangent line to the curve at point !

4. The curve intersects the -axis at point . Show that the tangent line to the curve at point is parallel to the -axis and is away from the origin!

5. Determine the coordinates of the point on the curve , if the tangent line to the curve at that point forms an angle of with the positive -axis. Also, determine the equation of the tangent line to the curve that passes through that point!

### Answer Key

1.  **Solution:**

    **Step** $$1$$: Determine the gradient.

    The tangent line must be parallel to the line $$x + 2y + 3 = 0$$. To find its gradient, let's first convert this line's equation into the slope-intercept form $$y = mx + c$$.

    <MathContainer>
        
    
    ```math
    2y = -x - 3
    ```

        
    
    ```math
    y = -\frac{1}{2}x - \frac{3}{2}
    ```

    </MathContainer>

    From this, we know the gradient of the line is $$m = -\frac{1}{2}$$. Since the tangent line is parallel, its gradient is the same.

    **Step** $$2$$: Find the point of tangency.

    The gradient of the curve at a point is equal to the value of the first derivative at that point. First, let's find the derivative function of $$f(x) = x^2 - \frac{31}{5}x + \frac{29}{2}$$.

    <BlockMath math="f'(x) = 2x - \frac{31}{5}" />

    Next, we set this derivative equal to the gradient we know ($$m = -1/2$$) to find the $$x$$-coordinate of the point of tangency.

    <MathContainer>
        
    
    ```math
    2x - \frac{31}{5} = -\frac{1}{2}
    ```

        
    
    ```math
    2x = \frac{31}{5} - \frac{1}{2} = \frac{62 - 5}{10} = \frac{57}{10}
    ```

        
    
    ```math
    x = \frac{57}{20}
    ```

    </MathContainer>

    After getting the $$x$$-coordinate $$x=\frac{57}{20}$$, we substitute this value back into the *original* curve equation to find its $$y$$-coordinate.

    
    
    ```math
    y = (\frac{57}{20})^2 - \frac{31}{5}(\frac{57}{20}) + \frac{29}{2} = \frac{3249}{400} - \frac{1767}{100} + \frac{29}{2} = \frac{3249 - 7068 + 5800}{400} = \frac{1981}{400}
    ```

    So, the point of tangency is $$\left(\frac{57}{20}, \frac{1981}{400}\right)$$.

    **Step** $$3$$: Construct the line equation.

    With the point $$\left(\frac{57}{20}, \frac{1981}{400}\right)$$ and gradient $$m = -\frac{1}{2}$$, the equation is:

    <MathContainer>
        
    
    ```math
    y - \frac{1981}{400} = -\frac{1}{2}\left(x - \frac{57}{20}\right)
    ```

        
    
    ```math
    y = -\frac{1}{2}x + \frac{57}{40} + \frac{1981}{400}
    ```

        
    
    ```math
    y = -\frac{1}{2}x + \frac{570 + 1981}{400}
    ```

        
    
    ```math
    y = -\frac{1}{2}x + \frac{2551}{400}
    ```

    </MathContainer>

2.  **Solution:**

    **Step** $$1$$: Find the point(s) of tangency.

    Since the ordinate is $$4$$, we set $$y=4$$ in the parabola's equation.

    <MathContainer>
        
    
    ```math
    4 = 2x^2 - 3x + 5
    ```

        
    
    ```math
    2x^2 - 3x + 1 = 0
    ```

        
    
    ```math
    (2x-1)(x-1) = 0
    ```

    </MathContainer>

    From factorization, we get two x-values: $$x=1$$ and $$x=\frac{1}{2}$$. This means there are two points of tangency: $$(1, 4)$$ and $$\left(\frac{1}{2}, 4\right)$$. Therefore, there will be two tangent line equations.

    **Step** $$2$$: Calculate the gradient and create the equation for each point.

    We will process each point of tangency separately. The derivative of the function is <InlineMath math="f'(x) = 4x - 3" />.

    **Case One: Point $$(1, 4)$$**

    The gradient at this point is <InlineMath math="m = f'(1) = 4(1) - 3 = 1" />.

    Thus, the equation is:

    
    
    ```math
    y - 4 = 1(x - 1) \implies y = x + 3
    ```

    **Case Two: Point $$\left(\frac{1}{2}, 4\right)$$**

    The gradient at this point is <InlineMath math="m = f'(\frac{1}{2}) = 4(\frac{1}{2}) - 3 = -1" />.

    Thus, the equation is:

    
    
    ```math
    y - 4 = -1(x - \frac{1}{2}) \implies y = -x + \frac{9}{2}
    ```

3.  **Solution:**

    **Step $$1$$: Find point $$P$$.**

    The curve intersects the $$x$$-axis when $$y=0$$.

    <MathContainer>
        
    
    ```math
    0 = 3x - \frac{3}{x^2}
    ```

        
    
    ```math
    3x = \frac{3}{x^2} \implies 3x^3 = 3 \implies x^3 = 1 \implies x=1
    ```

    </MathContainer>

    So, the intersection point $$P$$ is $$(1, 0)$$.

    **Step** $$2$$: Find the gradient at P.

    Let's first rewrite the function as $$f(x) = 3x - 3x^{-2}$$ to make it easier to differentiate.

    <BlockMath math="f'(x) = 3 - (-2)(3)x^{-3} = 3 + \frac{6}{x^3}" />

    The gradient at $$x=1$$ is <InlineMath math="m = f'(1) = 3 + \frac{6}{1^3} = 9" />.

    **Step** $$3$$: Construct the equation.

    With point $$(1, 0)$$ and gradient $$9$$, the equation is:

    
    
    ```math
    y - 0 = 9(x - 1) \implies y = 9x - 9
    ```

4.  **Solution:**

    **Step $$1$$: Find point $$A$$.**

    The curve intersects the $$y$$-axis when $$x=0$$.

    
    
    ```math
    y = (0^2 + 2)^2 = 4
    ```

    So, the intersection point $$A$$ is $$(0, 4)$$.

    **Step $$2$$: Prove the tangent line is parallel to the $$x$$-axis.**

    A line parallel to the $$x$$-axis must have a gradient of $$0$$. Let's prove that the derivative of the function at point $$A$$ ($$x=0$$) is zero.

    The derivative of $$f(x)=(x^2+2)^2$$ using the chain rule is <InlineMath math="f'(x) = 2(x^2+2)(2x) = 4x(x^2+2)" />.

    The gradient at $$x=0$$ is <InlineMath math="m = f'(0) = 4(0)(0^2+2) = 0" />.

    Since the gradient is zero, **it is proven that the tangent line is parallel to the $$x$$-axis**.

    **Step $$3$$: Prove its distance is $$4 \text{ units}$$ from the origin.**

    The equation of the tangent line at point $$(0,4)$$ with gradient $$m=0$$ is:

    
    
    ```math
    y - 4 = 0(x - 0) \implies y = 4
    ```

    The line $$y=4$$ is a horizontal line. The distance from any point on this line to the $$x$$-axis (the line $$y=0$$) is $$4 \text{ units}$$. Since the origin $$(0,0)$$ lies on the $$x$$-axis, the distance from this tangent line to the origin is also $$4 \text{ units}$$. **Proven.**

5.  **Solution:**

    **Step** $$1$$: Determine the gradient from the angle.

    The relationship between the gradient ($$m$$) and the angle ($$\theta$$) a line makes with the positive $$x$$-axis is given by $$m = \tan(\theta)$$.

    
    
    ```math
    m = \tan(45^\circ) = 1
    ```

    So, the gradient of the tangent line we are looking for is $$1$$.

    **Step** $$2$$: Find the coordinates of the point of tangency.

    The gradient is also the first derivative of the curve $$f(x) = 2x^2 - 7x + 1$$.

    <BlockMath math="f'(x) = 4x - 7" />

    We set it equal to the gradient we found:

    <MathContainer>
        
    
    ```math
    4x - 7 = 1
    ```

        
    
    ```math
    4x = 8 \implies x = 2
    ```

    </MathContainer>

    Now, find the $$y$$-value by plugging $$x=2$$ into the curve's equation:

    
    
    ```math
    y = 2(2)^2 - 7(2) + 1 = 8 - 14 + 1 = -5
    ```

    So, the coordinates of the point of tangency are $$(2, -5)$$.

    **Step** $$3$$: Determine the equation of the tangent line.

    Using the point $$(2, -5)$$ and gradient $$m=1$$:

    <MathContainer>
        
    
    ```math
    y - (-5) = 1(x - 2)
    ```

        
    
    ```math
    y + 5 = x - 2
    ```

        
    
    ```math
    y = x - 7
    ```

    </MathContainer>

Visible text: 1. **Solution:**

 **Step** : Determine the gradient.

 The tangent line must be parallel to the line . To find its gradient, let's first convert this line's equation into the slope-intercept form .

 <MathContainer>
 
 

 
 

 </MathContainer>

 From this, we know the gradient of the line is . Since the tangent line is parallel, its gradient is the same.

 **Step** : Find the point of tangency.

 The gradient of the curve at a point is equal to the value of the first derivative at that point. First, let's find the derivative function of .

 <BlockMath math="f'(x) = 2x - \frac{31}{5}" />

 Next, we set this derivative equal to the gradient we know () to find the -coordinate of the point of tangency.

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 After getting the -coordinate , we substitute this value back into the *original* curve equation to find its -coordinate.

 
 

 So, the point of tangency is .

 **Step** : Construct the line equation.

 With the point and gradient , the equation is:

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

2. **Solution:**

 **Step** : Find the point(s) of tangency.

 Since the ordinate is , we set in the parabola's equation.

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 From factorization, we get two x-values: and . This means there are two points of tangency: and . Therefore, there will be two tangent line equations.

 **Step** : Calculate the gradient and create the equation for each point.

 We will process each point of tangency separately. The derivative of the function is <InlineMath math="f'(x) = 4x - 3" />.

 **Case One: Point **

 The gradient at this point is <InlineMath math="m = f'(1) = 4(1) - 3 = 1" />.

 Thus, the equation is:

 
 

 **Case Two: Point **

 The gradient at this point is <InlineMath math="m = f'(\frac{1}{2}) = 4(\frac{1}{2}) - 3 = -1" />.

 Thus, the equation is:

 
 

3. **Solution:**

 **Step : Find point .**

 The curve intersects the -axis when .

 <MathContainer>
 
 

 
 

 </MathContainer>

 So, the intersection point is .

 **Step** : Find the gradient at P.

 Let's first rewrite the function as to make it easier to differentiate.

 <BlockMath math="f'(x) = 3 - (-2)(3)x^{-3} = 3 + \frac{6}{x^3}" />

 The gradient at is <InlineMath math="m = f'(1) = 3 + \frac{6}{1^3} = 9" />.

 **Step** : Construct the equation.

 With point and gradient , the equation is:

 
 

4. **Solution:**

 **Step : Find point .**

 The curve intersects the -axis when .

 
 

 So, the intersection point is .

 **Step : Prove the tangent line is parallel to the -axis.**

 A line parallel to the -axis must have a gradient of . Let's prove that the derivative of the function at point () is zero.

 The derivative of using the chain rule is <InlineMath math="f'(x) = 2(x^2+2)(2x) = 4x(x^2+2)" />.

 The gradient at is <InlineMath math="m = f'(0) = 4(0)(0^2+2) = 0" />.

 Since the gradient is zero, **it is proven that the tangent line is parallel to the -axis**.

 **Step : Prove its distance is from the origin.**

 The equation of the tangent line at point with gradient is:

 
 

 The line is a horizontal line. The distance from any point on this line to the -axis (the line ) is . Since the origin lies on the -axis, the distance from this tangent line to the origin is also . **Proven.**

5. **Solution:**

 **Step** : Determine the gradient from the angle.

 The relationship between the gradient () and the angle () a line makes with the positive -axis is given by .

 
 

 So, the gradient of the tangent line we are looking for is .

 **Step** : Find the coordinates of the point of tangency.

 The gradient is also the first derivative of the curve .

 <BlockMath math="f'(x) = 4x - 7" />

 We set it equal to the gradient we found:

 <MathContainer>
 
 

 
 

 </MathContainer>

 Now, find the -value by plugging into the curve's equation:

 
 

 So, the coordinates of the point of tangency are .

 **Step** : Determine the equation of the tangent line.

 Using the point and gradient :

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>