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: Problem in solving Differential Equation
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Rahul Chakraborty

Posts: 36
From: Guwahati, India
Registered: 5/14/12
Problem in solving Differential Equation
Posted: Mar 5, 2013 10:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear all,

Following differential equation seems to have some error in coding by me. kindly let me know where i have gone wrong.

Clear[x];
\[Omega]:=-2;
eqn=x''[t]+ Sin x[t]-\[Omega]^2 Sin x[t]Cos x[t]==0//Simplify;
sol=NDSolve[{eqn,x[0]==1/2,x'[0]==0},x[t],{t,0,1000}][[1]]
ParametricPlot[Evaluate[{x[t]/.sol,D[x[t]/.sol,t]}],{t,0,25},Frame->True,AxesLabel->{"x",Overscript[x,"."]},AspectRatio->1,PlotStyle->{{Red,AbsoluteThickness[2]}},TextStyle->{FontFamily->"Courier",FontWeight->"Bold",FontSize->16}]
ParametricPlot[Evaluate[{t,x[t]/.sol}],{t,0,10},Frame->True,AxesLabel->{"t","x"},AspectRatio->.5,PlotStyle->{{Green,AbsoluteThickness[3]}},TextStyle->{FontFamily->"Courier",FontWeight->"Bold",FontSize->16}]

Regards,

rahul




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.