Raymond Toy a ?crit :
> Andrej Vodopivec wrote:
>
>>>> 3/ Since I assumed s>0, I expected the answer to be given in a real form,
>>>> I mean without %i in it. How can we "simplify" this answer to atan(2/s) ?
>>>> Is there a quite general way to do it ?
>>>>
>>>>
>>> I don't know how to get anything simpler than
>>> atan2(4*s/(s^2+4),(s^2-4)/(s^2+4))/2. It seems to me that we could at
>>> least have atan2(4*s,s^2-4)/2, but I don't know how to get maxima to do
>>> that. I also don't know why you think the answer is atan(2/s). Is that
>>> the answer in some table of transforms?
>>>
>>>
>> (%i1) assume(s>0);
>> (%o1) [s>0]
>> (%i2) u:specint(sin(2*t)/t*exp(-s*t),t);
>> (%o2) (%i*log((s-2*%i)/(s+2*%i)))/2
>> (%i3) rectform(u), logexpand=all;
>> (%o3) atan(2/s)
>>
>>
>>
> Neat. But log(x/y) is not always the same as log(x) - log(y). And for
> s = 1/2, I get different answers. But I think they're the same for s >=
> 2. Also, in general, isn't the Laplace parameter s a complex number?
>
> Ray
I get the same answer for log(x/y) and log(x)-log(y) when s=1/2 if
x=s-2i and y=s+2i ;
but NOT if I take x=-(s-2i) and y=-(s+2i) :
(%i1) display2d:false$
(%i2) u:specint(sin(2*t)/t*exp(-s*t),t); rectform(u), logexpand=all;
(%o2) %i*log((s-2*%i)/(s+2*%i))/2
(%o3) atan2(2,s)
(%i4) x:s-2*%i$ y:s+2*%i$ rectform(x/y),numer,s=1/2; log(%);
rectform(log(x))-rectform(log(y)), numer,s=1/2;
(%o6) -0.47058823529412*%i-0.88235294117647
(%o7) -2.651635327336065*%i
(%o8) -2.651635327336065*%i
(%i9) -2*%i*%o3,s=1/2,numer;
(%o9) -2.651635327336065*%i
(%i39) x:2*%i-s$ y:-s-2*%i$ rectform(x/y),numer,s=1/2; log(%);
rectform(log(x))-rectform(log(y)), numer,s=1/2;
(%o41) -0.47058823529412*%i-0.88235294117647
(%o42) -2.651635327336065*%i
(%o43) 3.631549979843521*%i
same conclusion even if s=2 or greater.
This is a good reason to try keeping computations with real variables
when possible.
In general, yes the Laplace transform is defined for complex s.
The integral converges for Re(s) in some (real) interval. In our case,
the assumption s>0 is what is needed for convergence.
When the problem of determination of the logarithm or other multiple
valued functions arises, (for laplace or specint) it might be a good
idea to mention it in the documentation of the corresponding function.
In our case, we know at least that the result is correct up to some
multiple of %pi.
Eric