Group Abstract Group Abstract

Message Boards Message Boards

0
|
22.5K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Plotting x and y asymptotes of a rational function

Posted 11 years ago

Hello,

I've been trying to plot this rational function and illustrate the asymptotes of it, but I don't know how to get both the asymptotes plotted in together with the function.

f(x_):=(3x-1)/(2x+6)

The plot I am trying to make in Mathematica

POSTED BY: Torjus Iveland
2 Replies

You get a graph like that with

f[x_] := (3 x - 1)/(2 x + 6);
Plot[{f[x], 3/2}, {x, -11, 7}, Exclusions -> {x == -3}, 
 ExclusionsStyle -> Red, PlotStyle -> {Black, Red}, PlotRange -> 10, 
 AspectRatio -> Automatic]

You can insert the labels with Epilog:

f[x_] := (3 x - 1)/(2 x + 6);
Plot[{f[x], 3/2}, {x, -11, 7}, Exclusions -> {x == -3}, 
 ExclusionsStyle -> Red, PlotStyle -> {Black, Red}, PlotRange -> 10, 
 AspectRatio -> Automatic, 
 Epilog -> {Text[x == -3, {-5, -8}], Text[y == 1.5, {5, 2}]}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard