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: DSolve
Replies: 3   Last Post: Jun 20, 2012 3:51 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christoph Lhotka

Posts: 39
Registered: 2/9/12
Re: DSolve
Posted: Jun 20, 2012 3:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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
>
>
>
>





Date Subject Author
6/20/12
Read Re: DSolve
Eirik Larsen Følstad
6/20/12
Read Re: DSolve
Christoph Lhotka

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.