Message Boards Message Boards

0
|
2497 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Plot won't plot the solution to my differential equation

Posted 11 years ago
I have this expression:
testsprog = DSolve[{feq, y[1] == 1}, y[x], x]

That, upon evaluation, produces:
{{y[x] -> 1/2 x Tan[2 (ArcTan[2]/2 + Log[x])]}}

When I try to plot it using the command:
Plot[testsprog, {x, 1, 4}]

I see only a coordinate axis, and not my equation. Why?
POSTED BY: D G
2 Replies
Please see this short tutorial on using the output of fucntions like Solve, NSolve, and DSolve:

http://support.wolfram.com/kb/3825
POSTED BY: Sean Clarke
Plot[ Evaluate[ y[x] /. testprog ], {x, 1, 4}]
The Evaluate is to prevent Plot from evaluating the expression separately for every point.
POSTED BY: Frank Kampas
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