Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
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

put on hold as off-topic by MarcoB, m_goldberg, Louis, Michael E2, ubpdqn Jun 21 at 8:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – MarcoB, Louis
If this question can be reworded to fit the rules in the help center, please edit the 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
Sthefest algorithm has problems with trigonometric and exponential functions, you con use the Peter Valko program in mathematica. You can find de program on line on Peter Valko's web of Texas A&M University – user30634 Jul 7 '15 at 12:13
I'm voting to close this question as off-topic because it is too localized; i.e, it applies only to the local situation and needs of its poster and answers will not benefit others. – m_goldberg Jun 21 at 0:57