From a Derivative to a Tangent Slope
A derivative measures how rapidly a function changes at a particular input. On a graph, that instantaneous rate of change is the slope of the tangent line at the corresponding point. This gives a direct way to read local geometric behavior from the derivative: a positive slope means the graph is rising, a negative slope means it is falling, and a zero slope means the tangent line is horizontal.
For trigonometric graphs, the derivative formulas let us find these slopes at specified inputs. We will focus on sine, cosine, and tangent, and pay particular attention to two cases: points where the slope is zero and inputs where the tangent function itself is undefined.
All trigonometric derivatives here use radian inputs. The derivative formulas needed are:
where \(\tan x\) is defined only when \(\cos x\ne 0\), and \(\sec x=1/\cos x\) wherever that quotient is defined. If a graph is given by one of these functions, its tangent slope at \(x=a\) is the value of the corresponding derivative at \(a\), provided the function is defined and differentiable there.
Why the Derivative Gives the Tangent Slope
The slope of a secant line through two nearby points on the graph of \(f\), one at \(x=a\) and one at \(x=a+h\), is
As the second point approaches \((a,f(a))\), the secant line approaches the tangent line, when that limiting line exists. The derivative is defined as the limit of these secant slopes. Therefore, when \(f\) is differentiable at \(a\), the limiting slope is \(f'(a)\).
The tangent line must also pass through \((a,f(a))\). A line with slope \(f'(a)\) through that point has point-slope equation \(y-f(a)=f'(a)(x-a)\). This justifies both the tangent-slope formula and the tangent-line equation used below. If \(f(a)\) or \(f'(a)\) does not exist, this argument does not provide a tangent line there.
Sine and Cosine: Slopes That Can Vanish
For \(y=\sin x\), the slope at \(x=a\) is \(\cos a\). It is zero exactly when \(\cos a=0\), which occurs at \(a=\frac{\pi}{2}+k\pi\), where \(k\in\mathbb{Z}\). At those inputs, the sine graph has a horizontal tangent.
For \(y=\cos x\), the slope at \(x=a\) is \(-\sin a\). It is zero exactly when \(\sin a=0\), which occurs at \(a=k\pi\), where \(k\in\mathbb{Z}\). The minus sign matters: where \(\sin a\) is positive, the cosine graph has a negative slope.
Worked Example: Tangent to a Sine Graph
Find the slope and tangent line to \(y=\sin x\) at \(x=\frac{\pi}{3}\).
First find the point on the graph. Since \(\sin\frac{\pi}{3}=\frac{\sqrt{3}}{2}\), the point is \(\left(\frac{\pi}{3},\frac{\sqrt{3}}{2}\right)\).
Differentiate \(f(x)=\sin x\), giving \(f'(x)=\cos x\). Evaluate at the specified input:
The tangent slope is \(\frac{1}{2}\). Using the point-slope equation, the tangent line is
Check: substituting \(x=\frac{\pi}{3}\) gives \(y-\frac{\sqrt{3}}{2}=0\), so the line passes through the graph point. Its coefficient of \(x\) is \(\frac{1}{2}\), matching \(f'(\frac{\pi}{3})\).
Worked Example: A Horizontal Tangent to Cosine
Find the slope and tangent line to \(y=\cos x\) at \(x=0\).
The graph point is \((0,\cos 0)=(0,1)\). The derivative is \(f'(x)=-\sin x\), so
Thus the tangent is horizontal. The point-slope equation gives \(y-1=0(x-0)\), or \(y=1\).
Check: \(y=1\) passes through \((0,1)\) and has slope zero. Also, differentiating the original function gives \(f'(0)=0\), confirming that this is the required tangent slope.
Tangent: Positive Slopes and Excluded Inputs
On its domain, the derivative of \(y=\tan x\) is \(\sec^2 x=1/\cos^2 x\). A square is positive whenever its denominator is nonzero, so \(\sec^2 x>0\) at every input where tangent is defined. Consequently, the tangent graph has no horizontal tangent and is locally increasing throughout each interval of its domain.
The tangent function is undefined where \(\cos x=0\), namely at \(x=\frac{\pi}{2}+k\pi\), for \(k\in\mathbb{Z}\). These are not points on the graph: there is no function value there. Thus the slope is not an infinite tangent slope at a point; rather, there is no point of the graph at that input to which a tangent line could be assigned.
Worked Example: Tangent to a Tangent Graph
Find the slope and tangent line to \(y=\tan x\) at \(x=\frac{\pi}{6}\).
First calculate the point. Since \(\tan\frac{\pi}{6}=\frac{1}{\sqrt{3}}=\frac{\sqrt{3}}{3}\), the point is \(\left(\frac{\pi}{6},\frac{\sqrt{3}}{3}\right)\).
The derivative is \(f'(x)=\sec^2 x\). Since \(\cos\frac{\pi}{6}=\frac{\sqrt{3}}{2}\),
The tangent line is therefore
Check: setting \(x=\frac{\pi}{6}\) makes the right side zero and gives \(y=\frac{\sqrt{3}}{3}\), the correct graph value. The line's slope is \(\frac{4}{3}\), which agrees with the derivative evaluation.
Worked Example: An Input Where Tangent Is Undefined
Consider \(y=\tan x\) at \(x=\frac{\pi}{2}\). The cosine value is \(\cos\frac{\pi}{2}=0\), so the quotient defining tangent has denominator zero:
which is undefined. There is no point on the tangent graph with input \(\frac{\pi}{2}\), so there is no tangent slope or tangent line there. In particular, writing \(\sec^2(\frac{\pi}{2})\) does not produce a finite derivative: the derivative formula applies only at inputs in the domain of \(\tan x\).
Check: the required condition \(\cos x\ne 0\) fails at \(x=\frac{\pi}{2}\). This confirms that the function and its derivative are both unavailable at that input.
Reading the Slope Geometrically
A derivative value is a signed slope, not the height of the graph. The height is \(f(a)\); the tangent slope is \(f'(a)\). A positive value indicates that the graph rises as \(x\) increases near the point, while a negative value indicates that it falls. A zero value indicates a horizontal tangent. The size of the slope measures local steepness: for example, a slope of \(4\) is steeper than a slope of \(\frac{1}{2}\), while the sign distinguishes rising from falling.
These statements concern local behavior at the specified input. A positive derivative does not mean the function is positive there, and a negative derivative does not mean the function value is negative. A graph can be below the horizontal axis and rising, or above it and falling.
The slope formulas can be summarized as follows:
| Graph | Slope at \(x=a\) | Zero or undefined cases |
|---|---|---|
| \(y=\sin x\) | \(\cos a\) | Zero at \(a=\frac{\pi}{2}+k\pi\); defined for every real \(a\). |
| \(y=\cos x\) | \(-\sin a\) | Zero at \(a=k\pi\); defined for every real \(a\). |
| \(y=\tan x\) | \(\sec^2 a\) | Positive wherever defined; the function is undefined at \(a=\frac{\pi}{2}+k\pi\). |
In the table, \(k\in\mathbb{Z}\). The sine and cosine graphs have a point and a finite derivative at every real input. The tangent graph has a finite, positive derivative at every input in its domain, but its excluded inputs are not graph points with unusually large slopes.
A Common Sign and Domain Pitfall
A frequent mistake is to use the cosine value as the derivative of cosine, omitting the negative sign. For example, at \(x=\frac{\pi}{3}\), an incorrect calculation would be
The correct derivative is \(f'(x)=-\sin x\), so the actual slope is
The graph is falling at this input, not rising. A separate domain error is to call the derivative of tangent “infinite” at \(x=\frac{\pi}{2}\). The correction is to check first whether the function is defined: because \(\tan\frac{\pi}{2}\) is undefined, there is no graph point there and hence no tangent slope at that input.
Using Tangent Slopes Reliably
For a specified input, keep the calculation in a definite order. Identify the function and its domain, find the graph point, evaluate the correct derivative, and then use the point and slope to write a tangent line if needed. The domain check is especially important for tangent; the sign check is especially important for cosine.
Confirm that the function is defined there. For tangent, require \(\cos a\ne 0\).
Calculate \(f(a)\), so the graph point is \((a,f(a))\).
Use the derivative of the chosen function to calculate \(f'(a)\), the tangent slope.
Use the slope's sign and size to describe local behavior, or place \(a\), \(f(a)\), and \(f'(a)\) in the tangent-line equation.
These steps separate three quantities that are easy to confuse: the input \(a\), the height \(f(a)\), and the slope \(f'(a)\). Keeping them distinct makes both the numerical result and its geometric interpretation easier to verify.
Check Your Understanding
Answer each question using the derivative and domain conditions for the relevant trigonometric function.
- What is the tangent slope to \(y=\sin x\) at \(x=\pi\), and is the graph rising or falling there?
- At which inputs does \(y=\cos x\) have a horizontal tangent?
- Why is there no tangent slope to \(y=\tan x\) at \(x=\pi/2\)?
- Can the tangent graph have a horizontal tangent at a point in its domain? Explain using its derivative.
- For a differentiable function, how do \(f(a)\) and \(f'(a)\) differ geometrically?