2
|
2637 Views
|
15 Replies
|
10 Total Likes
View groups...
Share
Share this post:
GROUPS:

# Question on the Laplace Inversion of a function using Mathematica

Posted 5 months ago
 I need to find the following inverse Laplace transform: $$q(t)=\mathcal L^{-1} \left [\frac{12 e^{24 s} (1 - e^{168 s} + 168 e^{180 s} s)}{ e^{12 s} + e^{168 s} - e^{180 s} + 2016 e^{204 s} s^2-1} \right ](t),$$ 12 e^(24 s)(1 - e^(168 s) + 168 e^(180 s) s))/(-1 + e^(12 s) + e^(168 s) - e^(180 s) + 2016 e^(204 s) s^2) obtained as the solution of a convolution Volterra integral equation; see here for more details. What I know about the inverse function is that q(t)=1, \, $0 15 Replies Sort By: Posted 5 months ago  I have verified the GWR package many times. You should run it yourself, otherwise you will not get any experience with it. One thing that worries me, regarding your transform, is that due to the presence of exponential terms it can be rather sensitive to variations of s. There is also a subtraction of exponential terms, which for large s (corresponding to small t) can possibly cause a considerable loss of significant digits. It may be necessary to do some rearrangements of your transform, if you need accurate results, but I have no concrete suggestions how to rearrange. Leslaw Posted 5 months ago  I have used GWR for many years, with very good results. This is the illusttration how to use it: (*http://library.wolfram.com/infocenter/MathSource/4738/*)GWR[F_,t_,M_: 32,precin_: 0]:=Module[{M1,G0,Gm,Gp,best,expr,Ï„=Log[2]/t,Fi,broken,prec},If[precin<=0,prec=21 M/10,prec=precin]; If[prec<=$MachinePrecision,prec=$MachinePrecision]; broken=False; If[Precision[Ï„] Posted 5 months ago  Thank you so much Leslwa for the input! You may see that the formula is12 e^(24 s)(1 - e^(168 s) + 168 e^(180 s) s))/(-1 + e^(12 s) + e^(168 s) - e^(180 s) + 2016 e^(204 s) s^2)Could you check the result in this case?Do you think this package developed by Peter ValkÃ³ provides more accurate results compared to those used in other replies. Have you ever checked it? Posted 5 months ago  Which method is the best (you already used Durbin)? This is a difficult question and I have no competence and I am not an expert in this field.In my humble opinion, it depends on the given function what method is the best.You just have to experiment yourself.See attached file. Attachments: Posted 5 months ago  Mariusz Thanks a ton! I am still struggling to run the code in a notebook in ww.wolframcloud.com, but I have been unsuccessful. The following can be compiled (while I could not plot f[t_]) f[t_] = InverseLaplaceTransform[(12 E^(24 s) (1 - E^(168 s) + 168 E^(180 s) s))/ (-1 + E^(12 s) + E^(168 s) - E^(180 s) + 2016 E^(204 s) s^2), s, t]. However, I am getting the error "No Wolfram Language translation found" with your code (I guess I should work in another environment and sorry if I do not have sufficient experience on working with Wolfram environments and Mathematica). To make sure that the output is correct, could you please provide a figure of$p(t)=1-q(t)$over t= 1 to 1500 (at time 1, 2, 3, ...., 400, and 450, 500, ..., 1500) using "Weeks" method (which seems to be one of most stable methods)? I guess the function have significant fluctuations before 400 ($p(t)=0$for$0
Posted 5 months ago
 See attached file. Attachments:
Posted 5 months ago
 Wow! A nice comparison between Weeks method and GWR package. Thank you! Could you kindly also include the plot of $1-q(t)$ in the file as I already can see the file in Wolfram cloud, but cannot run it there.
Posted 5 months ago
 See attached file. Attachments:
Posted 5 months ago
 Thanks! I just updated my answer here. You may check it.
Posted 5 months ago
 I had copied and pasted from your second line. Now it's better: f[t_] = InverseLaplaceTransform[(12 E^(24 s) (1 - E^(168 s) + 168 E^(180 s) s))/ (-1 + E^(12 s) + E^(168 s) - E^(180 s) + 2016 E^(204 s) s^2), s, t]; {f[1.], f[10.], f[1000.], 16/19.} {1., 0.999996, 0.842102, 0.842105} 
Posted 5 months ago
 I appreciate it Gianluca!
Posted 5 months ago
 I am no expert on Laplace transforms, I just tried out the built-in commands of Mathematica: f[t_] = InverseLaplaceTransform[(12 (1 - E^(168 s) + 168 E^(180 s) s))/(-1 + E^(12 s) + E^(168 s) - E^(180 s) + 2016 E^(204 s) s^2), s, t] gives no closed-form output. I tried numerical values: In[1986]:= {f[1.], f[10.], f[1000.], 16/19.} Out[1986]= {1.27295*10^-111, -1.82483*10^-10, 0.8421, 0.842105} which partially agree with what you know.
Posted 5 months ago
 Gianluca thank you so much for your reply! The error for $t \le 25$ is very high, but for t>25, the inverse seems reasonable. For $0 Posted 5 months ago  If I compute first term of asymptotic I have:$\theta (t-24)$and looks like for: 0 24 is 1.  func = (12 (1 - E^(168 s) + 168 E^(180 s) s))/(-1 + E^(12 s) + E^( 168 s) - E^(180 s) + 2016 E^(204 s) s^2); g[t_] := InverseLaplaceTransform[func, s, N@t, Method -> "Durbin"]; f = InverseLaplaceTransform[Asymptotic[func, {s, Infinity, 1}], s, t] Show[{Plot[f, {t, 0, 50}, PlotStyle -> Red], ListLinePlot[Table[{t, g[t]}, {t, 1/10, 100, 1/3}]] // Quiet}, PlotRange -> All] `Plot looks correct to me.Regards M.I Posted 5 months ago  Thank you so much Mariuz! I think you and Gianluca ignored$e^{24 s}\$ in the numerator. Could you please make sure you have used the function given in OP, and see what will happen next? It is also given here. Which method is the best (you already used Durbin)?
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments