Message Boards Message Boards

0
|
2782 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Hi this is my first post and I have some questions

Posted 11 years ago
DSolve[y'[x] == 2 y[x], y[x], x]
 
DSolve::dsfun: E^(2 x) C[1] cannot be used as a function. >>
 DSolve[True, E^(2 x) C[1], x]
I have a question. When I input the first and then Mathematica will show the next problem. What is the answer?
 tks
POSTED BY: shin Wang
4 Replies
Posted 11 years ago
An error message from DSolve that includes
DSolve[ ..., True, ... ]
where there may be nothing before True
usually means that in the past you told Mathematica
y=x
and it stored that the value of y is x.
Then you told Mathematica
DSolve[..., y==x,... ]
Now y==x tests whether the value of y is x or not.
Since you told it that it was earlier this simplifies to True.

Solution. Be very careful to not assign values to variables that you do not intend.
You can use
?y
to see if y has a value. If it does and you no longer wish this to be the case then
you can use
y=.
or
Clear
to tell Mathematica to remove the prior information about y.
POSTED BY: Bill Simpson
Dear Shin Wang,

this might work:
DSolve[y'[x] == 2 y[x], y, x]

M.
POSTED BY: Marco Thiel
Posted 11 years ago
DSolve::dsfun: E^(2 x) C[1] cannot be used as a function. >>
DSolve[True, E^(2 x) C[1], x]
Can anyone explain this sentence?
POSTED BY: shin Wang
Posted 11 years ago
tks
POSTED BY: shin Wang
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