       reducing error of using NDsolve

• To: mathgroup at smc.vnet.net
• Subject: [mg14822] reducing error of using NDsolve
• From: "Sung-Hwan Joo" <sjoo at ou.edu>
• Date: Wed, 18 Nov 1998 01:29:27 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

I am trying to solve three equations simultaneously.

k0,k1,k2,k4,k5,k6,k7,k8,k9,k10 are functions of u[t].
eqn1 = k0 * u''[t] == k1 * u'[t]^2 + k2;
eqn2 = A * upx''[t] == k4 * u'[t]^2 + k5 * u'[t] * upx'[t] + k6 - k3 * u''[t];

eqn3 = A * upy''[t] == k8 * u'[t]^2 + k9 * u'[t] * upy'[t] + k10 - k7 * u''[t];
s =
DSolve[{eqn1,eqn2,eqn3,u==0,u'==0,upx==0,upx'== 0,upy,upy'},{u[t],upx[t]},{t,0,2.0];

ds = D[s,t];

dds = D[ds,t];

For[t=0. , t< (time+time/50) , t = t + time/0.003768568627454,

u[t] = Evaluate[u[t]/.s][] ;

u'[t] = Evaluate[u'[t]/.ds][] ;

u''[t] = Evaluate[u''[t]/.dds][];

upx[t] = Evaluate[upx[t]/.s][];

upx'[t] = Evaluate[upx'[t]/.ds][] ;

upx''[t] = Evaluate[upx''[t]/.dds][];

upy[t] = Evaluate[upy[t]/.s][];

upy'[t] = Evaluate[upy'[t]/.ds][] ;

upy''[t] = Evaluate[upy''[t]/.dds][];

}

After evaluating these results, and comparing with analytical results,

There are big differences.It seems like mathematica can't solve these
equations correctly.

Especially u'[t],u''[t] and upx'[t],upx''[t].