Sat Jun 14 13:54:48 MDT 1997 euler% math Mathematica 3.0 for Solaris Copyright 1988-96 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= In[2]:= In[3]:= (* ----------[ M a t h e m a t i c a ]---------- *) 0. Second In[4]:= (* ---------- Initialization ---------- *) 0. Second In[5]:= (* ---------- Transforms ---------- *) 0. Second In[6]:= (* Laplace and inverse Laplace transforms *) 0. Second In[7]:= << Calculus`LaplaceTransform` 2.04 Second In[8]:= (* => s/[s^2 + (w - 1)^2] (Re s > |Im(w - 1)|) [Gradshteyn and Ryzhik 17.13(33)] *) 0. Second In[9]:= LaplaceTransform[Cos[(w - 1)*t], t, s] 0.01 Second s Out[9]= -------------- 2 2 s + (-1 + w) In[10]:= InverseLaplaceTransform[%, s, t] 0.04 Second Out[10]= Cos[t (-1 + w)] In[11]:= (* => w/(s^2 - 4 w^2) (Re s > |Re w|) [Gradshteyn and Ryzhik\ > 17.13(84)] *) 0. Second In[12]:= LaplaceTransform[Sinh[w*t]*Cosh[w*t], t, s] 0.07 Second s - w s + w ------------- - -------------- 2 2 2 2 (s - w) - w -w + (s + w) Out[12]= ------------------------------ 2 In[13]:= Simplify[%] 0.04 Second w Out[13]= --------- 2 2 s - 4 w In[14]:= (* e^(-6 sqrt(s))/s (Re s > 0) [Gradshteyn and Ryzhik\ > 17.13(102)] *) 0. Second In[15]:= LaplaceTransform[Erf[3/Sqrt[t]], t, s] 0.02 Second 3 Out[15]= LaplaceTransform[Erf[-------], t, s] Sqrt[t] In[16]:= (* Solve y'' + y = 4 [H(t - 1) - H(t - 2)], y(0) = 1, y'(0) = 0\ > where H is the Heaviside (unit step) function (the RHS describes a pulse of magnitude 4\ > and duration 1). See David A. Sanchez, Richard C. Allen, Jr. and Walter T. Kyner, _Differential Equations: An Introduction_, Addison-Wesley\ > Publishing Company, 1983, p. 211. First, take the Laplace transform of the ODE => s^2 Y(s) - s + Y(s) = 4/s [e^(-s) - e^(-2 s)] where Y(s) is the Laplace transform of y(t) *) 0. Second In[17]:= << Calculus`DiracDelta` 0.48 Second In[18]:= LaplaceTransform[y''[t] + y[t] == 4*(UnitStep[t - 1] - UnitStep[t -\ > 2]), t, s] 0.24 Second 2 Out[18]= LaplaceTransform[y[t], t, s] + s LaplaceTransform[y[t], t, s] - 1 1 > s y[0] - y'[0] == 4 (-(------) + ----) 2 s s E s E s In[19]:= % /. {y[0] -> 1, y'[0] -> 0} 0. Second Out[19]= -s + LaplaceTransform[y[t], t, s] + 2 1 1 > s LaplaceTransform[y[t], t, s] == 4 (-(------) + ----) 2 s s E s E s In[20]:= ( (* Now, solve for Y(s) and then take the inverse Laplace transform => Y(s) = s/(s^2 + 1) + 4 [1/s - s/(s^2 + 1)] [e^(-s) - e^(-2 s)] => y(t) = cos t + 4 {[1 - cos(t - 1)] H(t - 1) - [1 - cos(t - 2)] H(t -\ > 2)} *) Solve[%, LaplaceTransform[y[t], t, s]] ) 0.05 Second s 2 s 2 -4 + 4 E + E s Out[20]= {{LaplaceTransform[y[t], t, s] -> -------------------}} 2 s 2 E s (1 + s ) In[21]:= Map[InverseLaplaceTransform[#, s, t] &, %[[1, 1]]] 0.54 Second Out[21]= y[t] -> > Cos[t] - 4 (1 - Cos[2 - t]) UnitStep[-2 + t] + > 4 (1 - Cos[1 - t]) UnitStep[-1 + t] In[22]:= (* What is the Laplace transform of an infinite square wave? => 1/s + 2 sum( (-1)^n e^(- s n a)/s, n = 1..infinity ) [Sanchez, Allen and Kyner, p. 213] *) 0. Second In[23]:= LaplaceTransform[1 + 2*Sum[(-1)^n*UnitStep[t - n*a], {n, 1,\ > Infinity}], t, s] 0.12 Second 1 n Out[23]= - + 2 LaplaceTransform[Sum[(-1) UnitStep[t - n a], s > {n, 1, Infinity}], t, s] In[24]:= (* Fourier transforms => sqrt(2 pi) delta(z) [Gradshteyn and\ > Ryzhik 17.23(1)] *) 0. Second In[25]:= << Calculus`FourierTransform` 1.89 Second In[26]:= FourierTransform[1, x, z] 0.11 Second Out[26]= 2 Pi DiracDelta[z] In[27]:= (* => e^(-z^2/36) / [3 sqrt(2)] [Gradshteyn and Ryzhik 17.23(13)]\ > *) 0. Second In[28]:= FourierTransform[Exp[-9*x^2], x, z] 0.04 Second Sqrt[Pi] Out[28]= -------- 2 z /36 3 E In[29]:= (* => sqrt(2 / pi) (9 - z^2)/(9 + z^2)^2 [Gradshteyn and Ryzhik\ > 17.23(11)] *) 0. Second In[30]:= FourierTransform[Abs[x]*Exp[-3*Abs[x]], x, z] 0.23 Second 2 18 - 2 z Out[30]= --------- 2 2 (9 + z ) In[31]:= (* Mellin transforms => pi cot(pi s) (0 < Re s < 1) [Gradshteyn and Ryzhik 17.43(5)] *) 0. Second In[32]:= MellinTransform[f_, x_, s_]:= Integrate[f * x^(s - 1), {x, 0, Infinity}, Assumptions -> 0 < s < 1, PrincipalValue -> True] 0. Second In[33]:= MellinTransform[1/(1 - x), x, s] 0.92 Second Out[33]= Pi Cot[Pi s] In[34]:= (* => 2^(s - 4) gamma(s/2)/gamma(4 - s/2) (0 < Re s < 1) [Gradshteyn and Ryzhik 17.43(16)] *) 0. Second In[35]:= MellinTransform[BesselJ[3, x]/x^3, x, s] 0.59 Second -4 + s s 2 Gamma[-] 2 Out[35]= ---------------- s Gamma[4 - -] 2 In[36]:= (* Z transforms. See _CRC Standard Mathematical Tables_,\ > Twenty-first Edition, The Chemical Rubber Company, 1973, p. 518. Z[H(t - m T)] => z/[z^m (z - 1)] (H is the Heaviside (unit step)\ > function) *) 0. Second In[37]:= << Calculus`DiracDelta` 0.49 Second In[38]:= UnitStep[t - 3] 0. Second Out[38]= UnitStep[-3 + t] In[39]:= UnitStep[t - m] 0.01 Second Out[39]= UnitStep[-m + t] In[40]:= (* ---------- Quit ---------- *) 0. Second In[41]:= Quit[] real 9.43 user 8.65 sys 0.45