       Re: problems with DSolve

• To: mathgroup at smc.vnet.net
• Subject: [mg99428] Re: problems with DSolve
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Tue, 5 May 2009 06:01:52 -0400 (EDT)
• Organization: Uni Leipzig
• References: <gtnk4s\$3md\$1@smc.vnet.net>
• Reply-to: kuska at informatik.uni-leipzig.de

Hi,

may be that

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

will work too.

Plot[] hat the attribute HoldAll.

Regards
Jens

szymon.stoma at gmail.com wrote:
> 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 == 1, y
> == 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 == 1, y == 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: INCLUDE A LEGEND IN A GRAPHIC
• Next by Date: Re: why does DownValues not return all downvalues for a symbol?
• Previous by thread: Re: problems with DSolve
• Next by thread: Re: problems with DSolve