Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
Skin = 1;
ET = 0.3;
φ = 0.1;
ω = 10^-6;
τ = 0;
Cd = 100;

PD[s_] = (BesselK[0, Sqrt[s]] + Sqrt[s] BesselK[1, Sqrt[s]] 
         {Skin - (ET φ I ω Exp[s I ω τ])/(s - I ω)})/(Cd s^2 (BesselK[0, Sqrt[s]] + 
             Skin Sqrt[s] BesselK[1, Sqrt[s]]) + s Sqrt[s] BesselK[1, Sqrt[s]]); 

tmax = 25000000;
T = 4*tmax;
e = 10^-8;
a = -(Log[e]/(2 T));

ad[tmax_, alpha_, tol_] := ad[tmax, alpha, tol] = 
   alpha - Log[tol]/(8 tmax) // N

cd[PD_, s_, tmax_, alpha_, tol, k_] := PD /. s -> ad[tmax, alpha, tol] +
        I Pi k/(4 tmax) // N

sd[F_, s_, t_, j_, tmax_, alpha_: 0, tol_: 0.00000001] := 
               Inv[PD, s, t, j, tmax, alpha, tol] = 
       Exp[ad[tmax, alpha, tol] t]/(4 tmax) * Sum[Re[cd[PD, s, tmax, alpha, tol, k]] 
       Cos[k Pi t/(4 tmax)] - Im[cd[PD, s, tmax, alpha, tol, k]] Sin[k Pi t/(4 tmax)], 
       {k, 0, j}] // N

LogLogPlot[{PD[y], y*PD'[y]}, {y, 10, 1000000000}, 
           PlotRange -> {0.01, 100}, PlotStyle -> {{Black}, {Dashed, Blue}}, 
           Frame -> True, FrameLabel -> {"tD", "PD e tD*PD'"}, 
           BaseStyle -> {FontSize -> 12}]`

I'm trying to invert an equation in the Laplace domain using Stehfest algorithm. It works very fine, but since I'm trying to represent a sinusoidal behaviour I need a different algorithm that makes use of the Fourier Series. Does anyone have experience in programming such algorithms? Here, I'm trying to use Durbin-Crump Method, but no success so far...

share|improve this question
Please, include a working example /code snippet/, so the users may actually contribute :) –  Sektor Aug 22 '13 at 13:49
Why do you put [] around names of your variables? like this [CurlyPhi] = 0.1; [Omega] = 10^-6 did you read that somewhere in the documentation? ALso it is bad idea to use UpperCaseFirstLetterForYourVariablesAndSymbols since this can conflict with Mathematca's own and also can be confusing to the reader. lowerCaseFirstLetterWillWorkJustAsWell –  Nasser Dec 9 '13 at 14:12
Nasser, since it worked fine with Sthefest Algorith I assumed it would work as well for the Durbin-Crump Algorithm... I dindt see a reason for an error... –  Bruno Rangel Dec 9 '13 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.