MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Solution for a System of ODEs and equations



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
>
>




  • Prev by Date: Re: ListPlot?
  • Next by Date: Re: A Bug / Feature
  • Prev by thread: Re: Solution for a System of ODEs and equations
  • Next by thread: Ln series