# Finding area of $y=\tan x$ and $y=2\sin x$

I have $y=\tan x$ and $y=2\sin x$ between $-\pi/3$ and $\pi/3$.

I make the graph of it and it is an odd function, why is the area not zero? Is there some property or rule I am missing? I have graphed it over four times and I get the same graph every time.

-
What do you mean by the area of two functions? Do you mean the area between the two functions? And, if so, do you mean between two specific x values? –  Graphth Apr 28 '12 at 21:21

Edit: Completely rewritten to correct a misreading of the original problem.

You know that the graphs of $y=\tan x$ and $y=2\sin x$ cross at $x=0$. Where else do they cross? You need to solve $$2\sin x=\tan x=\frac{\sin x}{\cos x}\;,$$ or $$2\sin x\cos x=\sin x\;.$$ One solution is $\sin x=0$, which in the interval from $-\pi/3$ to $\pi/3$ means that $x=0$; we already knew about that. If $\sin x\ne 0$, we can divide through by it to find that $2\cos x=1$, or $\cos x=1/2$. That happens at $x=\pi/3$ and $x=-\pi/3$, so the curves actually cross at the ends of your interval as well as in the middle.

Now, which one is on top where? A really close look at the graphs with a graphing calculator will probably tell you, but you don’t need that tool. Just look at what happens at $x=\frac{\pi}4$: $2\sin\frac{\pi}4=\sqrt2$, and $\tan\frac{\pi}4=1$, so at $x=\frac{\pi}4$, the $y=2\sin x$ curve is above the $y=\tan x$ curve. We know that the curves don’t cross between $x=0$ and $x=\frac{\pi}3$, so the $y=2\sin x$ curve must be above the $y=\tan x$ curve over the entire interval from $x=0$ to $x=\frac{\pi}3$. This means that the length of the vertical strip at some $x$ between $0$ and $\frac{\pi}3$ is top $y$-coordinate minus bottom $y$-coordinate, or $2\sin x-\tan x$.

For $-\pi/3\le x\le 0$ you can either notice that the strips now run from a low $y$ value of $2\sin x$ up to a high $y$ value of $\tan x$ and therefore have length $\tan x-2\sin x$, or you can use your observation that the functions are odd to say that the lefthand area must be equal to the righthand area. Either way, your final result is just the sum of the left- and righthand areas.

Added: In view of your last comment, I thought that I’d finish the calculation; perhaps you’ll easily be able to track down where you went astray. (If you did: sometimes the answer at the back of the book is wrong, even in a well-established text like Stewart’s.)

\begin{align*}\int_0^{\pi/3}(2\sin x-\tan x)dx&=\Big[-2\cos x-\ln|\cos x|\Big]_0^{\pi/3}\\ &=-2\cos\frac{\pi}3-(-2\cos 0)-\ln\left|\cos\frac{\pi}3\right|-(-\ln|\cos 0|)\\ &=-1-(-2)-\ln\frac12+\ln 1\\ &=1-\ln\frac12+0\\ &=1-(\ln 1-\ln 2)\\ &=1+\ln 2\;. \end{align*}

This is the area of the righthand half, so by symmetry the total area is twice this, or $2+2\ln 2$.

-
I tried to do 2sinx - tanx for positive area and then tanx - 2sinx for negative area but I can't get the right answer. Did I set it up right? –  user138246 Apr 28 '12 at 21:43
@Jordan: I have to apologize again; I’m apparently having a really bad day, since I misread the problem again. Let me re-do my answer before I do anything else. –  Brian M. Scott Apr 28 '12 at 21:45
@Jordan: Yes, you did set it up right. But it’s easier just to set up the positive side and then double the result. –  Brian M. Scott Apr 28 '12 at 21:58
I still can't get the right answer but if you said I set it up right I will just stop now and move on since I have wasted too long on this problem already. Thank you. –  user138246 Apr 28 '12 at 22:07
How are you getting ln1/2 = ln1 - ln2? –  user138246 Apr 28 '12 at 22:25

I assume you must find the area between $\tan x$ and $2\sin x$ on the $x$-axis interval $[-\pi/3,\pi/3]$.

It is true that the integral evaluates to the signed area between a function and the $x$-axis. However, it doesn't appear to me this question is asking about the signed area between the two functions: it is asking about the absolute area between the two. Thus, you need a way to make the negative area positive in your calculation to give it the correct sign. This is easy; by symmetry simply evaluate

$$2\int_0^{\pi/3}\tan x-2\sin x dx.$$

(Fortunately, the question pretty much gives away the $x$-coordinate of the positive intercept, $\pi/3$.)

-