Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12668
| From | Hazem AbdelHafiz <hazem.abdelhafiz@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: System of differential equations |
| Date | 2012-12-07 06:37 +0000 |
| Message-ID | <k9s2rl$mp7$1@smc.vnet.net> (permalink) |
| References | <20121206095813.308946374@smc.vnet.net> <CAEtRDSdqn65NArwmJS7JDq=vn0gGSqkni5kWNKZbE9C2f7LG-w@mail.gmail.com> |
| Organization | Time-Warner Telecom |
Thanks Bob,
Thanks for the fast comment
It now solves
On Fri, Dec 7, 2012 at 1:34 AM, Bob Hanlon <hanlonr357@gmail.com> wrote:
> The Sin functions must be entered as Sin vice sin. The range of t is
> too large to be handled.
>
> s = NDSolve[{
> ph1''[t] + ph1'[t] + Sin[ph1[t]] - mu[t] - mu'[t] == 0.005,
> ph2''[t] + ph2'[t] + Sin[ph2[t]] + mu[t] + mu'[t] == 0.005,
> 0.2 mu'[t] + mu[t] == ph1'[t] - ph2'[t], ph2[0] == 0, ph1[0] == 0,
> ph2'[0] == 0, ph1'[0] == 0, mu[0] == 0},
> {ph1[t], ph2[t], mu[t]},
> {t, 0, 240}];
>
> Plot[Evaluate[Tooltip[#, ToString[#]] & /@
> {ph1[t], ph2[t], mu[t]} /. s],
> {t, 0, 10},
> Frame -> True, Axes -> False]
>
> However, the range on t affects the results
>
> s = NDSolve[{
> ph1''[t] + ph1'[t] + Sin[ph1[t]] - mu[t] - mu'[t] == 0.005,
> ph2''[t] + ph2'[t] + Sin[ph2[t]] + mu[t] + mu'[t] == 0.005,
> 0.2 mu'[t] + mu[t] == ph1'[t] - ph2'[t], ph2[0] == 0, ph1[0] == 0,
> ph2'[0] == 0, ph1'[0] == 0, mu[0] == 0},
> {ph1[t], ph2[t], mu[t]},
> {t, 0, 100}];
>
> Plot[Evaluate[Tooltip[#, ToString[#]] & /@
> {ph1[t], ph2[t], mu[t]} /. s],
> {t, 0, 10},
> Frame -> True, Axes -> False]
>
>
> Bob Hanlon
>
>
> On Thu, Dec 6, 2012 at 4:58 AM, <hazem.abdelhafiz@gmail.com> wrote:
> > Dear all,
> > I want to solve this system of equations but I always get an error
> >
> > NDSolve::ndnum:Encountered non-numerical value for a derivative at t==0
> >
> > can any one help me on this
> >
> > s=NDSolve[{
> > ph1''[t]+ph1'[t]+sin[ph1[t]]-mu[t]-mu'[t]==0.005,
> > ph2''[t]+ph2'[t]+sin[ph2[t]]+mu[t]+mu'[t]==0.005,
> > 0.2mu'[t]+mu[t]==ph1'[t]-ph2'[t],
> > ph2[0]==0,
> > ph1[0]==0,
> > ph2'[0]==0,
> > ph1'[0]==0,
> > mu[0]==0
> > },
> > {ph1[t],ph2[t],mu[t]},
> > {t,0,5000}
> > ]
> >
> > thanks in advance,
> >
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: System of differential equations Hazem AbdelHafiz <hazem.abdelhafiz@gmail.com> - 2012-12-07 06:37 +0000
csiph-web