MathGroup Archive 2002

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

Search the Archive

RE: silly newbie questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34403] RE: [mg34385] silly newbie questions
  • From: "Curt Fischer" <cfisher at bio.titech.ac.jp>
  • Date: Sat, 18 May 2002 03:51:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Tom:


>-----Original Message-----
>From: theiman [mailto:heimantj at celera.com]
To: mathgroup at smc.vnet.net
>Sent: Friday, May 17, 2002 19:31
>Subject: [mg34403] [mg34385] silly newbie questions
>
>Hi,
>
>I have two questions:
>
>(1)  I have an equation:
>
>          eqn = A'[t] = S - (ln(2)/hl)*A[t]
>
>and I am trying to find the time at which the discontinuity
>occurs (t1
>and t2) and I have sampled at time t.  The constraints for the
>system
>are:
>
> S(t)=S if t1<t<t2
> S(t)=0 otherwise
>
>The question is: How do I use these constraints with Dsolve?
----------------------------

This should get you started:

In[1]:=
<<Calculus`DiracDelta`

In[2]:=
s[t_]:=ss (UnitStep[t-t1]-UnitStep[t-t2])

In[3]:=
eqn=a'[t]==s[t]-Log[2/h1] a[t]
Out[3]=<stuff>

In[4]:=
DSolve[{eqn,a[0]=a0},a[t],t]
Out[4]=<stuff>

The first line loads the package that lets you use the UnitStep fuction.
This is one way to represent piecewise functions in Mathematica.

The second line defines s[t] as a function of t--which is important
because in a later DSolve statement we will want to preserve that
functional dependence.  The third line is your equation.  Note the
double equals "==" to represent a test for equality as opposed to the
assignment operator "=" the single equals.  The fourth line calls DSolve
and generates a solution for a[t] in terms of t1 and t2, ss, and h1.  I
also included an initial condition.  It sounds like at this point you
will want to fit the function Mathematica gives you in Out[4] to your
sampled data for t?  Check the help browser for the built-in function
Fit[ ] or for the add-on package Statistics`NonlinearFit`.  If you want
to use Laplace transforms look in the help browser under
Calculus`LaplaceTransform`.

Hope that helps.

Regards,
Curt Fischer
Tokyo Institute of Technology
Dept. of Bioengineering













>
>(2) After I find the solution to the equation in question 1 I
>would
>like to take the laplace transform of the equation (and since it
>is a
>step function I need to use the heaviside (formula/equation?))
>and
>solve the result.  Any ideas on how to do this?
>
>I would really appreciate any help or suggestions!!!!
>
>Thankyou!!
>
>Sincerely,
>
>Tom
>





  • Prev by Date: Re: RE: Re: ValueQ
  • Next by Date: RE: silly newbie questions
  • Previous by thread: silly newbie questions
  • Next by thread: RE: silly newbie questions