Navigation

Concept Review

Differential Calculus

Derivatives of Trigonometric Functions

The six trigonometric functions are the first genuinely new derivatives you meet after powers and polynomials, and they are the engine behind every model that oscillates: springs, circuits, waves, rotating machinery. This topic builds ddxsinx=cosx\frac{d}{dx}\sin x = \cos x from the limit definition and two special limits, gets ddxcosx=sinx\frac{d}{dx}\cos x=-\sin x from the identical computation, and then produces the remaining four derivatives by pure algebra using the quotient rule. Everything below assumes angles are measured in radians — the final section explains why that is a mathematical requirement, not a stylistic convention.

Identities you will actually use

  • Angle addition: sin(x+h)=sinxcosh+cosxsinh\sin(x+h)=\sin x\cos h+\cos x\sin h and cos(x+h)=cosxcoshsinxsinh\cos(x+h)=\cos x\cos h-\sin x\sin h.
  • Pythagorean: sin2x+cos2x=1\sin^2x+\cos^2x=1. Dividing by cos2x\cos^2x gives 1+tan2x=sec2x1+\tan^2x=\sec^2x; dividing by sin2x\sin^2x gives 1+cot2x=csc2x1+\cot^2x=\csc^2x.
  • Definitions: tanx=sinxcosx\tan x=\dfrac{\sin x}{\cos x}, cotx=cosxsinx\cot x=\dfrac{\cos x}{\sin x}, secx=1cosx\sec x=\dfrac{1}{\cos x}, cscx=1sinx\csc x=\dfrac{1}{\sin x}.

Edge case worth naming: cotx=1tanx\cot x=\dfrac{1}{\tan x} is not valid everywhere. At x=π2x=\frac{\pi}{2} the right side is undefined (tan\tan is undefined there) while cotπ2=0\cot\frac{\pi}{2}=0. Always define cot\cot as cos/sin\cos/\sin.

The two fundamental limits

Theorem. With xx in radians,

limx0sinxx=1andlimx01cosxx=0.\lim_{x\to 0}\frac{\sin x}{x}=1 \qquad\text{and}\qquad \lim_{x\to 0}\frac{1-\cos x}{x}=0 .

Squeeze Theorem (the tool the first proof uses). If g(x)f(x)h(x)g(x)\le f(x)\le h(x) for every xx in some punctured interval around aa, and limxag(x)=limxah(x)=L\lim_{x\to a}g(x)=\lim_{x\to a}h(x)=L, then limxaf(x)=L\lim_{x\to a}f(x)=L. No continuity of ff is assumed, and nothing is assumed about the value f(a)f(a) (which need not exist).

Proof of the first (squeeze). On the unit circle, for 0<x<π20<x<\frac{\pi}{2}, compare three areas: the inscribed triangle, the circular sector, and the right triangle with height tanx\tan x:

12sinx12x12tanx.\frac{1}{2}\sin x \le \frac{1}{2}x \le \frac{1}{2}\tan x .

The middle term is the sector area 12r2x\frac{1}{2}r^2x with r=1r=1this formula is only true when xx is in radians, which is exactly where radians enter. Dividing by 12sinx>0\frac{1}{2}\sin x>0 and inverting gives cosxsinxx1\cos x\le\frac{\sin x}{x}\le 1. Both sinxx\frac{\sin x}{x} and cosx\cos x are even, so the same two-sided bound holds for π2<x<0-\frac{\pi}{2}<x<0. As x0x\to 0 the outer bounds cosx\cos x and 11 both tend to 11, so the Squeeze Theorem forces the limit to be 11.

Proof of the second (conjugate).

1cosxx=1cos2xx(1+cosx)=sin2xx(1+cosx)=sinxxsinx1+cosx102=0.\frac{1-\cos x}{x}=\frac{1-\cos^2x}{x(1+\cos x)}=\frac{\sin^2 x}{x(1+\cos x)}=\frac{\sin x}{x}\cdot\frac{\sin x}{1+\cos x}\to 1\cdot\frac{0}{2}=0 .

The same algebra with x2x^2 underneath gives the frequently used limx01cosxx2=12\lim_{x\to 0}\dfrac{1-\cos x}{x^2}=\dfrac{1}{2}.

