I keep checking videos and online tutorials via youtube and Mathematica website however, I still can’t get a simple DSolve equation to work. Why is this giving me true? I am trying to Solve it so I can plot solutions and slope fields. Equation is Dy/Dx = x-y
The only time I was able to reproduce the “DSolve[True…” message was when I had the sequence of commands as follows,
Clear[x, y];
y'[x] = x - y[x];
DSolve[y'[x] == x - y[x], y[x], x]
What’s happening is that y’[x] is known to be x- y[x], and the DSolve is doing a compare of y-y[x] == y-y[x], returning True. Then it can’t solve True for y[x] in x, resulting in the question being returned.
Would you try exiting the kernel, restart fresh, and re-typing (* commands 1*) only.
Values of parameters (and functions and anything else you define in a Mathematica session) are independent of the window that you are in (i.e, they’re defined in a Kernel session, not a window generally–there’s an exception to this that is subtle).
If you want to clear out all the definitions and value assignments you have made in a Mathematica session then execute this
ClearAll["Global`*"]
and if you want to remove them completely from the Mathematica session then execute