How do you graph #f(x)=tanx# and include two full periods?

1 Answer
Jan 16, 2018

graph{tanx [-19.25, 20.75, -9.44, 10.56]}

Explanation:

Lets first analyse the function for the period [-π/2,π/2]
tan(-x)=-tanx thus Odd Function

Some specific points
tan(0)=0, tan(π/2)=infinity, tan(-π/2)= - infinity

Lets see the graph of tanx lies above or below y=x
graph{x [-20.12, 19.88, -9.32, 10.68]}

Consider the function tanx - x
Differentiating it w.r.t to x
#sec^2x-1#
since #sec^2x-1>0# It is an increasing function
at x=0 ,tan x -x =0
since its an increasing function
for x>0 => tanx -x >0 thus tanx >x
similarly for x<0 tanx < x

enter image source here

Discussing the Slopes and Concavity
Slope
d(tanx)/dx = #sec^2 x #
At x=0 Slope is π/4
enter image source here

At x= π/2 and -π/2 it is infinity thus parallel to y axis
enter image source here

Concavity
Taking second order derivative
2secx secxtanx
which is positive for x>0
thus slope is increasing Concave up
graph{tanx [-1.67, 3.33, -0.11, 2.39]}
Similarly its concave down for x<0
graph{tanx [-2.805, 2.195, -2.445, 0.055]}

for the period [- π/2,π/2 ]
Graph is
enter image source here

Periodicity
Period of tanx is π Just repeat the graph

The required graph is
graph{tanx [-4.93, 15.07, -4.71, 5.29]}