Message Boards Message Boards

0
|
7322 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

DSolve returns true

Posted 11 years ago

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

In: Clear[x, y]
In: DSolve[y'[x] == x - y[x], y[x], x]


Out: DSolve[True, y[x], x]
POSTED BY: Michael Beers
3 Replies

Using Mathematica 7, I got a solution

(* Commands 1*)    
 Clear[x, y];
 DSolve[ y'[x] == x - y[x], y[x], x] 
 {{y[x] -> -1 + x + E^-x C[1]}}

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.

POSTED BY: Isaac Abraham
Posted 11 years ago

Restarted and it works! Is there a way to clear data after each problem or should I do each problem in a new window after restarting?

POSTED BY: Michael Beers

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

Remove["Global`*"]
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract