0
|
3308 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# What's the difference between these two Exclusions / Asymptotes?

Posted 9 years ago
 I'm trying to Plot a graph of 1/Sqrt[x^2-4] with the asymptotes shown with Exclusions. Plot 1 below works, but Plot 2 doesn't show any asymptotes. Why is this? Plot 1 Plot[1/(x^2 - 4), {x, -10, 10}, Exclusions -> x^2 - 4 == 0, ExclusionsStyle -> Directive[Red, Dashed], ImageSize -> 600 ] Plot 2 Plot[1/Sqrt[x^2 - 4], {x, -10, 10}, Exclusions -> Sqrt[x^2 - 4] == 0, ExclusionsStyle -> Directive[Red, Dashed], ImageSize -> 600 ]
3 Replies
Sort By:
Posted 9 years ago
 I meant with Epilog, not with Exclusions.
Posted 9 years ago
 This trick for plotting the asymptotes only works when there is a jump discontinuity: the exclusion will show the jump. When the function goes to +infinity from both sides (or the functions only exists on one side) there is no jump to show. I am afraid we have to draw those asymptotes manually, with Exclusions for example. Plot[1/x, {x, -1, 1}, Exclusions -> x == 0, ExclusionsStyle -> Directive[Red, Thick]] Plot[1/x^2, {x, -1, 1}, Exclusions -> x == 0, ExclusionsStyle -> Directive[Red, Thick]] Plot[1/x^2, {x, -1, 1}, Epilog -> {Directive[Red, Thick, Dashed], InfiniteLine[{{0, 0}, {0, 1}}]}] 
Posted 9 years ago
 I understand. Thanks very much for the reply.