Do not prove these with l'Hopital's Rule. L'Hopital's Rule requires (i) the quotient to be an indeterminate form, 00\frac{0}{0} or \frac{\infty}{\infty}, at the point in question, (ii) ff and gg differentiable on a punctured interval around that point with g0g'\ne 0 there, and (iii) limfg\lim\frac{f'}{g'} to exist (or be ±\pm\infty); only then may you conclude limfg=limfg\lim\frac{f}{g}=\lim\frac{f'}{g'}. All three hypotheses do hold for sinxx\frac{\sin x}{x}, so the rule is not false here — the objection is logical, not analytic. To check (ii) you must already know sin\sin is differentiable, and to evaluate limx0fg=limx0cosx1\lim_{x\to 0}\frac{f'}{g'}=\lim_{x\to 0}\frac{\cos x}{1} you must already know the value (sinx)=cosx(\sin x)'=\cos x — which is exactly the fact that limx0sinxx=1\lim_{x\to 0}\frac{\sin x}{x}=1 is being invoked to prove. That is circular. Once the derivative is established independently by the squeeze argument above, l'Hopital is perfectly legitimate on other trigonometric limits.

Deriving (sinx)=cosx(\sin x)'=\cos x from the definition

ddxsinx=limh0sin(x+h)sinxh=limh0sinxcosh+cosxsinhsinxh=limh0[sinxcosh1h+cosxsinhh]=sinx0+cosx1=cosx.\begin{aligned} \frac{d}{dx}\sin x &= \lim_{h\to 0}\frac{\sin(x+h)-\sin x}{h} \\ &= \lim_{h\to 0}\frac{\sin x\cos h+\cos x\sin h-\sin x}{h} \\ &= \lim_{h\to 0}\left[\sin x\cdot\frac{\cos h-1}{h}+\cos x\cdot\frac{\sin h}{h}\right] \\ &= \sin x\cdot 0+\cos x\cdot 1 = \cos x . \end{aligned}

Note that sinx\sin x and cosx\cos x are constants with respect to hh, which is why they can be pulled out of the hh-limits. The identical computation with cos(x+h)=cosxcoshsinxsinh\cos(x+h)=\cos x\cos h-\sin x\sin h gives

ddxcosx=limh0[cosxcosh1hsinxsinhh]=sinx.\frac{d}{dx}\cos x=\lim_{h\to 0}\left[\cos x\cdot\frac{\cos h-1}{h}-\sin x\cdot\frac{\sin h}{h}\right]=-\sin x .

The six derivatives

f(x)f(x)f(x)f'(x)Valid forSign pattern
sinx\sin xcosx\cos xall real xx++
cosx\cos xsinx-\sin xall real xx-
tanx\tan xsec2x\sec^2 xxπ2+kπx\ne\frac{\pi}{2}+k\pi++
cotx\cot xcsc2x-\csc^2 xxkπx\ne k\pi-
secx\sec xsecxtanx\sec x\tan xxπ2+kπx\ne\frac{\pi}{2}+k\pi++
cscx\csc xcscxcotx-\csc x\cot xxkπx\ne k\pi-

Here kk is any integer. Two structural facts make this table easy to remember: every co-function (cos\cos, cot\cot, csc\csc) carries the minus sign, and each co-row is obtained from its partner row by replacing every function with its co-function and flipping the sign. Each function is differentiable at every point of its domain, and nowhere else — tan\tan is not "differentiable with derivative sec2x\sec^2 x" at x=π2x=\frac{\pi}{2}; it is not defined there at all.

The other four via the quotient rule

Three rules combine with the table above, and each carries hypotheses.

Product Rule. If uu and vv are differentiable at xx, then (uv)(x)=u(x)v(x)+u(x)v(x)(uv)'(x)=u'(x)v(x)+u(x)v'(x).

Quotient Rule. If uu and vv are differentiable at xx and v(x)0v(x)\ne 0, then (uv)=uvuvv2\left(\dfrac{u}{v}\right)'=\dfrac{u'v-uv'}{v^2}. (Order matters: uvu'v comes first.) The hypothesis v(x)0v(x)\ne 0 is not decoration — it is what carves out the domain column above.

Chain Rule. If uu is differentiable at xx and the outer function is differentiable at u(x)u(x), then ddxsin(u(x))=cos(u(x))u(x)\dfrac{d}{dx}\sin\left(u(x)\right)=\cos\left(u(x)\right)\cdot u'(x), and likewise for the other five rows: ddxtan(u(x))=sec2(u(x))u(x)\dfrac{d}{dx}\tan\left(u(x)\right)=\sec^2\left(u(x)\right)\cdot u'(x), and so on.

ddxtanx=ddxsinxcosx=(cosx)(cosx)(sinx)(sinx)cos2x=cos2x+sin2xcos2x=1cos2x=sec2x,ddxsecx=ddx1cosx=(0)(cosx)(1)(sinx)cos2x=sinxcos2x=1cosxsinxcosx=secxtanx,ddxcotx=ddxcosxsinx=(sinx)(sinx)(cosx)(cosx)sin2x=1sin2x=csc2x,ddxcscx=ddx1sinx=(0)(sinx)(1)(cosx)sin2x=1sinxcosxsinx=cscxcotx.\begin{aligned} \frac{d}{dx}\tan x &= \frac{d}{dx}\frac{\sin x}{\cos x}=\frac{(\cos x)(\cos x)-(\sin x)(-\sin x)}{\cos^2x}=\frac{\cos^2x+\sin^2x}{\cos^2x}=\frac{1}{\cos^2x}=\sec^2x, \\ \frac{d}{dx}\sec x &= \frac{d}{dx}\frac{1}{\cos x}=\frac{(0)(\cos x)-(1)(-\sin x)}{\cos^2x}=\frac{\sin x}{\cos^2 x}=\frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}=\sec x\tan x, \\ \frac{d}{dx}\cot x &= \frac{d}{dx}\frac{\cos x}{\sin x}=\frac{(-\sin x)(\sin x)-(\cos x)(\cos x)}{\sin^2x}=\frac{-1}{\sin^2x}=-\csc^2x, \\ \frac{d}{dx}\csc x &= \frac{d}{dx}\frac{1}{\sin x}=\frac{(0)(\sin x)-(1)(\cos x)}{\sin^2x}=-\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x}=-\csc x\cot x . \end{aligned}

Each line is valid precisely where the denominator is nonzero, which is why the domain column above looks the way it does.

Worked example 1 (quotient rule, then simplify)

Differentiate y=sinx1+cosxy=\dfrac{\sin x}{1+\cos x}.

y=(cosx)(1+cosx)(sinx)(sinx)(1+cosx)2=cosx+cos2x+sin2x(1+cosx)2=cosx+1(1+cosx)2=11+cosx,xπ+2kπ.\begin{aligned} y' &= \frac{(\cos x)(1+\cos x)-(\sin x)(-\sin x)}{(1+\cos x)^2} \\ &= \frac{\cos x+\cos^2x+\sin^2x}{(1+\cos x)^2} \\ &= \frac{\cos x+1}{(1+\cos x)^2} \\ &= \frac{1}{1+\cos x}, \qquad x\ne \pi+2k\pi . \end{aligned}

Independent check. The half-angle identity gives y=tanx2y=\tan\frac{x}{2} and 1+cosx=2cos2x21+\cos x=2\cos^2\frac{x}{2}, so the answer should be 12sec2x2=12cos2(x/2)=11+cosx\frac{1}{2}\sec^2\frac{x}{2}=\frac{1}{2\cos^2(x/2)}=\frac{1}{1+\cos x}. It matches. Numerically at x=1.1x=1.1: the answer predicts 0.6879490.687949, and a centred difference quotient gives 0.6879490.687949.

Worked example 2 (product rule with three factors)

Differentiate f(x)=x2sinxcosxf(x)=x^2\sin x\cos x. Group as (x2)(sinxcosx)\left(x^2\right)\cdot\left(\sin x\cos x\right) and apply the product rule twice:

ddx(sinxcosx)=(cosx)(cosx)+(sinx)(sinx)=cos2xsin2x,f(x)=2x(sinxcosx)+x2(cos2xsin2x).\begin{aligned} \frac{d}{dx}\left(\sin x\cos x\right) &= (\cos x)(\cos x)+(\sin x)(-\sin x)=\cos^2x-\sin^2x, \\ f'(x) &= 2x\left(\sin x\cos x\right)+x^2\left(\cos^2x-\sin^2x\right). \end{aligned}

Independent check. Since sinxcosx=12sin2x\sin x\cos x=\frac{1}{2}\sin 2x, we have f(x)=x22sin2xf(x)=\frac{x^2}{2}\sin 2x, so f(x)=xsin2x+x2cos2xf'(x)=x\sin 2x+x^2\cos 2x. Using sin2x=2sinxcosx\sin 2x=2\sin x\cos x and cos2x=cos2xsin2x\cos 2x=\cos^2x-\sin^2x this is the same expression. At x=0.9x=0.9 both give 0.69242920.6924292.

Higher derivatives cycle with period 4

Each arrow below is one differentiation:

sinxcosxsinxcosxsinx.\sin x \to \cos x \to -\sin x \to -\cos x \to \sin x .

So dndxnsinx\frac{d^n}{dx^n}\sin x depends only on the remainder of nn on division by 44, and compactly dndxnsinx=sin(x+nπ2)\frac{d^n}{dx^n}\sin x=\sin\left(x+\frac{n\pi}{2}\right). A consequence used constantly in differential equations: y=sinxy=\sin x and y=cosxy=\cos x both satisfy y+y=0y''+y=0.

Why radians are required

Write D(θ)D(\theta) for the sine of an angle of θ\theta degrees. Since θ\theta degrees equals πθ180\frac{\pi\theta}{180} radians, D(θ)=sin(πθ180)D(\theta)=\sin\left(\frac{\pi\theta}{180}\right), and the difference quotient gives

D(θ)=π180cos(πθ180)0.017453cos(πθ180).D'(\theta)=\frac{\pi}{180}\cos\left(\frac{\pi\theta}{180}\right)\approx 0.017453\cos\left(\frac{\pi\theta}{180}\right).

The clean formula (sin)=cos(\sin)'=\cos is false in degrees; you pick up a factor of π180\frac{\pi}{180} every time you differentiate. The root cause is the sector-area (equivalently arc-length) comparison used to prove limx0sinxx=1\lim_{x\to 0}\frac{\sin x}{x}=1: arc length equals rθr\theta only in radians. Radians are the unique angle unit in which the fundamental limit equals 11.

Common mistakes

WrongRightWhy
ddxsin(x2)=cos(x2)\frac{d}{dx}\sin(x^2)=\cos(x^2)2xcos(x2)2x\cos(x^2)The table applies to sin\sin of the variable itself; anything else needs the chain rule.
ddx(sinxcosx)=(cosx)(sinx)\frac{d}{dx}(\sin x\cos x)=(\cos x)(-\sin x)cos2xsin2x\cos^2x-\sin^2xThe derivative of a product is not the product of derivatives.
ddxcosx=sinx\frac{d}{dx}\cos x=\sin xsinx-\sin xThe minus sign lives on the three co-functions.
ddxsecx=secxtanx\frac{d}{dx}\sec x=-\sec x\tan x+secxtanx+\sec x\tan xsec\sec is not a co-function; only csc\csc gets the minus.
ddxtanx=sec2x\frac{d}{dx}\tan x=\sec^2x for every xxonly for xπ2+kπx\ne\frac{\pi}{2}+k\pitan\tan has vertical asymptotes there.
(uv)=uvuvv2\left(\frac{u}{v}\right)'=\frac{uv'-u'v}{v^2}uvuvv2\frac{u'v-uv'}{v^2}Reversing the order negates every answer.
Using l'Hopital on sinxx\frac{\sin x}{x} to justify (sinx)=cosx(\sin x)'=\cos xSqueeze TheoremCircular: l'Hopital needs the derivative you are proving.
ddθsinθ=cosθ\frac{d}{d\theta}\sin\theta=\cos\theta with θ\theta in degreesπ180cos(πθ180)\frac{\pi}{180}\cos\left(\frac{\pi\theta}{180}\right) (radian cosine)Radians only; in degrees a factor π180\frac{\pi}{180} appears at every differentiation.
Writing sec2x\sec^2 x as secx2\sec x^2sec2x=(secx)2\sec^2x=(\sec x)^2secx2\sec x^2 reads as sec(x2)\sec(x^2), a different function.

