Message Boards Message Boards

0
|
4493 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

A very basic question by a new user

Posted 11 years ago
Coukd you please tell me why thse lines doesn't work ?
DSolve[ {y'[x] ==(-12.33 y[x] +400.63) 1000 / (454 10^6 0.001275 1.007), y[0]==5}, y, x]

I use Mathematica 9.1.

I have too some trouble with the "==", sometimes accepted, other times not as an equallity and not an equation.

This time I got "DSolve:bvnul : For some branches of the general solution, the given boundaries conditions lead to an empty solution >>

But as the general solution appears obvious, I don't understand what I did wrong.

Aside this question, how to put a "==" correctly in the notebook ??

Thx,

bilik.miloslav@wanadoo.fr
POSTED BY: bilik.miloslav
Posted 11 years ago
Mathematica "tries to be helpful" by remembering assignments you have made in the past. So if minutes or even months ago, at least if it was since the last time you started Mathematica, you wrote y[ t_ ]=7 then any time later you use y[ t ] Mathematica is going to nearly instantly replace that with 7 and you may get completely confusing error messages or even nothing at all from DSolve, because you might not realize those old assignments are still lurking out there..

A good idea, unless you know enough to know when you don't need this, is to put
Clear[y,x];
immediately before your DSolve which uses y'[ x ], y[ x ], x, etc, etc. Include any and all the variables you use inside your DSolve and the Clear will silently delete all those stored assignments and let your = and == hopefully behave the way you think they should.

If you haven't done this at some time in the future and you get a puzzling non-answer from DSolve then one trick that sometimes helps is to use your mouse to highlight the entire {...} inside your DSolve, copy that to the clipboard, paste into an empty spot in your notebook, put the cursor at the end of it, tap <shift><enter> to let Mathematica evaluate it and look at the result. If it looks exactly what is inside your DSolve then this trick isn't helping, but if part of that looks different and perhaps includes things like True or False instead of y[ 0 ]==5, etc, then that is a strong hint that some old assignment has given DSolve something different than what you thought.
POSTED BY: Bill Simpson
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