Re: silly newbie questions
- To: mathgroup at smc.vnet.net
- Subject: [mg34477] Re: silly newbie questions
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Thu, 23 May 2002 03:32:18 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Tom: >(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? You can express S[t] as S (UnitStep[t-t1]-UnitStep[t-t2]) where UnitStep is the Heaviside step function. You can then solve the differential equation, eqn = A'[t] == S (UnitStep[t-t1]-UnitStep[t-t2]) - (Log[2]/hl) A[t] for A directly using DSolve: sol = DSolve[eqn, A, t] In general, it is better to solve for A rather than for A[t] since the result, a pure function, is more "useful". You can obtain the solution under different conditions using FullSimplify. For example, with 0<t1<t2<t enter FullSimplify[A[t] /. First[sol], 0<t1<t2<t] >(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? This does not make sense to me. You can take the LaplaceTransform of the original equation by mapping the operator over both sides of the differential equation: lt = LaplaceTransform[#,t,s]& /@ eqn and then solve for the LaplaceTransform of A[t] as follows: Simplify[Solve[lt, LaplaceTransform[A[t], t, s]]] Cheers, Paul