RE: Re: Plot using DSolve HELP
- To: mathgroup at smc.vnet.net
- Subject: [mg104485] RE: [mg104412] Re: Plot using DSolve HELP
- From: "Becky" <noslowski at comcast.net>
- Date: Sun, 1 Nov 2009 17:54:45 -0500 (EST)
- References: <hce3uu$r15$1@smc.vnet.net> <200910310649.BAA13050@smc.vnet.net>
I just want to thank those that have helped me with my problem. You were right, I was missing " == ". Once I fixed it, the problem worked out fine. Thanks Jake -----Original Message----- From: Peter Breitfeld [mailto:phbrf at t-online.de] Sent: Saturday, October 31, 2009 2:50 AM To: mathgroup at smc.vnet.net Subject: [mg104485] [mg104412] Re: Plot using DSolve HELP "Becky" 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. > p1=Plot[sol,{t,-20,140}] > > 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? I don't get your result. First, eq is not an equation, maybe you meant eq1= i* v[t]/r+c v'[t]==0 If you set i->0, eq reduces to v[t]==const, so v[t]=v[0]=-70 The general solution is DSolve[{eq1,v[0]==-70},v[t],t] Out= {-70 Exp[-i t/(c r)]} -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de