kill(all)$

load(lrats)$

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

from :single stage rocket,version 1.0 (gravity = -g)
(see : website 'Maxima download')

start from :    'p16d'  from single stage rocket

p1:Δv = v-v0;

p1a:Δv=c*log(-(P+Mo)/(Mo*ε-P-Mo))-(Mo*g*ε)/k;

p1b:rhs(p1)=rhs(p1a);

approximation v: with v0=0,second part 'p2a' with 'g' inside small.

p1c:subst([v0=0],lhs(p1b)) =part(p1b,2,1);

rem :  v =v(c,Mo,P,ε).

p1d:rhs(p1c);

p1e:part(p1d,1);
p1f:part(p1d,2);

p1g:part(p1f,1);

p1h: (P+Mo)/(P+Mo*(1-ε));

first part      : 'p1h'
===============

p1h1:part(p1h,1);

second part : 'p1h'
================

p1h2:part(p1h,2);

rem : 'p1g'  ?  'p1h' 
================

p1i:p1g=p1h;

p1j:ratsimp(p1i);

check: 
======

p1k:is(p1j);

v:

p2:lhs(p1c)=p1e*log(p1h);

simple rule : log(x/y) = log(x)-log(y)
                         log(x*y) =log(x)+log(y)
rem : log(y/x) = -log(x/y)

y:p1h1;
x:expand(p1h2);

p3:x/y;

p4:lratsubst([y=z],p3);

p5:expand(p4);

p6:lhs(p1c) = -p1e*log(p5);

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

 v : result  ?  we will use 
====================
====================

rem : 'neg' from the 'rule'

p7: subst([z=y],p6);

paint and geogebra 5

above 'equation' ,'p7'
from Figure 1 :  
Mo = M1
v     = v1

apply : Formula single stage rocket for 'Figure 1'
=========================================

p8:subst([v=v1,Mo=M1],p7);

M1*ε    : part fuel of initial mass M1
P+ M1 :  total mass of rocket.

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

paint and geogebra 5

first        stage : initial mass M1
second stage : initial mass M2

all the fuel burnt  from M1 : 'from first stage' :  n=1
--------------------------------------------------------------------------

M1*ε                       : part fuel of initial mass M1
P+ M1+M2  = z     :  total mass of rocket.

rem : 'use' ,'p6'  => ' v => Δv1 '

p9:subst([z=P+M1+M2,Mo=M1,v=Δv1],p6);

p9a:Δv1= v1-v0;

p9b:subst([p9a,v0=0],p9);

rem : P = always constant value during the flight

 after first stage : M1 = 0,ignition of second stage.

all the fuel burnt  from M1 : 'from first stage' :  n=2
--------------------------------------------------------------------------

M2*ε              : part fuel of initial mass M2
P+M2  = z     :  total mass of rocket.

p10:subst([z=P+M2,Mo=M2,v=Δv2],p6);

p10a:Δv2=v2-v1;

p10b:subst([p10a],p10);

p10c:p10b+v1;

subst 'v1' from 'first stage'

final velocity : two stage rocket : v2
==============================
==============================

p11:subst([p9b],p10c);

rem : v2=v2(M1,M2,ε,P)

other way write ,v2 :
=================

M=M1+M2  into 'p6', M+P = total mass at 'stage 1

p12:subst([v=v1,z=M+P,Mo=M-M2],p6);

p12a:subst([p12],p10c);

M = M1+M2 =fixed 

rem : v2=v2(M2,ε,P)

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