NDSolve and DiracDelta
- To: mathgroup@smc.vnet.net
- Subject: [mg11158] NDSolve and DiracDelta
- From: Torben Hansen <torhans@image.dk>
- Date: Mon, 23 Feb 1998 21:41:17 -0500
- Organization: UNI-C
Hi I'm trying to solve a differential equation involving DeltaDirac functions. I'm using NDSolve but it produces a wrong solution. I have tried to change the AccuracyGoal and Method option but it does not help. How can I solve this problem. These are my codings: In[1]:=<<Calculus`DiracDelta` In[2]:=FormX[s_]:=-DiracDelta[s-a/2]+DiracDelta[s-b-a/2]-DiracDelta[s-b-3 a/2]+ DiracDelta[s-2 b-3 a/2] In[3]:=a=1 Out[3]=1 In[4]:=b=2 Out[4]=2 In[6]:=NDSolve[{x''[s]==FormX[s],x[0]==0,x'[0]==1},x,{s,0,6}] Out[6]={{x -> InterpolatingFunction[{{0, 6.}}, <>]}} In[7]=Plot[x[s] /. %,{s,0,6}] 'Is producing a straight line, should by a piecewice lineary function Please reply to c958038@student.dtu.dk or torhans@image.dk