MathGroup Archive 2009

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

Search the Archive

Re: Plot using DSolve HELP

  • To: mathgroup at
  • Subject: [mg104418] Re: [mg104388] Plot using DSolve HELP
  • From: Bob Hanlon <hanlonr at>
  • Date: Sat, 31 Oct 2009 01:50:51 -0500 (EST)
  • Reply-to: hanlonr at

Your eq is not an equation, it is an expression. I don't know how you got a result from DSolve

eq = i*v[t]/r + c v'[t] == -2/5;

Use exact numbers with DSolve

sol[t_] = v[t] /. DSolve[{eq /. {c -> 3, i -> 0, r -> 5/2},
     v[0] == -70}, v[t], t][[1]]

-(2/15) (t+525)

Plot[sol[t], {t, -20, 140}]

Bob Hanlon

---- Becky <noslowski at> wrote: 

I have a problem with what I am showing below.

Step one is my equation.
eq = i * v[t]/r +c v'[t]

Step two I want to solve it, using DSolve, and put my values in as shown.
Please note, that "i= 0", and my IC is v[0]== -70.

sol=v[t]/.DSolve[{eq/.{c->3, i->0, r->2.5} ,v[0]==-70}, v[t], t]
 {-70 *-0.133333 t}
The results are shown above.

Thus next step is to plot it.

My problem is that I get a line from -70 on the vertical axis going in a
curve up to the horizontal axis out to 140.  The vertical axis is "v" and
the horizontal is "t".

What am I doing wrong?


  • Prev by Date: Re: Plot using DSolve HELP
  • Next by Date: Re: ToExpression[..,TexForm] does not seem to work on
  • Previous by thread: Re: Plot using DSolve HELP
  • Next by thread: Re: Plot using DSolve HELP