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]==0,u'[0]==0,upx[0]==0,upx'[0]== 0,upy[0],upy'[0]},{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][[1]] ; u'[t] = Evaluate[u'[t]/.ds][[1]] ; u''[t] = Evaluate[u''[t]/.dds][[1]]; upx[t] = Evaluate[upx[t]/.s][[1]]; upx'[t] = Evaluate[upx'[t]/.ds][[1]] ; upx''[t] = Evaluate[upx''[t]/.dds][[1]]; upy[t] = Evaluate[upy[t]/.s][[1]]; upy'[t] = Evaluate[upy'[t]/.ds][[1]] ; upy''[t] = Evaluate[upy''[t]/.dds][[1]]; } 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]. Please Help me. Sung-Hwan Joo University of Oklahoma