1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do you plot nonhomogeous equations in Mathematica?

  1. Mar 31, 2009 #1
    NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]

    i attempted this, but it didn't work.
     
  2. jcsd
  3. Mar 31, 2009 #2
    Try this:

    Code (Text):

    sol1 = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}];
    Plot[y[x] /. sol1, {x, 0, 30}]
     
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How do you plot nonhomogeous equations in Mathematica?
Loading...