Key terms

  • radian measure
  • difference quotient
  • angle addition formula
  • Squeeze Theorem
  • fundamental trigonometric limit
  • product rule
  • quotient rule
  • Pythagorean identity
  • secant, cosecant, cotangent
  • domain restriction
  • tangent line
  • higher-order derivative
  • period-4 derivative cycle
  • circular reasoning (l'Hopital)

Practice Problems

Differentiate f(x)=3sinx5cosx+2xf(x)=3\sin x-5\cos x+2x, and then evaluate f(π2)f'\left(\frac{\pi}{2}\right).

Show hint

Differentiate term by term; the sum and constant-multiple rules let you handle each piece separately. Watch the sign that appears when you differentiate cosx\cos x.

Show answer

Differentiate term by term using the sum rule and the constant multiple rule.

f(x)=3ddxsinx5ddxcosx+2ddxx=3(cosx)5(sinx)+2(1)=3cosx+5sinx+2.\begin{aligned} f'(x) &= 3\frac{d}{dx}\sin x-5\frac{d}{dx}\cos x+2\frac{d}{dx}x \\ &= 3(\cos x)-5(-\sin x)+2(1) \\ &= 3\cos x+5\sin x+2 . \end{aligned}

The subtraction of 5cosx5\cos x combined with (cosx)=sinx(\cos x)'=-\sin x produces +5sinx+5\sin x: two minus signs cancel.

Now evaluate at x=π2x=\frac{\pi}{2}, where cosπ2=0\cos\frac{\pi}{2}=0 and sinπ2=1\sin\frac{\pi}{2}=1:

f(π2)=3(0)+5(1)+2=7.f'\left(\frac{\pi}{2}\right)=3(0)+5(1)+2=7 .

Answer: f(x)=3cosx+5sinx+2f'(x)=3\cos x+5\sin x+2 and f(π2)=7f'\left(\frac{\pi}{2}\right)=7.

Differentiate g(x)=x2cosxg(x)=x^2\cos x and find g(π)g'(\pi).

Show hint

This is a product of two functions of xx, so a single derivative rule from the table is not enough on its own.

Show answer

Use the product rule: if uu and vv are differentiable at xx, then (uv)=uv+uv(uv)'=u'v+uv'. Here u=x2u=x^2 and v=cosxv=\cos x are both differentiable for every real xx, so the rule applies everywhere, with u=2xu'=2x and v=sinxv'=-\sin x.

g(x)=(2x)(cosx)+(x2)(sinx)=2xcosxx2sinx.\begin{aligned} g'(x) &= (2x)(\cos x)+(x^2)(-\sin x) \\ &= 2x\cos x-x^2\sin x . \end{aligned}

Evaluate at x=πx=\pi, where cosπ=1\cos\pi=-1 and sinπ=0\sin\pi=0:

g(π)=2π(1)π2(0)=2π6.2832.g'(\pi)=2\pi(-1)-\pi^2(0)=-2\pi\approx-6.2832 .

Check. A centred difference quotient with step 0.010.01 gives g(π+0.01)g(π0.01)0.026.2829\dfrac{g(\pi+0.01)-g(\pi-0.01)}{0.02}\approx-6.2829, consistent with 2π6.28319-2\pi\approx-6.28319 (a centred difference carries an error of order h2h^2, here about 3×1043\times10^{-4}).

Answer: g(x)=2xcosxx2sinxg'(x)=2x\cos x-x^2\sin x and g(π)=2πg'(\pi)=-2\pi.

Starting from cscx=1sinx\csc x=\dfrac{1}{\sin x}, use the quotient rule to prove that ddxcscx=cscxcotx\dfrac{d}{dx}\csc x=-\csc x\cot x. State exactly where the formula is valid.

Show hint

Apply the quotient rule with numerator the constant function 11, then split the resulting single fraction into a product of two familiar reciprocal ratios.

Show answer

Write u=1u=1 and v=sinxv=\sin x, so u=0u'=0 and v=cosxv'=\cos x. The quotient rule requires u,vu,v differentiable and v(x)0v(x)\ne 0; here that means sinx0\sin x\ne 0.

ddxcscx=uvuvv2=(0)(sinx)(1)(cosx)sin2x=cosxsin2x=1sinxcosxsinx=cscxcotx.\begin{aligned} \frac{d}{dx}\csc x &= \frac{u'v-uv'}{v^2} \\ &= \frac{(0)(\sin x)-(1)(\cos x)}{\sin^2 x} \\ &= -\frac{\cos x}{\sin^2 x} \\ &= -\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x} \\ &= -\csc x\cot x . \end{aligned}

The splitting step in the fourth line is the whole trick: write sin2x\sin^2x as sinxsinx\sin x\cdot\sin x and attach one factor to the 11 and the other to the cosx\cos x.

Validity. The formula holds exactly where sinx0\sin x\ne 0, i.e. for xkπx\ne k\pi with kk any integer. At x=kπx=k\pi the function cscx\csc x is undefined (it has a vertical asymptote), so there is no derivative to speak of.

Check. At x=1x=1 the formula gives csc(1)cot(1)=(1.188395)(0.642093)0.763060-\csc(1)\cot(1)=-(1.188395)(0.642093)\approx-0.763060, and a numerical difference quotient for 1/sinx1/\sin x at x=1x=1 gives 0.763060\approx-0.763060.

Answer: ddxcscx=cscxcotx\dfrac{d}{dx}\csc x=-\csc x\cot x for all xkπx\ne k\pi.

Evaluate

limh0cos(π3+h)cosπ3h\lim_{h\to 0}\frac{\cos\left(\frac{\pi}{3}+h\right)-\cos\frac{\pi}{3}}{h}

without expanding numerically. Then confirm your value a second way using the angle-addition formula and the two fundamental limits.

Show hint

Compare the expression letter by letter with the limit definition of the derivative at a point. What function, and at what point?

Show answer

Method 1: recognise the difference quotient. The definition of the derivative at aa is

f(a)=limh0f(a+h)f(a)h.f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}.

Matching the given expression, f(x)=cosxf(x)=\cos x and a=π3a=\frac{\pi}{3}. Since f(x)=sinxf'(x)=-\sin x,

limh0cos(π3+h)cosπ3h=sinπ3=320.8660.\lim_{h\to 0}\frac{\cos\left(\frac{\pi}{3}+h\right)-\cos\frac{\pi}{3}}{h}=-\sin\frac{\pi}{3}=-\frac{\sqrt{3}}{2}\approx-0.8660 .

Method 2: expand directly. Using cos(a+h)=cosacoshsinasinh\cos(a+h)=\cos a\cos h-\sin a\sin h with a=π3a=\frac{\pi}{3}:

cos(π3+h)cosπ3h=cosπ3coshsinπ3sinhcosπ3h=cosπ3cosh1hsinπ3sinhh.\begin{aligned} \frac{\cos\left(\frac{\pi}{3}+h\right)-\cos\frac{\pi}{3}}{h} &= \frac{\cos\frac{\pi}{3}\cos h-\sin\frac{\pi}{3}\sin h-\cos\frac{\pi}{3}}{h} \\ &= \cos\frac{\pi}{3}\cdot\frac{\cos h-1}{h}-\sin\frac{\pi}{3}\cdot\frac{\sin h}{h} . \end{aligned}

Now apply limh0cosh1h=0\lim_{h\to 0}\frac{\cos h-1}{h}=0 and limh0sinhh=1\lim_{h\to 0}\frac{\sin h}{h}=1:

12(0)32(1)=32.\to \frac{1}{2}(0)-\frac{\sqrt{3}}{2}(1)=-\frac{\sqrt{3}}{2}.

Both routes agree.

Answer: 32-\dfrac{\sqrt{3}}{2}.

Find the equation of the tangent line to y=secxy=\sec x at x=π3x=\dfrac{\pi}{3}.

Show hint

A tangent line needs two ingredients: a point on the curve and the slope there. Get the point first.

Show answer

Step 1: the point. secπ3=1cosπ3=11/2=2\sec\frac{\pi}{3}=\dfrac{1}{\cos\frac{\pi}{3}}=\dfrac{1}{1/2}=2, so the point of tangency is (π3,2)\left(\frac{\pi}{3},2\right).

