I've recently starting using Matlab and am trying to verify all work that I do by hand using it.
y'' + 4y' + 3y = 5e^-3x
By hand I get
y = A/e^x + B/e^3x - 5x/(2e^3x)
but with dsolve, there's an extra term ...
dsolve('D2y + 4*Dy + 3*y = 5*exp(-x*3)','x')
ans = C5/exp(x) - (5*x)/(2*exp(3*x)) - 5/(4*exp(3*x)) + C6/exp(3*x)
I can't work out what is going on - the ODE is simple to solve by hand so have I made a silly mistake in the matlab implementation?
Thanks for having a look!
Even if I had noticed that I would have still been a little confused. What is really interesting me now though is the underlying algorithm used by M. Where would it have got that value, separate from the other constant term, from? I will try to do some searching about. Would be interesting to see how other symbolic solvers behave.