Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Piecewise with ODE and constant
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Becky  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 12:04
Newsgroups: comp.soft-sys.math.mathematica
From: "Becky" <noslow...@comcast.net>
Date: Sun, 8 Nov 2009 12:04:42 +0000 (UTC)
Local: Sun 8 Nov 2009 12:04
Subject: Piecewise with ODE and constant
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}]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sean  
View profile   Translate to Translated (View Original)
 More options 9 Nov, 10:55
Newsgroups: comp.soft-sys.math.mathematica
From: sean <sean_inc...@yahoo.com>
Date: Mon, 9 Nov 2009 10:55:16 +0000 (UTC)
Local: Mon 9 Nov 2009 10:55
Subject: Re: Piecewise with ODE and constant

>  eq=v'[t]*1/c *(i-v[t]/r)

This is not an equation. DSolve requires an equation.
v[t]==v[t] for instance.

>  r=100 x 10^6;i=0.3 x 10^-9;c=100 x 10^-12;

x is not multiplication. * is used instead. So r= 100*10^6

>  ans=DSolve[{eq,v[0]==0},v[t],t]

>  p1=Plot[v[t]/.ans,{t,0,140 x 10^-3}]

Again x is not multiplication. 140*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}]

I'm not sure what you want above. If you want to define an ode
piecewise then you have to define is like this. But what yousaid you
want is i0[t_]:= i0[t]/; 10 <= t <= 100;

i0[t_] := 0/; t < 0;
i0[t_] := 0/; 0 <= t <= 10;
i0[t_] := 1/; 10 <= t <= 100;
deqn = i0[t] == v[t]/r + c v'[t];

NDSolve will solve that.

On Nov 8, 4:04 am, "Becky" <noslow...@comcast.net> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Murray Eisenberg  
View profile   Translate to Translated (View Original)
 More options 12 Nov, 11:02
Newsgroups: comp.soft-sys.math.mathematica
From: Murray Eisenberg <mur...@math.umass.edu>
Date: Thu, 12 Nov 2009 11:02:48 +0000 (UTC)
Local: Thurs 12 Nov 2009 11:02
Subject: Re: Piecewise with ODE and constant
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

?

--
Murray Eisenberg                     mur...@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

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google