Step 2: the slope. ddxsecx=secxtanx\dfrac{d}{dx}\sec x=\sec x\tan x, valid here because cosπ3=120\cos\frac{\pi}{3}=\frac12\ne 0. With secπ3=2\sec\frac{\pi}{3}=2 and tanπ3=3\tan\frac{\pi}{3}=\sqrt{3},

m=secπ3tanπ3=233.4641.m=\sec\frac{\pi}{3}\tan\frac{\pi}{3}=2\sqrt{3}\approx 3.4641 .

Step 3: point-slope form.

y2=23(xπ3)y=23x+223π3.y-2=2\sqrt{3}\left(x-\frac{\pi}{3}\right) \qquad\Rightarrow\qquad y=2\sqrt{3}x+2-\frac{2\sqrt{3}\pi}{3}.

Numerically y3.4641x1.6276y\approx 3.4641x-1.6276.

Check. A numerical derivative of secx\sec x at x=π3x=\frac{\pi}{3} gives 3.46413.4641, matching 232\sqrt{3}. Also, at x=π3+0.01x=\frac{\pi}{3}+0.01 the curve gives secx2.03535\sec x\approx 2.03535 while the line gives 2+23(0.01)2.034642+2\sqrt3(0.01)\approx 2.03464 — close, as a tangent line should be.

Answer: y=2+23(xπ3)y=2+2\sqrt{3}\left(x-\dfrac{\pi}{3}\right).

Let y=sinx+cosxy=\sin x+\cos x on [0,2π)[0,2\pi).

(a) Find every xx where the tangent line is horizontal, and give the corresponding points.

(b) Find every xx where the tangent line has slope 11.

Show hint

Both parts are equations in yy'. For part (b), a single-sine or single-cosine rewrite of cosxsinx\cos x-\sin x avoids the extraneous roots that squaring introduces.

Show answer

First, y=cosxsinxy'=\cos x-\sin x.

(a) Horizontal tangents: y=0y'=0.

cosxsinx=0exactly whensinx=cosx.\cos x-\sin x=0\quad\text{exactly when}\quad\sin x=\cos x .

Since cosx=0\cos x=0 would force sinx=0\sin x=0 (impossible, as sin2+cos2=1\sin^2+\cos^2=1), we may divide by cosx\cos x:

tanx=1givesx=π4orx=5π4in [0,2π).\tan x=1\quad\text{gives}\quad x=\frac{\pi}{4}\quad\text{or}\quad x=\frac{5\pi}{4}\quad\text{in }[0,2\pi).

The corresponding points are

(π4, 2)and(5π4, 2),\left(\frac{\pi}{4},\ \sqrt{2}\right)\quad\text{and}\quad\left(\frac{5\pi}{4},\ -\sqrt{2}\right),

because sinπ4+cosπ4=22+22=2\sin\frac{\pi}{4}+\cos\frac{\pi}{4}=\frac{\sqrt2}{2}+\frac{\sqrt2}{2}=\sqrt2 and sin5π4+cos5π4=2\sin\frac{5\pi}{4}+\cos\frac{5\pi}{4}=-\sqrt2.

(b) Slope 11: cosxsinx=1\cos x-\sin x=1. Rewrite the left side as a single cosine. Since

2cos(x+π4)=2(cosxcosπ4sinxsinπ4)=cosxsinx,\sqrt{2}\cos\left(x+\frac{\pi}{4}\right)=\sqrt2\left(\cos x\cos\frac{\pi}{4}-\sin x\sin\frac{\pi}{4}\right)=\cos x-\sin x,

the equation becomes

2cos(x+π4)=1that is,cos(x+π4)=12.\sqrt{2}\cos\left(x+\frac{\pi}{4}\right)=1 \quad\text{that is,}\quad \cos\left(x+\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}} .

For x[0,2π)x\in[0,2\pi) the argument x+π4x+\frac{\pi}{4} ranges over [π4,2π+π4)\left[\frac{\pi}{4},2\pi+\frac{\pi}{4}\right), and cosine equals 12\frac{1}{\sqrt2} there at x+π4=π4x+\frac{\pi}{4}=\frac{\pi}{4} and x+π4=7π4x+\frac{\pi}{4}=\frac{7\pi}{4}. (The next solution, 9π4\frac{9\pi}{4}, corresponds to x=2πx=2\pi, which is outside the interval.) Hence

x=0orx=3π2.x=0\quad\text{or}\quad x=\frac{3\pi}{2}.

Verify directly: at x=0x=0, y=cos0sin0=10=1y'=\cos 0-\sin 0=1-0=1; at x=3π2x=\frac{3\pi}{2}, y=0(1)=1y'=0-(-1)=1. Both work.

Remark. Squaring cosxsinx=1\cos x-\sin x=1 gives 12sinxcosx=11-2\sin x\cos x=1, i.e. sinxcosx=0\sin x\cos x=0, whose solutions in [0,2π)[0,2\pi) are 0,π2,π,3π20,\frac{\pi}{2},\pi,\frac{3\pi}{2}. The extra two, π2\frac{\pi}{2} and π\pi, give y=1y'=-1, not 11 — squaring introduced extraneous roots, so they must be checked and discarded.

Answer: (a) x=π4x=\frac{\pi}{4} and x=5π4x=\frac{5\pi}{4}, at the points (π4,2)\left(\frac{\pi}{4},\sqrt2\right) and (5π4,2)\left(\frac{5\pi}{4},-\sqrt2\right). (b) x=0x=0 and x=3π2x=\frac{3\pi}{2}.

Differentiate f(x)=sinxcosxsinx+cosxf(x)=\dfrac{\sin x-\cos x}{\sin x+\cos x} and simplify as far as possible. State the domain of the result.

Show hint

Apply the quotient rule, then expand the numerator; two perfect squares appear and the cross terms cancel.

Show answer

Set u=sinxcosxu=\sin x-\cos x and v=sinx+cosxv=\sin x+\cos x, so

u=cosx+sinx,v=cosxsinx.u'=\cos x+\sin x,\qquad v'=\cos x-\sin x .

