Message Boards Message Boards

DSolve vs Wolfram Alpha / hand calculation results

Posted 1 year ago

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.

POSTED BY: Manuel Telleria

After taking another look at the problem I realized the extra term (When simplified) is simply one of the solutions to the homogenous equation multiplied by a constant.

Instead of giving the general solution as Xg = Xp + C1 * E1 + C2 * E2 Dsolve gives the general solution as Xg = Xp + (C1 - (3/5)) * E1 + C2 * E_2

Therefore I now believe the answers given by Dsolve and wolfram alpha are the exact same

Except that for some reason Dsolve does not "absorb" this extra term into the undetermined constant for that particular eigenfunction. Which is kind of funny but I guess its just an artifact of the process used.

I consider this mystery solved but if anyone wants to validate my suspicion or shed some light on why it ends up like this I would still be interested.

Thanks

POSTED BY: Manuel Telleria
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract