Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10972
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | Bob Hanlon <hanlonr357@gmail.com> |
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Differential Equation: Not getting result |
| Date | Wed, 18 Jul 2012 05:40:26 +0000 (UTC) |
| Sender | steve@smc.vnet.net |
| Approved | Steven M. Christensen <steve@smc.vnet.net>, Moderator |
| Message-ID | <ju5i8a$3ru$1@smc.vnet.net> (permalink) |
| References | <20120717053145.BA8F96877@smc.vnet.net> |
| Lines | 56 |
| Organization | Time-Warner Telecom |
| NNTP-Posting-Date | 18 Jul 2012 05:40:43 GMT |
| NNTP-Posting-Host | e2a78b91.news.twtelecom.net |
| X-Trace | DXC=dTY>\GQ`E`oo6SgMaR>^JiC_A=>8kQj6mY;@_o827nGcOaQg`:__CXbEFiONJ7[GofoRh02071?_n |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | csiph.com comp.soft-sys.math.mathematica:10972 |
Show key headers only | View raw
Clear[x];
r = 1;
K = 1;
eqn = x'[t] - r x[t] (1 - x[t]/K) == 0;
sol = NDSolve[
{eqn, x[0] == 1/2}, 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]
Or with DSolve
sol2 = DSolve[
{eqn, x[0] == 1/2}, x[t], t][[1]] // Quiet
{x[t] -> E^t/(1 + E^t)}
D[sol2, t] // Simplify
{Derivative[1][x][t] -> E^t/(1 + E^t)^2}
Bob Hanlon
On Tue, Jul 17, 2012 at 1:31 AM, Rahul Chakraborty
<rahul.6sept@gmail.com> 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
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Differential Equation: Not getting result Bob Hanlon <hanlonr357@gmail.com> - 2012-07-18 05:40 +0000
csiph-web