Re: Rocket science!
- To: mathgroup at smc.vnet.net
- Subject: [mg23864] Re: Rocket science!
- From: Hendrik van Hees <h.vanhees at gsi.de>
- Date: Thu, 15 Jun 2000 00:51:04 -0400 (EDT)
- Organization: GSI Darmstadt
- References: <8i1t1n$jmc@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Anders Andersen wrote:
>
> Hi!
>
> I'm trying to solve a partial differential equation for the velocity and
> mass of a rocket, but i don't know how do this in Mathematica (3.0). The
> equation is:
>
> m*(dv/dt) = -m*g - u*(dm/dt)
>
> Where d is the derivative, g = 9.8 m/s and u is som velocity less than about
> 5000 m/s. The start velocity is v(0) = 0 and the start mass is m(0) =
> "initial mass of rocket including fuel".
You've to write v*(dm/dt) on the rhs of your equation. It is of course
noting than Newton's 1st law of mechanics in its only correct and
complete form, namely
dp/dt=-m*g
As your example nicely shows the usually used description m dv/dt on the
right hand side is only true if m is const.
In Mathematica you only need to call
DSolve[m[t] D[v[t],t]==-m[t] g-v[t] D[m[t],t],v[t],t]
This tells Mahematica to solve the differential equation in the first
entry to the function v[t] while the independent variable is t. The
result is a list with substitution rules for (hopefully all) the
solutions of your differential equation.
C[1] g Integrate[m[DSolve`t], {DSolve`t, 0, t}]
{{v[t] -> ---- - ------------------------------------------}}
m[t] m[t]
In your case it's a linear differential equation of first order and
according to general theorems about these type of ode's it has only this
solution. C[1] is a integration constant which can be fixed with a given
initial condition.
Suppose you use the initial condition v[0]=0 then you can call DSolve as
follows:
DSolve[{m[t] D[v[t],t]==-m[t] g-v[t] D[m[t],t],v[0]==0},v[t],t]
which leads to the correct solution
g Integrate[m[DSolve`t], {DSolve`t, 0, t}]
{{v[t] -> -(------------------------------------------)}}
m[t]
--
Hendrik van Hees Phone: ++49 6159 71-2751
c/o GSI-Darmstadt SB3 3.183 Fax: ++49 6159 71-2990
Planckstr. 1 mailto:h.vanhees at gsi.de
D-64291 Darmstadt http://theory.gsi.de/~vanhees/index.html