Thanks for a very interesting and illuminating analysis of this, Zbigniew!
I willingly admit that I have missed something here (as you put it: in my enthusiasm :-)) , especially the part that Luke showed many times: to check that the "solution" actually solves the stated problem, Mea culpa! See below for the result when testing the solution "á la "Luke".
One comment: the y[0]
term is only in the last test of LaplaceTransform[], i.e. the one without any initial values, but the one with initial values has no such term.
In your code, it seems that you tested the version without initial values. See below for the test with outputs on all steps on the problem with initial values, which shows that the solution is not a proper solution. Also, when I'm trying to repeat your experiment (given that eqn
is the same as my eq
), I got the same result as in my code in the above (the las test): there is no unevaluated term LaplaceTransform[y[t],t,s].
I'm not sure what the difference between out codes are. Hmm. I tested this also in Mathematica v12.3.1 (instead of v 13.0), and then I got different result where the solution from SolveValues includes a lot of LaplaceTransform[y[t],t,s] terms. Which Mathematica version do you use?
Regarding wrapping the test into a Module: I first tested this line by line and got the following which is not the same as your output, but you use another approach which might explain this difference, or perhaps I missed something. In the last step we can see that the obtained "solution" is not a solution to the problem.