Message Boards Message Boards

How to plot Pitchfork bifuration curve for a nonlinear DE?

Posted 9 years ago

Hi,

I want to plot a pitchfork bifurcation plot for a DE. I tried with the code as below. It does not show any error but does not show any plot either. I want a plot for x* versus r . Plz advice.

Clear[x];
r=-3;
eqn=x'[t]==r*x[t]+4*x[t]^3;
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
2 Replies

Maybe you want something like this:

StreamDensityPlot[{0, r x + x^3}, {r, -3, 3}, {x, -2, 2}, ColorFunctionScaling -> False, ColorFunction -> "TemperatureMap"]

which gives:

enter image description here

Regards -- Henrik

POSTED BY: Henrik Schachner

I think you're solution is 0 everywhere.

In[23]:= r = -3;
eqn = x'[t] == r*x[t] + 4*x[t]^3;
sol = DSolve[{eqn, x[0] == 0}, x, {t, 0, 100}]

During evaluation of In[23]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>

During evaluation of In[23]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>

Out[25]= {{x -> Function[{t}, 0]}}
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