I've been using the invhilbert procedure from the inttrans package, but I'm running into a small problem. I'm attempting to apply invhilbert to an unknown function, and then later evaluate that function. However, in one particular case (bad, below), it does not produce the expected output. Curiously, I noticed that if I did *two* substitutions (good, below), it produces the expected result.
pde := inttrans:-invhilbert(f(t,s),s,x):
def := g = ((t) -> exp(t)*sin(B)):
bad := f = ((t,x) -> (1 + exp(t)*sin(B))*sin(x+A)):
good := f = ((t,x) -> (1 + g(t))*sin(x+A)):
# -cos(A) exp(t) sin(B) cos(x) + sin(A) exp(t) sin(B) sin(x) - cos(A) cos(x) + sin(A) sin(x)
# -exp(t) sin(B) cos(x) + sin(A) sin(x) - cos(A) cos(x)
As a side-note: this discrepancy was very delicate. Removing any of terms (for instance, A) causes both to give the same, correct answer.
For this particular problem, I was able to manually replace exp(t)*sin(b) with the function g(t) and get the correct result, but I was hoping for a more automated approach (I need to apply it to many equations). Is there any way to get the correct result from equation bad?
Thank you very much!