Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem in solving nonlinear Differential Equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128305] Re: Problem in solving nonlinear Differential Equation
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 6 Oct 2012 01:48:12 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121005065227.E834268D5@smc.vnet.net>

With your code, you should see an error message that reads:
"NDSolve::dvnoarg: The function x appears with no arguments. >>"

Change (x^3)[t] to x[t]^3

Your second ParametricPlot can be written as a simple Plot.

With other simplifications:

Clear[x];
Q = 100;
\[CapitalGamma] = 50;
Subscript[\[Omega], 0] = 10;
Subscript[V, p] = 1/2;
Subscript[C, 0] = 406*10^-6;
\[Phi] = 90;
\[Gamma] = 1/Q;
Subscript[V, 1][t] =
  Sqrt[2] Subscript[V, p] Sin[2 Subscript[\[Omega], 0] t];
Subscript[k, 3] = 5;
eqn = x''[t] + \[Gamma] Subscript[\[Omega], 0] x'[t] +
     Subscript[\[Omega], 0]^2 (1 +
        Subscript[C, 0] Subscript[V, 1][t]) x[
       t] - \[CapitalGamma] Sin[Subscript[\[Omega], 0] t + \[Phi]] +
     Subscript[k, 3] x[t]^3 == 0 // Simplify;
sol = NDSolve[{eqn, x[0] == 1/2, x'[0] == 0}, x, {t, 0, 50}][[1]];
ParametricPlot[Evaluate[{x[t], x'[t]} /. sol], {t, 0, 50},
 Frame -> True, AxesLabel -> {"x", Overscript[x, "."]},
 AspectRatio -> 1, PlotStyle -> {{Red, AbsoluteThickness[1]}},
 BaseStyle -> {FontFamily -> "Courier", FontWeight -> "Bold",
   FontSize -> 16}]
Plot[x[t] /. sol, {t, 0, 50}, Frame -> True, AxesLabel -> {"t", "x"},
 AspectRatio -> .5, PlotStyle -> {{Green, AbsoluteThickness[1]}},
 BaseStyle -> {FontFamily -> "Courier", FontWeight -> "Bold",
   FontSize -> 16}]


Bob Hanlon


On Fri, Oct 5, 2012 at 2:52 AM, Rahul Chakraborty <rahul.6sept at gmail.com> wrote:
> Dear All,
>
>  I'm facing some problem in solving non-linear differential equation. I'm not getting output.The code as follows:
>
>  Clear[x,Q,\[CapitalGamma],\[Phi]];
> Q:=100;
> \[CapitalGamma]:=50;
> Subscript[\[Omega], 0]:=10;
> Subscript[V, p]:=1/2;
> Subscript[C, 0]:=406 * 10^-6;
> \[Phi]:=90;
> \[Gamma]:=1/Q;
> Subscript[V, 1][t]:=Sqrt[2] Subscript[V, p]Sin[2Subscript[\[Omega], 0]t];
> Subscript[k, 3]:=5;
> eqn= x''[t]+\[Gamma] Subscript[\[Omega], 0]x'[t]+Subscript[\[Omega], 0]^2 (1+Subscript[C, 0]Subscript[V, 1][t])x[t]-\[CapitalGamma] Sin[Subscript[\[Omega], 0]t+\[Phi]]+Subscript[k, 3](x^3)[t]==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,PlotStyle->{{Red,AbsoluteThickness[1]}},TextStyle->{FontFamily->"Courier",FontWeight->"Bold",FontSize->16}]
> ParametricPlot[Evaluate[{t,x[t]/.sol}],{t,0,50},Frame->True,AxesLabel->{"t","x"},AspectRatio->.5,PlotStyle->{{Green,AbsoluteThickness[1]}},TextStyle->{FontFamily->"Courier",FontWeight->"Bold",FontSize->16}]
>
>
> Regards,
>
> rahul
>



  • Prev by Date: Re: Trouble Loading Packages...
  • Next by Date: Re: Kernel exits
  • Previous by thread: Problem in solving nonlinear Differential Equation
  • Next by thread: Re: Problem in solving nonlinear Differential Equation