Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: NDSolve Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86384] Re: NDSolve Question
  • From: "jwmerrill at gmail.com" <jwmerrill at gmail.com>
  • Date: Mon, 10 Mar 2008 02:02:29 -0500 (EST)
  • References: <fqtqmp$d82$1@smc.vnet.net> <fr0ckv$ctm$1@smc.vnet.net>

On Mar 9, 6:03 am, Jerry <Jer75... at yahoo.com> wrote:
> Sir, I tried this and I only get plot axes, no graph.
>
> f[q_?NumberQ] := q
> sol = NDSolve[{x'[t] == f[x[t]], x[0] == 0}, {x}, {t, 0, 1}]
> Plot[x[t] /. sol, {t, 0, 1}]

Try using an initial condition such that your function isn't always
0 ;-).  In other words, 0*exp[t] == 0.

f[q_?NumberQ] := q
sol = NDSolve[{x'[t] == f[x[t]], x[0] == 1}, {x}, {t, 0, 1}]
Plot[x[t] /. sol, {t, 0, 1}]

> In place of {x} in sol I tried x and x[t] with no change.
> In Plot I tried x instead of x[t], no help.

I think any of these will work, actually.

JM



  • Prev by Date: Mathematica logic capabilities
  • Next by Date: Re: Re: Re: changing style of vertices for ShowGraph
  • Previous by thread: Re: NDSolve Question
  • Next by thread: Re: Re: NDSolve Question