MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question about how to graph the vector field for the differential

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97856] Re: Question about how to graph the vector field for the differential
  • From: Erik Max Francis <max at alcyone.com>
  • Date: Tue, 24 Mar 2009 05:29:18 -0500 (EST)
  • References: <gq7j9f$qeo$1@smc.vnet.net>

jo1e984 at gmail.com wrote:
> i need to graph the vector field and the family of solutions for the
> DE: dy/dx=2x-y
> and i tried the graph the vector field, but while i tried to use the
> VectorFieldPlot it show up some kind of wierd graph...
> and i cannot even get start on the "family of Solutions"
> graph...searched online but still cannot figure out.
> hope some pros can help me out on this...thx alot~!!

It's not clear what you're trying to accomplish.  Your differential 
equation involves one function, y(x), and one independent variable, x. 
This isn't a vector at all.  Written into Mathematica-speak:

In[1]:= sol = DSolve[y'[x] == 2 x - y[x], y[x], x]

Out[1]= {{y[x] -> 2 (-1 + x) + E^-x C[1]}}

If you want to plot this, pull out the solution and play with it (%1 /. 
sol[[1]]).  If you want to graph it, just use Plot, but you'll have to 
specify a value of the constant of integration C[1].

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
   The only completely consistent people are the dead.
    -- Aldous Huxley


  • Prev by Date: Re: Question about how to graph the vector field for the differential
  • Next by Date: Histograms and Iterators - Beginner Question
  • Previous by thread: Re: Question about how to graph the vector field for the differential
  • Next by thread: Re: Question about how to graph the vector field for the differential