Message Boards Message Boards

GROUPS:

Plot a solution of NDSolve[ ]?

Posted 25 days ago
277 Views
|
3 Replies
|
0 Total Likes
|

I am trying to plot the solution to the following ode:

x'[t] = x[t]*(1 - x[t])*(1/2 ((1 - (1 - x[t])^5)/x[t] - 3/5)), 
x[0] = 0.5

I have attached my code that plots the solution but it doesn't start at x[0] = 0.5, How can I rectify this?

Attachments:
3 Replies
Posted 25 days ago

Not sure what you mean. In the plot when x = 0, y = 0.5. Also in [Evaluate[x[t] /. o], o is not defined.

Apologies I was misreading the plot.

Try:

sol = NDSolve[{x'[t] == x[t]*(1 - x[t])*(1/2 ((1 - (1 - x[t])^5)/x[t] - 3/5)), x[0] == 1/2}, x, {t, 0, 10}];
Plot[x[t] /. sol, {t, 0, 10}, PlotRange -> {Automatic, {0, 1}}, Epilog -> {Red, PointSize[0.02], Point[{0, 1/2}]}]
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