MathGroup Archive 2009

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

Search the Archive

problems with DSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99375] problems with DSolve
  • From: szymon.stoma at gmail.com
  • Date: Mon, 4 May 2009 06:00:40 -0400 (EDT)

hello,

i am new to mathematica, therefore sorry if my question is trivial. I
would like to understand why the following line does not work:

Plot[(x[t] /. DSolve[{x'[t] == y[t], y'[t] == -x[t], x[0] == 1, y[0]
== 2}, {x, y}, t]), {t, 0, 5}]

whereas after splitting into two lines it works:
sol = DSolve[{x'[t] == y[t], y'[t] == -x[t], x[0] == 1, y[0] == 2},
{x, y}, t]
Plot[(x[t] /. sol), {t, 0, 5}]

i would like to use Manipulate to play with boundary conditions, so
the first notation would be highly useful.

thanks a lot for any feedback.


  • Prev by Date: Re: Defining function with indexed variables
  • Next by Date: atoi equivalents?
  • Previous by thread: Re: Bug with Hypergeometric2F1?
  • Next by thread: Re: problems with DSolve