Re: Piecewise with ODE and constant
- To: mathgroup at smc.vnet.net
- Subject: [mg104862] Re: [mg104722] Piecewise with ODE and constant
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Thu, 12 Nov 2009 06:02:15 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200911081141.GAA24486@smc.vnet.net>
- Reply-to: murray at math.umass.edu
You don't have a differential equation (yet) in eq. Did you intend the equation to be: v'[t] (1/c) (i - v[t]/r) == 0 ? Becky wrote: > I have tried so many different ways to do this problem, that I am stuck. > Its like being back I school. > > I would like to plot my ODE which is a curve that goes starts at 10 msec and > ends at 100 msec). In the beginning there is no current delivered to the > cell until time equal 10 msec. Once the current probe in inserted to the > cell, I have a ODE, which is modeled as an RC circuit. When time equal 100 > msec, the current it turned off, and the curve should go back to the > original state. I have tried using If statements, Piecewise plots, and so > on, but I cannot get the curve to work with the initial and final conditions > of -70 mV. > > I would like to stay with solving the ODE using Dsolve, vs., NDSolve, if > that is ok. I cannot figure out my problem, I need help, please. > > Sincerely Yours > Prof. Jake > > eq=v'[t]*1/c *(i-v[t]/r) > > r=100 x 10^6;i=0.3 x 10^-9;c=100 x 10^-12; > > ans=DSolve[{eq,v[0]==0},v[t],t] > > p1=Plot[v[t]/.ans,{t,0,140 x 10^-3}] > > Plot[Piecewise[{{-70 x 10^-3,0*t*10 x 10^-3},{ans,10 x 10^-3*t*100 x 10^-3},{-70 x 10^-3,100 x 10^-3*t*140 x 10^-3}}],{t,0,140 x 10^-3}] > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Piecewise with ODE and constant
- From: "Becky" <noslowski@comcast.net>
- Piecewise with ODE and constant