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

MathGroup Archive 2012

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

Search the Archive

Re: DSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126951] Re: DSolve
  • From: Christoph Lhotka <christoph.lhotka at fundp.ac.be>
  • Date: Wed, 20 Jun 2012 03:48:34 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201206190714.DAA26926@smc.vnet.net>

Hello,

  I do not reproduce your result:

$Version
8.0 for Linux x86 (64-bit) (October 10, 2011)

mypara={lk->1/1998,mk->1/2,li->1/1998,mi->1/2};
mymatrix=Transpose[{{-li-lk,lk,0,li},{mk,-li-mk,li,0},{0,0,0,0},{mi,0,lk,-lk-mi}}]//.mypara;


res=DSolve[{Inner[Equal,N[mymatrix].{u[t],x[t],y[t],z[t]},{D[u[t],t],D[x[t],t],D[y[t],t],D[z[t],t]},List],u[0]==1,x[0]==0,y[0]==0,z[0]==0},{u[t],x[t],y[t],z[t]},t]//Simplify;

res//.t->0
{{u[0]->1.,x[0]->0.,y[0]->-2.22045*10^-16,z[0]->-2.1684*10^-19}}

res2=DSolve[{Inner[Equal,N[mymatrix].{u[t],x[t],y[t],z[t]},{D[u[t],t],D[x[t],t],D[y[t],t],D[z[t],t]},List],u[0]==a,x[0]==b,y[0]==c,z[0]==d},{u[t],x[t],y[t],z[t]},t]//Simplify;

res2//.{a->1,b->0,c->0,d->0,t->0}
{{u[0]->1.,x[0]->4.55365*10^-18,y[0]->0.,z[0]->4.98733*10^-17}}

So it seems to be correct what DSolve did.

Best,

   Christoph

PS: Try the example you published here with a fresh Kernel


On 06/19/2012 09:14 AM, Eirik Larsen Følstad wrote:
> Hi,
>
> I'm trying solve differential equations with DSolve, but get an output that does no fulfill the initial conditions.
>
> Here is the setup running with Mathematica 8.0.1.0 for Students on a Mac OS 10.6.8;
>
>
> mypara = {lk ->  1/1998, mk ->  1/2, li ->  1/1998, mi ->  1/2};
>
> mymatrix =
>   Transpose[{{-li - lk, lk, 0, li}, {mk, -li - mk, li, 0}, {0, 0, 0,
>       0}, {mi, 0, lk, -lk - mi}}] //. mypara;
>
>
> With numeric initial values, I get a result as expected;
>
> res = DSolve[{Inner[Equal,
>       N[mymatrix].{u[t], x[t], y[t], z[t]}, {D[u[t], t], D[x[t], t],
>        D[y[t], t], D[z[t], t]}, List], u[0] == 1, x[0] == 0, y[0] == 0,
>       z[0] == 0 }, {u[t], x[t], y[t], z[t]}, t] // Simplify ;
>
> res //. t ->  0
>
> gives;
> {{u[0] ->  1., x[0] ->  0., y[0] ->  2.22045*10^-16, z[0] ->  2.1684*10^-19}}
>
>
> While with symbolic initial values, I get a result that is not as expected;
>
> res2 = DSolve[{Inner[Equal,
>       N[mymatrix].{u[t], x[t], y[t], z[t]}, {D[u[t], t], D[x[t], t],
>        D[y[t], t], D[z[t], t]}, List], u[0] == a, x[0] == b, y[0] == c,
>       z[0] == d }, {u[t], x[t], y[t], z[t]}, t] // Simplify ;
>
> res2 //. {a ->  1, b ->  0, c ->  0, d ->  0, t ->  0}
>
> gives;
> {{u[0] ->  1., x[0] ->  -3.37404*10^-16, y[0] ->  -3.46945*10^-18, z[0] ->  -1.}}
>
> Where the result is not according to the initial result.
>
> What am I doing wrong?
>
>
> Best regards,
> Eirik
>
>
>
>




  • References:
    • DSolve
      • From: Eirik Larsen Følstad <eirik.folstad@q2s.ntnu.no>
  • Prev by Date: altering each member of a list that matches a certain pattern
  • Next by Date: Re: DSolve
  • Previous by thread: DSolve
  • Next by thread: Re: DSolve