MathGroup Archive 2009

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

Search the Archive

Piecewise with ODE and constant

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104722] Piecewise with ODE and constant
  • From: "Becky" <noslowski at comcast.net>
  • Date: Sun, 8 Nov 2009 06:41:50 -0500 (EST)

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}]


  • Prev by Date: Re: Complex solutions to simple equations
  • Next by Date: Re: What is going on!?!
  • Previous by thread: Re: Re: Simplification problem
  • Next by thread: Re: Piecewise with ODE and constant