Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Differential Equation: Not getting result
Replies: 3   Last Post: Jul 18, 2012 1:40 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Oliver Ruebenkoenig

Posts: 237
Registered: 6/28/08
Re: Differential Equation: Not getting result
Posted: Jul 18, 2012 1:38 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



On Tue, 17 Jul 2012, Rahul Chakraborty wrote:

> Dear all,
>
> For the following code i'm not getting result. kindly tell me where i'm making mistake.
>
> Clear[x];
> r=1;
> K=1;
> eqn= (x^')[t]-r x[t] (1-x[t]/K)==0//Simplify;
> sol=NDSolve[{eqn,x[0]==1/2,x'[0]==0},x[t],{t,0,50}][[1]]
> ParametricPlot[Evaluate[{x[t]/.sol,D[x[t]/.sol,t]}],{t,0,50},Frame->True,AxesLabel->{"x",Overscript[x,"."]},AspectRatio->1]
> ParametricPlot[Evaluate[{t,x[t]/.sol}],{t,0,50},Frame->True,AxesLabel->{"t","x"},AspectRatio->1]
>
>
> Regards,
> rc
>
>



Hi,

you mean something like this?

Clear[x];
r = 1;
K = 1;
eqn = x[t]^2 - r x[t] (1 - x[t]/K) == 0 // Simplify;
sol = NDSolve[{eqn, x[0] == 1/2, x'[0] == 0}, x[t], {t, 0, 50}][[1]]

ParametricPlot[Evaluate[{x[t] /. sol, D[x[t] /. sol, t]}], {t, 0, 50},
Frame -> True, AxesLabel -> {"x", Overscript[x, "."]},
AspectRatio -> 1]
ParametricPlot[Evaluate[{t, x[t] /. sol}], {t, 0, 50}, Frame -> True,
AxesLabel -> {"t", "x"}, AspectRatio -> 1]


Oliver




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.