Re: Solution for a System of ODEs and equations
- To: mathgroup@smc.vnet.net
- Subject: [mg12607] Re: [mg12560] Solution for a System of ODEs and equations
- From: "Jrgen Tischer" <jtischer@pitagoras.univalle.edu.co>
- Date: Mon, 25 May 1998 14:25:17 -0400
Hi Vivek, maybe this example helps. It's just an idea how to handle such equations. First I differentiate equation 3: In[1]:= Thread[(D[#1, t] & )[m[t]*Log[m[t]] == x[t]*y[t]]] Out[1]= m'[t]+Log[m[t]]m'[t]==y[t]x'[t]+x[t]y'[t] Now I add this equation to the two existing, add initial conditions and solve it by NDSolve. In[2]:= NDSolve[{x'[t] == x[t] + y[t], y'[t] == m[t]*(-x[t] + y[t]), m'[t] + Log[m[t]]*m'[t] == y[t]*x'[t] + x[t]*y'[t], x[0] == 0, y[0] == 1, m[0] == 1}, {x, y, m}, {t, 0, 1}] Out[2]= {{x -> InterpolatingFunction[], y -> InterpolatingFunction[], m -> InterpolatingFunction[]}} Jrgen -----Original Message----- From: Vivek Pai <engp7696@leonis.nus.edu.sg> To: mathgroup@smc.vnet.net Subject: [mg12607] [mg12560] Solution for a System of ODEs and equations >Please help if possible: > >I have the following problem : > >I need to Solve two ordinary differential equations combined with a >trancedental equation for eg : > >dx/dt = f(x,y); (1) >dy/dt = m g(x,y); (2) > >and > >m Log(m) = xy; (3) > > >In other words I do not have an explicit expression for 'm' to be >introduced into equation 2. > >Can Mathematica help me with a simple 3 or 4 line code. > >Regards > >