[Math] Error When Using Mathematica To Solve Differential Equation

mathematicaordinary differential equations

I have a concern of why mathematica does not like/except the independent variable x. When it is used it gives the following error:

In[1]:= DSolve[{2 x''[t] + $6$ x'[t] + 5 x[t] == 0, x[0] == 10, x'[0] == 0}, x[t], t]

Gives

DSolve::deqn :

$\hspace{0.2cm}$ Equation or list of equations expected instead of True in the first argument

$\hspace{0.9cm}$ {$11$x[t]+$2$x''[t] == $0,~$ x[$0$]==$10,~$True}.

Out[1]= DSolve[{$11$x[t]+$2$x''[t]==$0,~$ x[$0$]==$10,~$ True}, x[t],$\:$ t]

But when the variable is switched out for another, you obtain the solution as expected like so:

In[2]:= DSolve[{2 s''[t] + 6 s[t] + 5 s[t] == 0, s[0] == 10, s'[0] == 0}, s[t], t]

Out[2]= $\Bigl\{\Bigl\{s\Bigl[t\Bigr] \rightarrow \text{10 Cos}\left[\sqrt{\dfrac{11}{2}}t \right]\Bigr\}\Bigr\}$

What could be the cause of this?

Note: I also cleared the variable from memory just to be on the safe side.

Best Answer

That's because you've just accidentally written x'[0]=0 instead of x'[0]==0. Try to clear this false assignment simply by evaluating:

x'[0]=.

Then re-evaluate your original line.

Related Question