RE: Inverse/LaplaceTransform inconsistency?
- To: mathgroup at smc.vnet.net
- Subject: [mg35192] RE: [mg35180] Inverse/LaplaceTransform inconsistency?
- From: "DrBob" <majort at cox-internet.com>
- Date: Sat, 29 Jun 2002 01:37:52 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
It looks like a problem to ME:
f[x_] = mf(UnitStep[x] - UnitStep[x - a]);
g[x_] = mg(UnitStep[x - (c - b/2)] - UnitStep[x - (c + b/2)]);
tff = LaplaceTransform[f[x], x, s];
tfg = LaplaceTransform[g[x], x, s];
Simplify[Apart[tff*tfg] == tff*tfg]
h = InverseLaplaceTransform[tff*tfg, s, x];
j = InverseLaplaceTransform[Apart[tff*tfg], s, x];
pos = {a > 0, b > 0, c > 0};
diff = FullSimplify[h - j, pos];
True
The difference simplifies in various cases as follows:
FullSimplify[diff, pos~Join~#] & /@ {{x >= c + b/2}, {x < c - b/2}}
{b mf mg, 0}
FullSimplify[diff /. x -> c - b/2, pos]
0
FullSimplify[diff, pos~Join~#] & /@ {{c - b/2 < x < c + b/2}}
{(1/2)*mf*mg*(b - 2*c + 2*x)}
So the two answers are equivalent ONLY when x <= c - b/2.
Simplify is completely ignorant about UnitStep, and FullSimplify isn't
much better.
Bobby Treat
-----Original Message-----
From: Michael Chang [mailto:michael_chang86 at hotmail.com]
To: mathgroup at smc.vnet.net
Subject: [mg35192] [mg35180] Inverse/LaplaceTransform inconsistency?
Hi everyone!
While running Mathematica 4.1 on WindozeXP, I've run across what
appears to be an inconsistency when using LaplaceTransform and
InverseLaplaceTransform on a very simple example.
I defined two square waves f[x] and g[x] as
In[1]:= f[x_]=mf(UnitStep[x]-UnitStep[x-a]);
In[2]:= g[x_]=mg(UnitStep[x-(c-b/2)]-UnitStep[x-(c+b/2)]);
The respective square waves are supposed to be centered about a/2 and
c, with widths of a and b, and magnitudes of mf and mg. Since I'll be
using LaplaceTransform, for simplicity, one can assume that
a,b,c,mf,mg are all >0.
Anyways, since I want to convolve these two (simple) functions, I've
decided to calculate the expressions
In[3]:= tff=LaplaceTransform[f[x],x,s]
In[4]:= tfg=LaplaceTransform[g[x],x,s]
which indeed yield correct results. In addition, the expression
returned by
In[5]:= soln1[x_]=InverseLaplaceTransform[tff*tfg,s,x]
is correct. (For a simple check, I tried
{a->1,b->2,c->10,mf->1,mg->1}, and verified graphically that my plot
was indeed a trapezoid.) However,
In[6]:= soln2[x_]=InverseLaplaceTransform[Apart[tff*tfg],s,x]
returns a completely different (and WRONG (IMHO)) answer involving
funny things such as UnitStep[]^2. This occurs even though, as
expected,
In[7]:= Simplify[Apart[tff*tfg]==tff*tfg]
Out[7]: True
Why is this? Am I in error here? Or is Mathematica in error?
Many thanks in advance!
Michael