Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: NDSolve and DAEs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124610] Re: NDSolve and DAEs
  • From: "J. Jesús Rico Melgoza" <jerico at umich.mx>
  • Date: Thu, 26 Jan 2012 03:29:55 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201201251204.HAA05991@smc.vnet.net> <CAEtRDSdw8yE7j9opnLN7ue1i9N90yBoSJh6x2pzyK9JC=i7CLg@mail.gmail.com>

Thanks Bob!
El 25/01/2012, a las 07:55, Bob Hanlon escribi=F3:

> eqns = {
>   x1'[t] == x2[t],
>   x2'[t] == -x3[t] - x2[t],
>   x3'[t] == x2[t] x4[t],
>   x4'[t] == -x3[t] x2[t]};
>
> ics = {x1[0] == 0.5, x2[0] == 0,
>   x3[0] == Sin[0.5], x4[0] == Cos[0.5]};
>
> sol = NDSolve[Join[eqns, ics], {x1, x2, x3, x4}, {t, 0, 16}][[1]];
>
> x3[0] x3[0] + x4[0] x4[0] == 1 /. sol
>
> True
>
> Plot[Evaluate[{
>    Tooltip[x1[t], "x1"],
>    Tooltip[x2[t], "x2"],
>    Tooltip[x3[t], "x3"],
>    Tooltip[x4[t], "x4"]} /. sol],
> {t, 0, 16}]
>
>
> Bob Hanlon
>
>
> 2012/1/25 J. Jes=FAs Rico Melgoza <jerico at umich.mx>:
>> Hi everybody!
>>
>> I have the following DAE system:
>>
>> eqns = {x1'[t] == x2[t], x2'[t] == -x3[t] - x2[t],
>>                                      x3'[t] == x2[t] x4[t],
>>                                      x4'[t] == -x3[t] x2[t]}
>> with initial conditions
>>
>> ics = {x1[0] == 0.5, x2[0] == 0, x3[0] == Sin[0.5],
>>                                        x4[0] == Cos[0.5]}
>> that must satisfy the following constraint
>>
>> x3[0]x3[0]+x4[0]x4[0]=1
>> The interval of time is {t,0,16}.
>>
>> I do not know how to do it with NDSolve.
>> Can this be done? in some part of the documentation there is an example
>> where the enqs are linear but the same procedure applied to my problem
>> (nonlinear) wouldn't work.
>>
>> I will appreciate any help.
>> Thanks in advance.
>>
>> Best regards
>> Jesus Rico-Melgoza
>>




  • Prev by Date: Re: Mathematica 8 + OS X + McAfee = trouble; help?
  • Next by Date: this computation is just too slow (vrs. 8.0.4)
  • Previous by thread: Re: NDSolve and DAEs
  • Next by thread: Re: NDSolve and DAEs