Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10558 > unrolled thread
| Started by | Christoph Lhotka <christoph.lhotka@fundp.ac.be> |
|---|---|
| First post | 2012-06-20 07:49 +0000 |
| Last post | 2012-06-20 07:49 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: DSolve Christoph Lhotka <christoph.lhotka@fundp.ac.be> - 2012-06-20 07:49 +0000
| From | Christoph Lhotka <christoph.lhotka@fundp.ac.be> |
|---|---|
| Date | 2012-06-20 07:49 +0000 |
| Subject | Re: DSolve |
| Message-ID | <jrrvb7$4qs$1@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
>
>
>
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web