|
[Date Index]
[Thread Index]
[Author Index]
NDSolve and DiracDelta
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
Prev by Date:
Re: Mathematica frustrations...
Next by Date:
Looking for info on making recursions eat less stack.
Prev by thread:
A Difficult Optimization Problem !
Next by thread:
Looking for info on making recursions eat less stack.
|