How to detect an asymptote

436 Views Asked by At

So I'm trying to write a program to draw graphs that are entered by the user. The way I draw them is by finding y values at $x=a$ number of $x$ values across the graph and then connecting them by lines. However, some graphs (like $\tan(x)$) have asymptotes, so the bottom and top values are connected. Is there any mathematical way to detect whether there is a asymptote at a point or not?

1

There are 1 best solutions below

1
On BEST ANSWER

There is a limit test at a point $x=a$. So if $\lim_{x\to 0}f(x)=\pm\infty$, then you say $x=a$ is a vertical asymptote.