Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
2  
Maybe clearing x from memory doesn't clear x'? Try restarting the kernel. –  Jim Belk Jan 5 '12 at 5:05
    
What does ??x give? –  Brett Champion Jan 5 '12 at 5:23
2  
(And did you mean to enter 6 x[t]+5 x[t], or should one of those be x'[t]?) –  Brett Champion Jan 5 '12 at 5:24
    
Whatever the answer, you can be sure that mathematica doesn't care about whether you call the independent variable x or s. –  Sangeeta Jan 5 '12 at 8:03
2  
Well, executing Remove[x] is a bit less drastic than kernel restarting... –  J. M. Jan 5 '12 at 8:21

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.