Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.4K Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to solve this differential equation?

Posted 11 years ago

Hi,

I'm pasting a code of a DE with scaling parameter. I'm getting error. Plz help.

Clear[x];
r=1;
eqn=x'[t]-1-r*x[t]-(x^2)[t];sol=NDSolve[{eqn,x[0]==0},x,{t,0,100}][[1]];
tTicks=Range[-24,24 30,24];
tGrid=Range[-60,24 30,6];

ParametricPlot[Evaluate[{x[t],x'[t]}/.sol],{t,0,100},Frame->True,FrameTicks->{tTicks,Automatic},FrameTicksStyle->Directive[Red,Thick],GridLines->{tGrid,Automatic},GridLinesStyle->LightGray,FrameLabel->(Style[#,14,Bold]&/@{x,Overscript[x,"."]}),AspectRatio->1]

ParametricPlot[Evaluate[{t,x[t]/.sol}],{t,0,50},Frame->True,FrameTicks->{Range[0,50,12],Automatic},FrameTicksStyle->Directive[Red,Thick],GridLines->{tGrid,Automatic},GridLinesStyle->LightGray,FrameLabel->(Style[#,14,Bold]&/@{t,x}),AspectRatio->1]

Sincerely

POSTED BY: Rahul Chakrabory
7 Replies
Posted 11 years ago
POSTED BY: Bill Simpson
Posted 11 years ago
POSTED BY: Bill Simpson
POSTED BY: Rahul Chakrabory
POSTED BY: Rahul Chakrabory
Posted 11 years ago
POSTED BY: Bill Simpson
POSTED BY: Rahul Chakrabory
Your equation is malformed. This variation works:
eqn = x'[t] - 1 - r*x[t] - x[t]^2 == 0
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard