Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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 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?

share|improve this question
    
You could try run the user input through some symbolic analysis program and get the "real" asymptotes, but for your program it will probably be better for you to apply some heuristic such as calling an asymptote anywhere you find the "derivative" ($\frac{\Delta y}{\Delta x}$) is larger than some threshold and the nearby values seem large. –  Alfonso Fernandez Mar 16 at 22:06
    
I guess that seems like a good idea –  user1152717 Mar 16 at 23:46

1 Answer 1

There is a limit test at a point x = a. So if lim f(x) = + or - infinity when x --> a, then you say x = a is a vertical asymptote.

share|improve this answer
    
Yes, but is that possible to do with just a discreet set of points? –  user1152717 Mar 16 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.