From: Michel T. <ta...@lp...> - 2023-02-02 20:29:50
|
Ode2 expects a differential equation in ordinary form. So "divide by dm". The documentation for ode2 says that it knows how to use the method of separation of variables. (%i1) declare(cp,constant); (%o1) done (%i2) declare(cv,constant); (%o2) done (%i3) ode2(cv*m*'diff(T,m)+(cp+cv)*T=0,T,m); (%o3) T = %c*%e^-(((cv+cp)*log(m))/cv) Le 02/02/2023 à 19:41, fi...@ig... a écrit : > Dear Maxima Users, > > in physics we often have problems which can be expressed in > differentials, like this simple example (it describes gas flow from a > leak in a pressure vessel) > > declare([cp, cv], constant); /* heat capacity */ > u : cv * T; /* spec. internal energy */ > h : cp * T; /* spec. enthalpy */ > U : m * u; /* internal energy */ > E : diff(U) = -h * diff(m); /* energy conservation */ > > (%o5) cv T del(m) + cv m del(T) = - cp T del(m) > > %o5 is actually a differential equation in T and m. It can easily be > solved by separation of variables - but how to do this using Maxima? > > Actually: how could it be solved using ode2() or how can it be > transformed such that ode2() can solve it? > > > Thanks and best regards > > > Torsten > > > -- Michel Talon |