4
$\begingroup$

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.

  • 0
    @Szabolcs: `\bigl \bigr`, `\biggl \biggr`, `\Bigl \Bigr`, and `\Biggl \Biggr` and maybe others. You can click edit underneath the question to see the raw LaTeX code used, and play around with it to see how it changes below in the preview window pane. Just try not save any edits you make unless they are intended edits to make the questions better. This is the code generated directly by Mathematica when doing the following in the previous comment. `\left\{\left\{s[t]\to 10 \text{Cos}\left[\sqrt{\frac{11}{2}} t\right]\right\}\right\}`. Thanks2012-01-11

1 Answers 1

6

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.