Guozhen AIGlobal AI field notes and model intelligence

English translation

Define symbolic variable

Published:

Category: AI Calculus for Beginners

Read time: 4 min

Reads: 0

Lesson #9Views are counted together with the original Chinese articleImages are preserved from the source page

Concept Diagram: Tangents and Rates of Change

A tangent line approximates a curve locally by a straight line; the rate of change tells you how sensitive the output is to small changes in the input near a given point.

Tangents and Rates of Change Verification Diagram

I’ll verify that the tangent line passes through the point on the original function. Even if the slope is correct, an incorrect point yields an incorrect tangent equation.

In the previous article, we explored the fundamental concepts of derivatives and differentials, along with differentiation rules and derivatives of basic functions. In this article, we delve into practical applications of derivatives and differentials—specifically, how to use them to find tangent lines and analyze rates of change.

The Concept of Tangent Lines

A tangent line is a straight line that touches a curve at a single point and captures the curve’s local behavior there. Geometrically, if we draw a tangent line at the point (a,f(a))(a, f(a)), its slope equals the derivative of the function at that point, denoted f(a)f'(a).

Tangents and Rates of Change Application Checklist Card

When solving tangent line or rate-of-change problems: first identify the function and the point of interest; then compute the derivative, evaluate it at that point, and interpret the meaning of the slope.

Equation of a Tangent Line

The equation of the tangent line can be written using the point-slope form:

yf(a)=f(a)(xa)y - f(a) = f'(a)(x - a)

Here, f(a)f(a) is the function value at x=ax = a, and f(a)f'(a) is the derivative evaluated at that point.

Example: Finding the Tangent Line Equation

Consider the function f(x)=x2f(x) = x^2. Let’s find the equation of the tangent line at x=1x = 1.

  1. Compute the function value:

    f(1)=12=1f(1) = 1^2 = 1
  2. Compute the derivative:

    f(x)=2xf(1)=21=2f'(x) = 2x \quad \Rightarrow \quad f'(1) = 2 \cdot 1 = 2
  3. Write the tangent line equation:

y1=2(x1)y - 1 = 2(x - 1)

Simplifying gives:

y=2x1y = 2x - 1

Thus, the tangent line to the curve at the point (1,1)(1, 1) is y=2x1y = 2x - 1.

Rates of Change

A rate of change quantifies how quickly one quantity changes relative to another. Mathematically, instantaneous rates of change are expressed via derivatives. Specifically, for a function y=f(x)y = f(x), the rate of change at x=ax = a is precisely the derivative f(a)f'(a).

Calculus Reading Roadmap Card

After reading Applications of Derivatives and Differentials: Tangents and Rates of Change, don’t stop at “I understand.” Go back and manually work through one step—then note where you get stuck. This reflection will make future learning more solid.

Example: Velocity as a Rate of Change

Suppose an object’s position over time is described by s(t)=3t2+2ts(t) = 3t^2 + 2t. We want to find its velocity (i.e., the instantaneous rate of change of position) at time t=2t = 2.

  1. Differentiate the position function to obtain the velocity function:

    v(t)=s(t)=6t+2v(t) = s'(t) = 6t + 2
  2. Evaluate velocity at t=2t = 2:

    v(2)=62+2=12+2=14v(2) = 6 \cdot 2 + 2 = 12 + 2 = 14

Therefore, the object’s velocity at t=2t = 2 is 14 units per time unit.

Python Implementation: Derivatives and Tangent Lines

We can use the SymPy library to compute derivatives and plot tangent lines. Below is a simple Python example demonstrating how to calculate a derivative and visualize the corresponding tangent line.

import numpy as np
import matplotlib.pyplot as plt
import sympy as sp

# Define symbolic variable
x = sp.symbols('x')

# Define function
f = x**2

# Compute derivative
f_prime = sp.diff(f, x)

# Specify point of tangency
a = 1
f_a = f.subs(x, a)
f_prime_a = f_prime.subs(x, a)

# Tangent line function
def tangent_line(x_val):
    return f_prime_a * (x_val - a) + f_a

# Generate data points
x_vals = np.linspace(-2, 3, 100)
y_vals = [f.subs(x, val) for val in x_vals]
tangent_vals = [tangent_line(val) for val in x_vals]

# Plot
plt.figure(figsize=(10, 6))
plt.plot(x_vals, y_vals, label='y = x^2', color='blue')
plt.plot(x_vals, tangent_vals, label='Tangent: y = 2x - 1', color='red', linestyle='--')
plt.scatter(a, f_a, color='green')  # Point of tangency
plt.title('Relationship Between Tangent Line and Function')
plt.xlabel('x')
plt.ylabel('y')
plt.axhline(0, color='black', linewidth=0.5, ls='--')
plt.axvline(0, color='black', linewidth=0.5, ls='--')
plt.grid()
plt.legend()
plt.show()

Code Explanation

  • We use SymPy to define the quadratic function f(x)=x2f(x) = x^2 and compute its derivative.
  • Using the specified point of tangency a=1a = 1, we evaluate both the function and its derivative to construct the tangent line equation.
  • Finally, we use matplotlib to plot the original function and its tangent line.

Application Review Card: Applications of Derivatives and Differentials — Tangents and Rates of Change

When reviewing Applications of Derivatives and Differentials: Tangents and Rates of Change, place key concepts, procedural steps, and observable outcomes side-by-side on a single page for efficient review.

Application Check Card: Applications of Derivatives and Differentials — Tangents and Rates of Change

When practicing Applications of Derivatives and Differentials: Tangents and Rates of Change, write the input conditions, computational steps, and resulting outputs together—this makes future self-checking easier.

Summary

In this article, we examined practical applications of derivatives and differentials—particularly in determining tangent lines and analyzing rates of change. We learned how to derive tangent line equations and interpret derivatives as instantaneous rates of change. These ideas are essential for understanding functional behavior and lay the groundwork for upcoming topics in integral calculus. In the next article, we will introduce the fundamental concepts and applications of integration.

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...