Note u=vu'=v and v=uv'=-u, which is what makes the algebra collapse.

f(x)=uvuvv2=(cosx+sinx)(sinx+cosx)(sinxcosx)(cosxsinx)(sinx+cosx)2=(sinx+cosx)2+(sinxcosx)2(sinx+cosx)2.\begin{aligned} f'(x) &= \frac{u'v-uv'}{v^2} \\ &= \frac{(\cos x+\sin x)(\sin x+\cos x)-(\sin x-\cos x)(\cos x-\sin x)}{(\sin x+\cos x)^2} \\ &= \frac{(\sin x+\cos x)^2+(\sin x-\cos x)^2}{(\sin x+\cos x)^2} . \end{aligned}

The sign flip in the second term comes from (sinxcosx)(cosxsinx)=+(sinxcosx)2-(\sin x-\cos x)(\cos x-\sin x)=+(\sin x-\cos x)^2. Now expand both squares:

(sinx+cosx)2=sin2x+2sinxcosx+cos2x=1+2sinxcosx,(sinxcosx)2=sin2x2sinxcosx+cos2x=12sinxcosx.\begin{aligned} (\sin x+\cos x)^2 &= \sin^2x+2\sin x\cos x+\cos^2x=1+2\sin x\cos x, \\ (\sin x-\cos x)^2 &= \sin^2x-2\sin x\cos x+\cos^2x=1-2\sin x\cos x . \end{aligned}

Their sum is exactly 22, so

f(x)=2(sinx+cosx)2=21+2sinxcosx.f'(x)=\frac{2}{(\sin x+\cos x)^2}=\frac{2}{1+2\sin x\cos x}.

Domain. We need sinx+cosx0\sin x+\cos x\ne 0, i.e. tanx1\tan x\ne-1, i.e. x3π4+kπx\ne\frac{3\pi}{4}+k\pi for integers kk. Note f(x)>0f'(x)>0 everywhere it exists, so ff is increasing on each interval of its domain.

Check. f(x)=tan(xπ4)f(x)=\tan\left(x-\frac{\pi}{4}\right) (divide numerator and denominator by cosx\cos x and use the tangent subtraction formula), so f(x)=sec2(xπ4)f'(x)=\sec^2\left(x-\frac{\pi}{4}\right). At x=1x=1 this is 1.0475061.047506, and 2(sin1+cos1)2=1.047506\frac{2}{(\sin 1+\cos 1)^2}=1.047506 as well.

Answer: f(x)=2(sinx+cosx)2f'(x)=\dfrac{2}{(\sin x+\cos x)^2} for x3π4+kπx\ne\dfrac{3\pi}{4}+k\pi.

Let y=sinxy=\sin x.

(a) Show that y+y=0y''+y=0.

(b) Find d2026dx2026sinx\dfrac{d^{2026}}{dx^{2026}}\sin x, with justification.

Show hint

Differentiate a few times and watch for repetition. How many differentiations return you to where you started?

Show answer

(a) Differentiating twice:

y=sinx,y=cosx,y=ddxcosx=sinx.y=\sin x,\qquad y'=\cos x,\qquad y''=\frac{d}{dx}\cos x=-\sin x .

Therefore

y+y=sinx+sinx=0,y''+y=-\sin x+\sin x=0 ,

for all real xx. (The same holds for y=cosxy=\cos x, and hence for any y=Asinx+Bcosxy=A\sin x+B\cos x.)

(b) Continue the list:

y(1)=cosx,y(2)=sinx,y(3)=cosx,y(4)=sinx.\begin{aligned} y^{(1)} &= \cos x, \\ y^{(2)} &= -\sin x, \\ y^{(3)} &= -\cos x, \\ y^{(4)} &= \sin x . \end{aligned}

The fourth derivative returns the original function, so the sequence of derivatives is periodic with period 44: y(n)y^{(n)} depends only on the remainder when nn is divided by 44.

Divide: 2026=4506+22026=4\cdot 506+2, since 4506=20244\cdot 506=2024 and 20262024=22026-2024=2. The remainder is 22, so

d2026dx2026sinx=y(2)=sinx.\frac{d^{2026}}{dx^{2026}}\sin x=y^{(2)}=-\sin x .

Check with the closed formula. dndxnsinx=sin(x+nπ2)\dfrac{d^n}{dx^n}\sin x=\sin\left(x+\dfrac{n\pi}{2}\right). With n=2026n=2026: 2026π2=1013π\frac{2026\pi}{2}=1013\pi, and since 10131013 is odd, sin(x+1013π)=sinx\sin(x+1013\pi)=-\sin x. Same answer.

Answer: (a) y+y=0y''+y=0. (b) sinx-\sin x.

A student writes "ddθsinθ=cosθ\dfrac{d}{d\theta}\sin\theta=\cos\theta" while working in degrees. Explain precisely why this is false, and compute the correct derivative of the degree-sine function from the limit definition. Evaluate it at θ=60\theta=60 degrees.

Show hint

Give the degree-sine its own name and rewrite it in terms of the radian sine before you differentiate anything. Then use a substitution inside the difference quotient.

Show answer

Why it fails. Every derivative formula in the table is proved from limx0sinxx=1\lim_{x\to 0}\frac{\sin x}{x}=1, and that limit is only true when xx is a radian measure. The proof compares a triangle, a sector, and a triangle on the unit circle, and the sector area 12r2x\frac{1}{2}r^2x (equivalently arc length rxrx) is valid only in radians. In degrees the corresponding limit is not 11, so the derivative picks up a constant factor.

The correct derivative. Let

D(θ)=the sine of an angle of θ degrees=sin(πθ180),D(\theta)=\text{the sine of an angle of }\theta\text{ degrees}=\sin\left(\frac{\pi\theta}{180}\right),

where the sine on the right is the ordinary radian sine. From the definition:

D(θ)=limh0sin(π(θ+h)180)sin(πθ180)h.\begin{aligned} D'(\theta) &= \lim_{h\to 0}\frac{\sin\left(\frac{\pi(\theta+h)}{180}\right)-\sin\left(\frac{\pi\theta}{180}\right)}{h} . \end{aligned}

Substitute a=πθ180a=\frac{\pi\theta}{180} and k=πh180k=\frac{\pi h}{180}, so that h=180πkh=\frac{180}{\pi}k and k0k\to 0 exactly when h0h\to 0:

