How can we draw $x \cos \left(\frac{1}{x}\right)$ , $\frac{1}{x} \cos \left(\frac{1}{x}\right) $ , $\frac{1}{x} \cos (x)$?

75 Views Asked by At

How can we draw $x \cos \left(\frac{1}{x}\right)$ , $\frac{1}{x} \cos \left(\frac{1}{x}\right) $ , $\frac{1}{x} \cos (x)$?

I want to draw them on my own. I am not much interested in the picture. I want to learn to draw them. Can anyone please help me?

1

There are 1 best solutions below

0
On

You will never be as good as a computer at sketching function graphs. However, one handy technique for at least getting a handle on what certain parts of the graphs look like is looking at limiting cases and zeros.

For instance, let's take $x\cos(1/x)$ since that's the one Omnomnomnom had a computer sketch for you. We can see that as $x$ gets large $1/x$ goes to zero, so $\cos(1/x)\to \cos(0)=1.$ This means we expect the graph to be asymptotic to the line $y=x$ for large $x.$ Also, we can see plugging in $-x$ that the function is odd, so it will be antisymmetric about the y axis. (Thus when $x\to -\infty$ it is asymptotic to $y=x$ as well).

Now we can think about the zeros. this function has a zero whenever $\cos(1/x)$ has a zero, so whenever $$1/x = (n+1/2)\pi$$ for some integer $n.$ This means the zeros are $$ x_n = \frac{1}{(n+1/2)\pi} = \pm\frac{2}{\pi}, \pm\frac{2}{3\pi},\pm\frac{2}{5\pi},\ldots.$$ Notice that as $n$ gets large, these zeros get closer and closer to the origin. This tells us that as we approach the origin, the function crosses zero more and more rapidly.

Lastly we can look more closely at the origin. We know that as the cos function goes through a cycle, it oscillates between zero and one. So the oscillations of $x\cos(1/x)$ are enveloped by the lines $y=\pm x.$ Thus as we get closer to the origin, it is squeezed to zero.

(In fact I advise you to play around with the desmos app and draw $\pm x$ as well. Here is a wolfram alpha version.)

Some other things to keep in mind: we know the function is continuous (functions that are too discontinuous are hard to visualize coherently anyway). Lastly we should look for any infinities or vertical asymptotes. The $1/x$ is suspicious at the origin, cause the expression is not defined there. But as we discussed in the previous paragraphs, near the origin the function oscillates rapidly as it's squeezed to zero there. So we know what it looks like there, and we see that it would be natural to define the function to be zero at the origin.