Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have tried the input:

DSolve[{ x'[t] == 3 x[t] + 2 y[t] + 4 z[t], 
         y'[t] == 2 x[t] + 0 y[t] + 2 z[t], 
         z'[t] == 4 x[t] + 2 y[t] + 3 z[t]}, 
         {x, y, z}, t]

According to Mathematica:

"Equation or list of equations expected instead of True in the first argument"

I don't know where to go from here.

share|improve this question

closed as too localized by whuber, Artes, Szabolcs, Mr.Wizard Mar 26 '13 at 21:57

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you try it with a fresh kernel? It gives solutions for x, y and z in version 9.0.1. It seems like a function definition (or alike, e.g. x'[t] = 3 x[t] + 2 y[t] + 4 z[t]) remains in memory after ClearAll, that renders one or more of the equations to immediately simplified to True. –  István Zachar Mar 26 '13 at 20:15
I started a new kernel and that seems to have done the trick. Unfortunately it is now producing output that I know is wrong. –  Atlas Mar 26 '13 at 20:59
@Atlas Could you demonstrate what is wrong ? –  Artes Mar 26 '13 at 21:13
@Atlas Version 9.0.1 gives a correct solution, verified both numerically and by symbolic backsubstituion: sol = DSolve[ eq = {x'[t] == 3 x[t] + 2 y[t] + 4 z[t], y'[t] == 2 x[t] + 0 y[t] + 2 z[t], z'[t] == 4 x[t] + 2 y[t] + 3 z[t]}, {x, y, z}, t]; eq /. sol // Simplify –  Szabolcs Mar 26 '13 at 21:16
...and no problem in 8.0.0 either. –  whuber Mar 26 '13 at 21:52

1 Answer 1

up vote 3 down vote accepted

I believe two things may improve your input, and the following seems to work fine with a freshly started kernel:

DSolve[{x'[t] == 3 x[t] + 2 y[t] + 4 z[t], 
        y'[t] == 2 x[t] + 0 y[t] + 2 z[t], 
        z'[t] == 4 x[t] + 2 y[t] + 3 z[t]}, 
       {x[t], y[t], z[t]},
  1. You most likely used the Set (a.k.a. "=" ) command somewhere to assign values to x[t], y[t] or z[t]. This is why the True shows up because Mathematica thinks you're testing whether something is equal to itself using the == (a.k.a. Equal) command rather than using == to set up an equation.
  2. If you're a beginner, it may be better to use {x[t], y[t], z[t]} as the functions to solve for rather than {x, y, z} because this improves the readability of the solution.
share|improve this answer
The second point isn't really something that went "wrong" :-) Personally I prefer {x[t], ...} for reading the answer, but I prefer {x, ...} for using it, as it will be possible to backsubstitute even into something like x[a^b + b], and not only into x[t]. –  Szabolcs Mar 26 '13 at 21:43
@zentient, why do you state the second point? These to inputs produce a different format of the output, both useful. –  user21 Mar 27 '13 at 9:22
@ruebenko : I should probably rephrase my second point. It seems that because the answer is easier to read, as Szabolcs states, that it's easier to implement for the beginner. Getting to grips with the answers which are delivered as a Rule is a step for the beginner which is perhaps better not further complicated by the Function expressions. If anyone can suggest further useful edits, I'd be happy to implement them. –  zentient Mar 27 '13 at 20:33
+1, @zentient, this is much clearer, IMHO, the first one read more that the other form of output were not useful, which I would not agree too. Thanks for updating. –  user21 Mar 28 '13 at 5:26

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