D(θ)=limk0sin(a+k)sina180πk=π180limk0sin(a+k)sinak=π180cosa=π180cos(πθ180),\begin{aligned} D'(\theta) &= \lim_{k\to 0}\frac{\sin(a+k)-\sin a}{\frac{180}{\pi}k} \\ &= \frac{\pi}{180}\lim_{k\to 0}\frac{\sin(a+k)-\sin a}{k} \\ &= \frac{\pi}{180}\cos a \\ &= \frac{\pi}{180}\cos\left(\frac{\pi\theta}{180}\right), \end{aligned}

using the (radian) result (sin)=cos(\sin)'=\cos in the third line.

Since π1800.01745331\frac{\pi}{180}\approx 0.0174533\ne 1, the student's formula is off by that factor at every point — and by a factor of (π180)n\left(\frac{\pi}{180}\right)^n after nn differentiations.

At θ=60\theta=60 degrees: π(60)180=π3\frac{\pi(60)}{180}=\frac{\pi}{3}, so

D(60)=π180cosπ3=π18012=π3600.0087266.D'(60)=\frac{\pi}{180}\cos\frac{\pi}{3}=\frac{\pi}{180}\cdot\frac12=\frac{\pi}{360}\approx 0.0087266 .

Check. Numerically, D(60.01)D(59.99)0.020.0087266\dfrac{D(60.01)-D(59.99)}{0.02}\approx 0.0087266.

Answer: D(θ)=π180cos(πθ180)D'(\theta)=\dfrac{\pi}{180}\cos\left(\dfrac{\pi\theta}{180}\right), and D(60)=π3600.008727D'(60)=\dfrac{\pi}{360}\approx0.008727. This is why calculus is always done in radians.

Differentiate f(x)=xsinx1+cosxf(x)=\dfrac{x\sin x}{1+\cos x} and simplify your answer to a single fraction with no products of trigonometric functions in it.

Show hint

You will need the product rule to differentiate the numerator before you can use the quotient rule. After expanding, look for a common factor of 1+cosx1+\cos x.

Show answer

Let u=xsinxu=x\sin x and v=1+cosxv=1+\cos x. First differentiate uu with the product rule:

u=(1)(sinx)+(x)(cosx)=sinx+xcosx,v=sinx.u'=(1)(\sin x)+(x)(\cos x)=\sin x+x\cos x,\qquad v'=-\sin x .

Now the quotient rule (valid where 1+cosx01+\cos x\ne 0):

f(x)=(sinx+xcosx)(1+cosx)(xsinx)(sinx)(1+cosx)2=(sinx+xcosx)(1+cosx)+xsin2x(1+cosx)2.\begin{aligned} f'(x) &= \frac{(\sin x+x\cos x)(1+\cos x)-(x\sin x)(-\sin x)}{(1+\cos x)^2} \\ &= \frac{(\sin x+x\cos x)(1+\cos x)+x\sin^2x}{(1+\cos x)^2} . \end{aligned}

Expand the numerator carefully:

numerator=sinx+sinxcosx+xcosx+xcos2x+xsin2x=sinx+sinxcosx+xcosx+x(cos2x+sin2x)=sinx+sinxcosx+xcosx+x=sinx(1+cosx)+x(1+cosx)=(1+cosx)(sinx+x).\begin{aligned} \text{numerator} &= \sin x+\sin x\cos x+x\cos x+x\cos^2x+x\sin^2x \\ &= \sin x+\sin x\cos x+x\cos x+x\left(\cos^2x+\sin^2x\right) \\ &= \sin x+\sin x\cos x+x\cos x+x \\ &= \sin x(1+\cos x)+x(1+\cos x) \\ &= (1+\cos x)(\sin x+x). \end{aligned}

Cancel one factor of 1+cosx1+\cos x:

f(x)=x+sinx1+cosx,xπ+2kπ.f'(x)=\frac{x+\sin x}{1+\cos x},\qquad x\ne \pi+2k\pi .

Check. Using the half-angle identity sinx1+cosx=tanx2\frac{\sin x}{1+\cos x}=\tan\frac{x}{2}, we have f(x)=xtanx2f(x)=x\tan\frac{x}{2}, so by the product rule f(x)=tanx2+x2sec2x2f'(x)=\tan\frac{x}{2}+\frac{x}{2}\sec^2\frac{x}{2}. At x=π2x=\frac{\pi}{2} that is 1+π4(2)=1+π22.57081+\frac{\pi}{4}(2)=1+\frac{\pi}{2}\approx 2.5708, and our formula gives π/2+11+0=1+π2\frac{\pi/2+1}{1+0}=1+\frac{\pi}{2}. A numerical difference quotient at x=1x=1 gives 1.195531.19553, matching 1+sin11+cos1=1.19553\frac{1+\sin 1}{1+\cos 1}=1.19553.

Answer: f(x)=x+sinx1+cosxf'(x)=\dfrac{x+\sin x}{1+\cos x} for xπ+2kπx\ne\pi+2k\pi.

Let f(x)=secxcosxsinxf(x)=\dfrac{\sec x-\cos x}{\sin x}.

(a) State the domain of ff.

(b) Differentiate ff two ways: by simplifying first, and by applying the quotient rule directly. Confirm the two answers agree.

(c) Is ff the same function as tanx\tan x? Justify.

Show hint

Put secxcosx\sec x-\cos x over the common denominator cosx\cos x and see what the Pythagorean identity does to the numerator.

Show answer

(a) Domain. We need cosx0\cos x\ne 0 (for secx\sec x to exist) and sinx0\sin x\ne 0 (for the outer denominator). So the domain is all xx with xkπ2x\ne\dfrac{k\pi}{2} for every integer kk.

(b) Method 1: simplify first.

f(x)=1cosxcosxsinx=1cos2xcosxsinx=sin2xcosxsinx=sinxcosx=tanx(on the domain above).\begin{aligned} f(x) &= \frac{\frac{1}{\cos x}-\cos x}{\sin x} \\ &= \frac{\frac{1-\cos^2x}{\cos x}}{\sin x} \\ &= \frac{\sin^2 x}{\cos x\sin x} \\ &= \frac{\sin x}{\cos x}=\tan x \qquad(\text{on the domain above}). \end{aligned}

