kill(all)$

load(lrats)$

n stage rocket,version 1.0 (gravity = -g)
peter.vlasschaert@gmail.com,23/07/2018.

formula : single stage rocket ( n=1)
=============================

one        stage : initial mass M1

paint and geogebra

p1:v1=-c*log(1-(M1*ε)/(P+M1));

double stage rocket , ( n =2 ).
========================

first        stage : initial mass M1
second stage : initial mass M2, M1=0

p2:v1=-c*log(1-(M1*ε)/(P+M2+M1));
p2a:v2=-c*log(1-(M1*ε)/(P+M2+M1))-c*log(1-(M2*ε)/(P+M2));

rem: vi=v[i], i=1,2,3,..,n

three stage rocket , ( n =3 ).
========================

first        stage : initial mass M1
second stage : initial mass M2  ,M1=0
thrid       stage : initial mass M3 , M1=0,M2=0

p3:v[1]=-c*log(1-(M1*ε)/(P+M3+M2+M1));
p3a:v[2]=-c*log(1-(M1*ε)/(P+M3+M2+M1))-c*log(1-(M2*ε)/(P+M3+M2));
p3b:v[3]=-c*log(1-(M1*ε)/(P+M3+M2+M1))-c*log(1-(M2*ε)/(P+M3+M2))-c*log(1-(M3*ε)/(P+M3));

p4:Δv [i]:=v[i]-v[i-1];

p4a:'Δv[1] =subst([v[0]=0,v[1]=rhs(p3)],Δv[1] );
p4b:'Δv[2] =subst([v[1]=rhs(p3),v[2]=rhs(p3a)],Δv[2] );
p4c:'Δv[3] =subst([v[2]=rhs(p3a),v[3]=rhs(p3b)],Δv[3] );

rem : use general formula 'p4'  always v[0] = 0, see  'p4a'

To write general Formula v[j] ?
rem Mi=M[i], i=1,2,3,...,n   'index : formula'

example : four stage rocket ?  n=4 , (with payload = P)
=============================================

first        stage : initial mass M[1]
second stage : initial mass M[2]  ,M[1]=0.
thrid       stage : initial mass M[3] , M[1]=0,M[2]=0.
fourth    stage  : initial mass M[4] , M[1]=0,M[2]=0,M[3]=0.

n:4;

general formula : v[j] , j=1,2,3,..,n, n = number of stages.
==============================================

v[j]:=sum(-c*log(1-(ε*M[i])/(P+sum(M[k],k,i,n))),i,1,j);

result: j=1,2.

p5aa:'v[1]=v[1];

p5bb:'v[2]=v[2];

final velocity ,four stages rocket with payload = P
==========================================

p5a:'v[4] =v[4];

calculation : Δv[4]
===============

use : 'p4'

p5b:'v[3] =v[3];

result :

'Δv[4] =subst([p5a,p5b],Δv[4] );

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------