As parts of my computations, I use InverseLaplaceTransform
for some symbolic expressions. As an example, when I have the following transformation for sum of two similar expressions:
InverseLaplaceTransform[(b E^-(b x)^n (b x)^(-1 + n))/ s + (b (b x)^(-1 + n))/s, s, t]
then, Mathematica simplifies and converts it into a form which the negative numeric exponent is separated from the symbolic part of exponent and is brought into the denominator as:
(E^-(b x)^n (1 + E^(b x)^n) (b x)^n)/x
and this becomes a challenge in next step, once evaluating the expression for some values of the parameters at x=0
, which has become now the root of the denominator. I think this is not really related to the InverseLaplaceTransform
, since similar results could also appear when using Simplify
, for example, the following simplification:
Simplify[b (b x)^(-1 + n), n>1]
would also result in:
(b x)^n/x
Regarding that simplifying is necessary in my computations, is there a way to prevent only this type of simplification? I was thinking of using some options similar to those used in HoldForm
, but I don’t know if it is possible and how to do it.
x=0
case? Something like thisr[x_]=InverseLaplaceTransform[(b E^-(b x)^n (b x)^(-1+n))/s+(b (b x)^(-1+n))/s,s,t]; r[x_/;x==0]:=0 (*or what ever*)
now you can safetly dor[x]
and it will not break. Ifx=0
then it will use the safe function, else it will use the main function.This is another way to do exception handling by making a function to handle the exceptions. $\endgroup$