Therefore f(x)=sec2xf'(x)=\sec^2x there.

Method 2: quotient rule directly. With u=secxcosxu=\sec x-\cos x and v=sinxv=\sin x:

u=secxtanx+sinx,v=cosx.u'=\sec x\tan x+\sin x,\qquad v'=\cos x . f(x)=(secxtanx+sinx)sinx(secxcosx)cosxsin2x=secxtanxsinx+sin2xsecxcosx+cos2xsin2x=secxtanxsinx+11sin2x(secxcosx=1, sin2x+cos2x=1)=1cosxsinxcosxsinxsin2x=sin2xcos2xsin2x=1cos2x=sec2x.\begin{aligned} f'(x) &= \frac{(\sec x\tan x+\sin x)\sin x-(\sec x-\cos x)\cos x}{\sin^2x} \\ &= \frac{\sec x\tan x\sin x+\sin^2x-\sec x\cos x+\cos^2x}{\sin^2x} \\ &= \frac{\sec x\tan x\sin x+1-1}{\sin^2x} \qquad(\sec x\cos x=1,\ \sin^2x+\cos^2x=1)\\ &= \frac{\frac{1}{\cos x}\cdot\frac{\sin x}{\cos x}\cdot\sin x}{\sin^2 x} \\ &= \frac{\sin^2x}{\cos^2x\sin^2x}=\frac{1}{\cos^2x}=\sec^2x . \end{aligned}

The two methods agree: f(x)=sec2xf'(x)=\sec^2x. Numerically at x=2x=2, both give 5.7743995.774399.

(c) No — the functions are equal only on the domain of ff. The formulas agree wherever both are defined, but tanx\tan x is defined at x=kπx=k\pi (where tan(kπ)=0\tan(k\pi)=0) while ff is not, because its denominator sinx\sin x vanishes there. So ff is the restriction of tan\tan to the set where sinx0\sin x\ne 0 and cosx0\cos x\ne 0; it has removable discontinuities at x=kπx=k\pi. Consequently f(x)=sec2xf'(x)=\sec^2x holds only for xkπ2x\ne\frac{k\pi}{2}, whereas (tanx)=sec2x(\tan x)'=\sec^2x holds on the larger set xπ2+kπx\ne\frac{\pi}{2}+k\pi.

Answer: domain xkπ2x\ne\frac{k\pi}{2}; f(x)=sec2xf'(x)=\sec^2x on that domain; ff equals tanx\tan x only there, not at x=kπx=k\pi.

Let y=tanxy=\tan x on an interval where it is defined.

(a) Show that yy satisfies the differential equation y=1+y2y'=1+y^2.

(b) Using only that equation (and differentiation), express yy'' and yy''' as polynomials in yy.

(c) Verify your expression for yy''' by differentiating tanx\tan x three times directly.

Show hint

For (a) start from y=sec2xy'=\sec^2x and recall which Pythagorean identity links sec2\sec^2 and tan2\tan^2. For (b), differentiate the equation itself and substitute y=1+y2y'=1+y^2 each time.

Show answer

Throughout, assume xπ2+kπx\ne\frac{\pi}{2}+k\pi so that tanx\tan x and all its derivatives exist.

(a) We know y=sec2xy'=\sec^2x. Dividing sin2x+cos2x=1\sin^2x+\cos^2x=1 by cos2x\cos^2x gives tan2x+1=sec2x\tan^2x+1=\sec^2x. Hence

y=sec2x=1+tan2x=1+y2.y'=\sec^2x=1+\tan^2x=1+y^2 .

(b) Differentiate y=1+y2y'=1+y^2 with respect to xx, treating yy as a function of xx (product rule on yyy\cdot y, or the power rule with the chain rule):

y=2yy=2y(1+y2)=2y+2y3.y''=2yy'=2y\left(1+y^2\right)=2y+2y^3 .

Differentiate again:

y=ddx(2y+2y3)=2y+6y2y=(2+6y2)y=(2+6y2)(1+y2)=2+2y2+6y2+6y4=2+8y2+6y4.\begin{aligned} y''' &= \frac{d}{dx}\left(2y+2y^3\right)=2y'+6y^2y' \\ &= \left(2+6y^2\right)y' \\ &= \left(2+6y^2\right)\left(1+y^2\right) \\ &= 2+2y^2+6y^2+6y^4 \\ &= 2+8y^2+6y^4 . \end{aligned}

(c) Direct verification. Differentiate tanx\tan x three times using the table and the product rule:

y=sec2x,y=ddx(secxsecx)=2secx(secxtanx)=2sec2xtanx,y=2[(2sec2xtanx)tanx+sec2xsec2x]=4sec2xtan2x+2sec4x.\begin{aligned} y' &= \sec^2x, \\ y'' &= \frac{d}{dx}\left(\sec x\cdot\sec x\right)=2\sec x\left(\sec x\tan x\right)=2\sec^2x\tan x, \\ y''' &= 2\left[\left(2\sec^2x\tan x\right)\tan x+\sec^2x\cdot\sec^2x\right]=4\sec^2x\tan^2x+2\sec^4x . \end{aligned}

Now substitute sec2x=1+t2\sec^2x=1+t^2 with t=tanxt=\tan x:

4(1+t2)t2+2(1+t2)2=4t2+4t4+2(1+2t2+t4)=4t2+4t4+2+4t2+2t4=2+8t2+6t4,\begin{aligned} 4\left(1+t^2\right)t^2+2\left(1+t^2\right)^2 &= 4t^2+4t^4+2\left(1+2t^2+t^4\right) \\ &= 4t^2+4t^4+2+4t^2+2t^4 \\ &= 2+8t^2+6t^4 , \end{aligned}

which is exactly the polynomial from part (b). Numerically at x=0.6x=0.6: the direct formula gives y=7.05873y'''=7.05873 and 2+8tan2(0.6)+6tan4(0.6)=7.058732+8\tan^2(0.6)+6\tan^4(0.6)=7.05873.

Answer: (a) y=1+y2y'=1+y^2. (b) y=2y+2y3y''=2y+2y^3 and y=2+8y2+6y4y'''=2+8y^2+6y^4. (c) Verified.