I am trying to solve the following second order differential equation with constant coefficients
df[x_[t_]] =
4* D[x[t], {t, 2 }] + 2* D[x[t], {t, 1 }] + 4* D[x[t], {t, 0 }]
With the following inhomogeneity:
ih[t_] = -9 E^(-t/4) Sin[t (Sqrt[15]/4)]
When I solve the equation by hand I get a general solution that looks like:
sln = {{x ->
Function[{t}, (C[2]*Cos[(Sqrt[15]*t)/4])/
E^(t/4) + (C[1]*Sin[(Sqrt[15]*t)/4])/E^(t/4) +
((3/10)*(Sqrt[15]*t*Cos[(Sqrt[15]*t)/4] ))/E^(t/4)]}}
The same solution is obtained by entering the equation into wolfram alpha and asking for a solution.
However when using Dsolve to work out the solution:
df1s = FullSimplify[DSolve[df[x[t]] == ih[t], x, t]]
I obtain an extra term in the particular solution of the form ( after simplification) :
3/10 E^(-t/4) * -2*Sin[(Sqrt[15]*t)/4]
Substituting both answers back into the equation in Mathematica gives back the original inhomogeneity, Indicating that both solutions are "correct".
But as far as I can tell both terms are only equivalent when the extra sin term goes to 0. For example when t = 0.
I have the following questions and would be very interested if anyone can shed some light on why this happens.
1 ) Why do Dsolve and wolfram alpha give different answers. Is it because wolfram alpha is not using a Dsolve like process but instead working out the example "step by step" as shown in the "step by step" solution provided.
2) Where is this extra term coming from ? Is it because Dsolve is "solving" the equation around a point like t=0 where both expressions are equivalent and thus can't distinguish the difference and just drags the extra term along as if it did not matter.
4) Why is substituting both terms back into the original differential equations in mathematica giving the same result. Are these two terms Truly equivalent even though they only seem to be equal at certain points ?
5) Is there anything that can be done to make Dsolve give the same answer as Mathematica or is it just a question of having to "solve" the problem step by step instead of using Dsolve to reach an answer.
il attach a short notebook that shows the situation I am talking about. Please let me know if its not clear enough and I can make a neater example
Thanks in advance.
P.S: Giving DSolve the appropriate complex inhomogeneity and then extracting the imaginary part of the complex solution gives the exact same results.