1. ## plotting a graph

hello, how would I plot a graph y = 2/x for -2<x<2 ?

2. Originally Posted by sillylilly
hello, how would I plot a graph y = 2/x for -2<x<2 ?
Plot the extrema

$\displaystyle f(-2) = -1$

$\displaystyle f(2) = 1$

$\displaystyle f(0) = unde fined$

If you know the shape of the graph of $\displaystyle y=\frac{1}{x}$ you'll find it's much the same. Plot the two defined points above and draw the standard graph through

3. yes thats what ive got, so is it really supposed to be
(-2, -1) (-1, -2) (0,0) (1,2) (2,1) ?

when i plot this it looks like a z shape and at no point does it cross the other equation y = e^x , which is why i thought there must be something wrong.

4. $\displaystyle y = \frac{2}{x}$

5. yeah thats the graph shape i get, its just i need to plot the other equation on the same graph, so i can find the place where they cross over, and they dont cross anywhere. the other equation is y = e^x and the line ive got already for that looks like its right, so where am i going wrong, or what am i missing ?

6. Originally Posted by sillylilly
yeah thats the graph shape i get, its just i need to plot the other equation on the same graph, so i can find the place where they cross over, and they dont cross anywhere. the other equation is y = e^x and the line ive got already for that looks like its right, so where am i going wrong, or what am i missing ?
You need to draw your graphs more carfully. y = 2/x and y = e^x intersect at x = 0.8526 (correct to four decimal places).

(The exact value is actually x = W(2) where W is the Lambert W-function.)

7. Originally Posted by sillylilly
yes thats what ive got, so is it really supposed to be
(-2, -1) (-1, -2) (0,0) (1,2) (2,1) ?

when i plot this it looks like a z shape and at no point does it cross the other equation y = e^x , which is why i thought there must be something wrong.
(0,0) is not a point on either graph.

On the attached graph $\displaystyle y=e^x$ is in green and $\displaystyle y=\frac{2}{x}$ is in blue.

As you can see they intersect and it's close enough to Mr F's answer so his is highly likely to be correct (and not just because he's Mr F )

8. The problem did not say "use a graphing utility to produce the plot".

Whenever you want to sketch a curve you should start out by finding its x- and y-intercepts by setting y and x equal to 0 respectively. For $\displaystyle y=\frac{2}{x}$ you can't find any finite value, so you know the graph doesn't cut the x & y intercept.
Then you should determine its asymptotes, You can calculate the vertical asymptote by inspecting where the graph would be undefined (i.e., $\displaystyle y=\infty$), obviously in this case the denominator is zero at $\displaystyle x=0$ so you have a vertical asymptote there. In order to find the horizontal asymptote you need to compute the limits of your function as $\displaystyle x \rightarrow \pm \infty$, if either limit has a finite value L, then the line y=L is a horizontal asymptote. $\displaystyle \lim_{x \rightarrow \pm \infty} \frac{2}{x} = 0$, so your horizontal asymptote is at $\displaystyle y=0$.

Using the values of y' you can then check where the graph is increasing (+ve) or decreasing (-ve). Values of y'' tells you where the graph is concave up or concave down. You have enough information to plot the graph.

As far as $\displaystyle y=e^x$ is concerned, you know that $\displaystyle e^x$ is the inverse of $\displaystyle ln x$, so its graph can be obtained from that of $\displaystyle ln x$ by reflection in the line $\displaystyle y=x$. Therefore its y-int is y=1 (as x=1 was the x-int of ln x), and the range of $\displaystyle e^x$will be the set of all positive real numbers.