Re: Not Plotting Vertical Assymptotes
- To: mathgroup at smc.vnet.net
- Subject: [mg18594] Re: [mg18542] Not Plotting Vertical Assymptotes
- From: BobHanlon at aol.com
- Date: Tue, 13 Jul 1999 01:01:27 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Patrick, The solution is just to generate separate plots for each region. f[x_] := 1/(1 - x); pole = x /. Solve[1/f[x] == 0, x][[1]]; plt1 = Plot[f[x], {x, 0, pole}, DisplayFunction -> Identity]; plt2 = Plot[f[x], {x, pole, 2}, DisplayFunction -> Identity]; Show[{plt1, plt2}, DisplayFunction -> $DisplayFunction]; g[x_] := 1/((.75 - x)(1 - x)(1.25 - x)); pole = x /. Solve[1/g[x] == 0, x]; rng = Prepend[ #, x] & /@ Partition[Append[Prepend[pole, 0], 2], 2, 1]; Show[Plot[g[x], #, DisplayFunction -> Identity, PlotRange -> {-750, 750}] & /@ rng, DisplayFunction -> $DisplayFunction]; Bob Hanlon In a message dated 7/10/99 8:12:14 AM, p_mclean at postoffice.utas.edu.au writes: >Anyone have any idea how to stop Plot putting a (near) vertical line at >x=2 in the command: > > Plot[1/(1-x),{x,0,2}] > >ie. detect that the function 1/(1-x) has a singularity at x=2 and do >something about it. This is analagous to numerically integrating over a >(integrable) singularity, where the following remedy works: > > NIntegrate[1/Abs[Sqrt[x-1]]^2,{x,0,1,2}] > >But in this case it doesn't work. Decreasing MaxBend works a bit but the >line is still there. > >(I am really interested in drawing paths in the plane using ParmetricPlot) > >Any ideas or comments >