Re: System of differential-algebraic equations
- To: mathgroup at smc.vnet.net
- Subject: [mg78328] Re: [mg78271] System of differential-algebraic equations
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Thu, 28 Jun 2007 04:30:54 -0400 (EDT)
- References: <20812896.1182941885849.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
You don't necessarily need initial conditions for the derivatives, but you DO need initial conditions that are consistent. In this case you don't have that: eqns = {m[t]*x[t] + q[t]*x[t]^2 == 2.75, (12.6/10^15)*m[t]^2 - (10.2/10^16)*m[t]*r[t] - (20.4/10^16)* m[t]*u[t]*y[t] + (20.4/10^16)*m[t]*u[t]*x[t] - (92.4084/10^15)* q[t] == 0, r[t]*(y[t] - x[t]) + u[t]*(y[t] - x[t])^2 == 0.444, (10.2/10^16)*r[t]^2 - (9.82/10^12)*r[t]* v[t] - (389.9256/10^16)*u[t] == 0, v[t] + 2*w[t]*(y[t] - 140/10^16) == 0, 0.5*Derivative[1][m][t]*x[t]^2 + m[t]*x[t]*Derivative[1][x][t] + (1/3)*Derivative[1][q][t]* x[t]^3 + q[t]*x[t]^2*Derivative[1][x][t] - (25.2/10^15)*q[t]*x[t] == 0, 0.444*Derivative[1][x][t]*0.5*r[t]*(y[t] - x[t])^2 + (1/3)* Derivative[1][u][ t]*(y[t] - x[t])^3 + (Derivative[1][y][t] - Derivative[1][x][t])*(r[t]*(y[t] - x[t]) + u[t]*(y[t] - x[t])^2) - (20.4/10^16)*u[t]*(y[t] - x[t]) == 0, 0.5*Derivative[1][v][t]*(y[t] - 140/10^16)^2 + v[t]*(y[t] - 140/10^6)*Derivative[1][y][t] + (1/3)* Derivative[1][w][t]*(y[t] - 140/10^6)^3 + (19.64/10^12)* w[t]*(140/10^6 - y[t]) + w[t]*(y[t] - 140/10^6)^2*y[t] == 0}; inits = {m[0] == 0., q[0] == 2.342*^8, r[0] == 3.7843*^7, u[0] == -1.385*^13, v[0] == 0., w[0] == 1.9856*^7, x[0] == 1.7/10^6, y[0] == 4.42/10^6}; initRules = inits /. Equal -> Rule; eqns /. {t -> 0} /. initRules {{False,False,False,False,False,-1.00331*10^-11+1.445*10^-12 m^\[Prime][0]+1.63767*10^-18 q^\[Prime][0]+0.000676838 x^\[Prime][0]==0,7.68509*10^-8+6.70788*10^-18 u^\[Prime][0]+0.000062155 x^\[Prime][0]+0.46512 (-x^\[Prime][0]+y^\[Prime][0])==0,1.66614*10^-6+9.7682*10^-12 v^\[Prime][0]-8.30741*10^-13 w^\[Prime][0]+0. y^\[Prime][0]==0}} As you can see, five equations are violated at the initial values, no matter WHAT the derivatives might be. The errors are not small, either: five = Take[eqns /. t -> 0 /. Equal -> Subtract, 5]; five /. initRules {-2.74932, -0.000021642, 0.02112, 2.00078, 175.527} So... at minimum, you need initial conditions for which the equations are solvable at 0. Bobby On Wed, 27 Jun 2007 04:29:43 -0500, José Luis Gómez <jose.luis.gomez at itesm.mx> wrote: > Dear Mathematica Group. > > > A colleague has asked me help to solve a system of 8 algebraic and > differential equations. The system is included below, at the end of this > e-mil, in InputForm. > > Mathematica 6.0 NDSolve command replies with this message: > > > NDSolve::icfail: Unable to find initial conditions which satisfy the > residual function within specified tolerances. Try giving initial > conditions for both values and derivatives of the functions. > > > Now, my colleague does not want to give initial conditions for the > derivatives, because he does not have actual information about those > values. > We fool around a bit in the documentation, play a little bit with > AccuracyGoal, and PrecisionGoal, and with different methods specified by > Method, but we were not able to obtain an answer. > > > Does anyone have a suggestion for us? Can we avoid the use of initial > values > for the derivatives? > > > The system is included below. Thanks in advance for any advice. > > > Jose Luis Gomez-Munoz > > > > > NDSolve[{m[t]*x[t] + q[t]*x[t]^2 == 2.75, > > (12.6/10^15)*m[t]^2 - (10.2/10^16)*m[t]*r[t] - > > (20.4/10^16)*m[t]*u[t]*y[t] + (20.4/10^16)*m[t]*u[t]*x[t] - > > (92.4084/10^15)*q[t] == 0, > > r[t]*(y[t] - x[t]) + u[t]*(y[t] - x[t])^2 == 0.444, > > (10.2/10^16)*r[t]^2 - (9.82/10^12)*r[t]*v[t] - > > (389.9256/10^16)*u[t] == 0, v[t] + 2*w[t]*(y[t] - 140/10^16) == > > 0, 0.5*Derivative[1][m][t]*x[t]^2 + > > m[t]*x[t]*Derivative[1][x][t] + (1/3)*Derivative[1][q][t]* > > x[t]^3 + q[t]*x[t]^2*Derivative[1][x][t] - > > (25.2/10^15)*q[t]*x[t] == 0, > > 0.444*Derivative[1][x][t]*0.5*r[t]*(y[t] - x[t])^2 + > > (1/3)*Derivative[1][u][t]*(y[t] - x[t])^3 + > > (Derivative[1][y][t] - Derivative[1][x][t])* > > (r[t]*(y[t] - x[t]) + u[t]*(y[t] - x[t])^2) - > > (20.4/10^16)*u[t]*(y[t] - x[t]) == 0, > > 0.5*Derivative[1][v][t]*(y[t] - 140/10^16)^2 + > > v[t]*(y[t] - 140/10^6)*Derivative[1][y][t] + > > (1/3)*Derivative[1][w][t]*(y[t] - 140/10^6)^3 + > > (19.64/10^12)*w[t]*(140/10^6 - y[t]) + w[t]*(y[t] - 140/10^6)^2* > > y[t] == 0, m[0] == 0., q[0] == 2.342*^8, r[0] == 3.7843*^7, > > u[0] == -1.385*^13, v[0] == 0., w[0] == 1.9856*^7, > > x[0] == 1.7/10^6, y[0] == 4.42/10^6}, {m, q, r, u, v, w, x, y}, > > {t, 0, 3600}] > > -- DrMajorBob at bigfoot.com