Re: What am I doing wrong with this code?

*To*: mathgroup at smc.vnet.net*Subject*: [mg82545] Re: [mg82519] What am I doing wrong with this code?*From*: DrMajorBob <drmajorbob at bigfoot.com>*Date*: Wed, 24 Oct 2007 04:28:19 -0400 (EDT)*References*: <14846561.1193151252112.JavaMail.root@m35>*Reply-to*: drmajorbob at bigfoot.com

It plots just fine at this machine (WinXP, Mathematica 6.0.1). IIRC, v5.2 would complain about complex numbers arising from the second function for y > 1. If that's the problem, you can split it in two plots and Show the results, something like this: Show[Plot[1/(1 + y^2), {y, 0, 5}], Plot[Sqrt[-1 + 1/y], {y, 0, 1}]] or perhaps Clear[f] f[y_] /; y <= 1 := Sqrt[-1 + 1/y] f[y_] = 0; Plot[{1/(1 + y^2), f@y}, {y, 0, 5}] Bobby On Tue, 23 Oct 2007 04:32:30 -0500, sean_incali <sean_incali at yahoo.com> wrote: > I think I'm having a brain fart. Seriously... > > Plot[{1/(1 + y^2), (1/y - 1)^(1/2)}, {y, 0, 5}] > > What is wrong with that code? Maybe it's not solvable in mathematica? > > I'm trying to plot nullclines of a system of ODEs. and those function > up there are them. I just can't get mathematica to plot them in the > same graph. > > I get an error message saying... > >> From In[22]:= > (1/y - 1)^(1/2) is not a machine-size real number at y = > 1.0000001666666667`. > > Any help is appreciated. > > sean > > > -- DrMajorBob at bigfoot.com