topic badge
New Zealand
Level 8 - NCEA Level 3

Area between tan curve and linear function


The ideas in this chapter are similar to those in another chapter which dealt with areas between sine or cosine curves and lines.

This chapter involves the tangent function. So, we consider solving simultaneous equations with a tangent function and a linear function, and we will need the integral of the tangent function.


The tangent function is defined by the ratio $\frac{\sin x}{\cos x}$sinxcosx for all real numbers $x$x except those of the form $n\pi+\frac{\pi}{2}$nπ+π2 where $n$n is an integer. In other words, the tangent function is undefined at points where $\cos x=0$cosx=0.

Notice that $\cos x$cosx is the derivative of $\sin x$sinx , which is a clue in the definition that the antiderivative of $\tan x$tanx might involve the $\log$log function. You should check, using the function-of-a-function procedure that 

$\frac{\mathrm{d}}{\mathrm{d}x}\left(-\log(\cos x)\right)=\frac{\sin x}{\cos x}=\tan x$ddx(log(cosx))=sinxcosx=tanx

It follows that

$\int\ \tan x\ \mathrm{d}x=-\log(\cos x)+C$ tanx dx=log(cosx)+C

(In this work we use the base $e$e logarithm.)


Example 1

The following diagram shows shapes bounded by the line with equation $g(x)=\frac{4x}{\pi}$g(x)=4xπ and the curve $f(x)=\tan x.$f(x)=tanx.

We want to find the area of the enclosed shape between the origin and the point where the two functions intersect.

At points of intersection, we have $g(x)=f(x)$g(x)=f(x). So, we solve $\frac{4x}{\pi}=\tan x$4xπ=tanx.

Equations of this sort are generally impossible to solve algebraically and we resort to a numerical method to get an approximation to any desired degree of accuracy. In this case, however, we might spot the fact that  $x=\frac{\pi}{4}$x=π4 satisfies the equation.

Hence, we evaluate $\int_0^{\frac{\pi}{4}}\ \left(\frac{4x}{\pi}-\tan x\right)\ \mathrm{d}x$π40 (4xπtanx) dx.

$\text{Area}$Area $=$= $\int_0^{\frac{\pi}{4}}\ \left(\frac{4x}{\pi}-\tan x\right)\ \mathrm{d}x$π40 (4xπtanx) dx
  $=$= $\left[\frac{2x^2}{\pi}+\log(\cos x)\right]_0^{\frac{\pi}{4}}$[2x2π+log(cosx)]π40
  $=$= $\frac{\pi}{8}+\log\frac{1}{\sqrt{2}}$π8+log12
$\approx$ $0.0461$0.0461


Example 2

The following diagram shows graphs of $f(x)=\tan x$f(x)=tanx and $g(x)=1-\frac{4x}{\pi}$g(x)=14xπ. We wish to find the combined areas of the almost triangular shapes between the graphs between $x=0$x=0 and $x=\frac{\pi}{4}.$x=π4.

In this case, we need to perform the calculation in two parts because the graphs cross one another. In the first part we integrate $g(x)-f(x)$g(x)f(x) and in the second part we integrate $f(x)-g(x)$f(x)g(x). We need to find the point of intersection.

To do this, we solve $\tan x=1-\frac{4x}{\pi}$tanx=14xπ

a numerical method

The equation to be solved can be rearranged to the equivalent form $x=\frac{\pi}{4}(1-\tan x)$x=π4(1tanx). Suppose we now guess a value for $x$x. Say, $\frac{\pi}{6}\approx0.5236$π60.5236.

Then, using this value for $x$x in the right-hand side we have $\frac{\pi}{4}(1-\tan x)=0.3319$π4(1tanx)=0.3319. Our initial guess was incorrect but if we use this result as our next guess, we get a new result, $0.5146...$0.5146... . If we keep feeding the new result back as the next guess, we eventually find that we obtain a number close to $0.42753$0.42753 that does not change much when fed back into the right-hand side of the equation.

This can be done on an ordinary calculator with a memory labelled $X$X. Put the initial guess into $X$X then carry out this iteration many times. You should only need to press the 'execute' key (repeatedly).

$\frac{\pi}{4}(1-\tan X)\rightarrow X$π4(1tanX)X


the integration

We now evaluate

$\int_0^{0.4275}\ \left(1-\frac{4x}{\pi}-\tan x\right)\ \mathrm{d}x+\int_{0.4275}^{\frac{\pi}{4}}\ \left(\tan x-1+\frac{4x}{\pi}\right)\ \mathrm{d}x.$0.42750 (14xπtanx) dx+π40.4275 (tanx1+4xπ) dx.

This is

$\left[x-\frac{2x^2}{\pi}+\log\cos x\right]_0^{0.4275}+\left[-\log\cos x-x+\frac{2x^2}{\pi}\right]_{0.4275}^{\frac{\pi}{4}}$[x2x2π+logcosx]0.42750+[logcosxx+2x2π]π40.4275






Choose and apply a variety of differentiation, integration, and antidifferentiation techniques to functions and relations, using both analytical and numerical methods


Apply integration methods in solving problems

What is Mathspace

About Mathspace