Application Center - Maplesoft

App Preview:

Creating Maple Documents: Deriving the Rocket Equation

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application



Deriving the Rocket Equation 

© Maplesoft, a division of Waterloo Maple Inc., 2005 


Maple 10 lets you create sophisticated live documents that seamlessly integrate the mathematical results with derivations, explanations, plots, and other forms of technical knowledge.   This document develops a simple model of a rocket to illustrate the use of many of these new features.  


The following Maple features are highlighted: 

  • Document mode and document blocks

  • 2-D math editor and palettes

  • Autoexecute regions

  • Plotting

  • Tables

  • Embedded components


Visit to learn about other new features,  to watch Maple 10 Feature Demos, and take the 10 Minute Tour.   


From inside Maple 10, see Help>What's New, and Help>Take a Tour of Maple for more information. 


Throughout this document, explanations will appear in this style of text, to distinguish the explanations from the text of the example.  


This document was created in Maple 10's Document mode. Some computations are hidden from view for presentation reasons. Maple 10 uses markers to indicate the presence of hidden formatting information, including document blocks and bookmarks, in a column to the immediate left of this text.  From the View menu, ensure that the Markers entry is selected so that you can see this information. 


Initialization steps are crucial to the proper functioning of the document, but generally do not need to be seen by the reader.  In such cases,  the initialization steps can be hidden inside a document block. As well, to ensure that the necessary initialization is done before the user starts to interact with the document, these steps are put into an autoexecute region. Even people who know nothing about Maple will be able to read, interact with and modify this document once it is opened, without the need to first execute anything. The marker to the left of the blue text below indicates the presence of an autoexecute region inside a document block. 


To see inside a document block, place the cursor on the visible part of the region, and select View>Expand Document Block from the menu. Alternatively, you can right-click (control-click on Macintosh) on the marker bar beside the text, and select Document Block>Expand Document Block from the menu. 

Loading packages... done 

Loading custom procedures... done 

Problem statement 

This section demonstrates the use of tables for organizing information and layout control. This table shows borders. Further below, you will see tables where the borders are hidden. To create a table in your document, select Insert>Table from the menu. 


It also used embedded GUI controls. The user can change the values in the edit boxes, and press the button to restore the default values. Embedded GUI controls are added to a document through the use of the Components palette. 


Here are the parameters for the problem, the values for the Saturn V launch are already filled in. You can change the values if you would like to experiment with how different values change the results. To see the result of your changes, press the execute all button (!!!) in the Maple toolbar. 





To fill in the values for the Saturn V launch, click this button: 

Restore Default Values 


mass of an unfueled rocket 

Embedded component 



mass of the initial fuel 

Embedded component 



rocket's constant burn rate of fuel 

Embedded component 



constant velocity of exhaust (negative) 

Embedded component 



acceleration of gravity (negative) 

Embedded component 


We will use the formula Thrust = -b*v[e], to find the velocity v[r] of a rocket T seconds after lift off in m/s.   

Model and solution 



  • (1) Compute the net upward force on the rocket as a function of time.

  • (2) Divide the net force by the mass to get the net acceleration.

  • (3) Integrate the net acceleration from t = 0 .. T to get velocity.


In the sentence below, note that the formula calculated by Maple (in blue) appears on the same line as the initial formula entered by the author (in black). Maple 10's document mode supports inline output, so the input and output appear on the same line. Inline output allows you to reduce unnecessary whitespace and maintain the flow of your text. The Maple commands used to calculate the answer are hidden inside a document block. The document block markers show the start and finish of the document block, and can be expanded through the View menu or by right-clicking between the markers, as before. 


Enter the formula for the mass of the rocket as a function of time t, which is M = m[r]+f[0]-b*t 

M := m[r]*Unit(kg)+f[0]*Unit(kg)-Typesetting:-delayDotProduct(b*Unit(kg/s), t)*Unit(s) = (Typesetting:-mprintslash)([(m[r]+f[0]-b*t)*Unit(kg)], [(m[r]+f[0]-b*t)*Units:-Unit(kg)]) 

The inline mathematics is still live, so if you change the initial formula, by say changing m[r] to 2*m[r],  highlight the entire line, and press the ! button on the toolbar, the line will re-execute and the output will be updated appropriately. Be sure to change it back again if you wish to use the application as intended. 


Net upward force on the rocket is -b*v[e]+M*g (difference between thrust and gravity). Notice Maple automatically converts the units kg*m/s^2 to Newtons (N). 

F[net] := -Typesetting:-delayDotProduct(b*Unit(kg/s), v[e])*Unit(m/s)+Typesetting:-delayDotProduct(M, g)*Unit(m/s^2) = (Typesetting:-mprintslash)([(-b*v[e]+(m[r]+f[0]-b*t)*g)*Unit(N)], [(-b*v[e]+(m[r]+f[0]-b*t)*g)*Units:-Unit(N)]) 

a := F[net]/M = (Typesetting:-mprintslash)([(-b*v[e]+(m[r]+f[0]-b*t)*g)*Unit(m/s^2)/(m[r]+f[0]-b*t)], [(-b*v[e]+(m[r]+f[0]-b*t)*g)*Units:-Unit(m/s^2)/(m[r]+f[0]-b*t)]) 


Integrate a from t = 0 .. T to get v. 

v[r] := int(a, t = 0 .. T)*Unit(s) = (Typesetting:-mprintslash)([int((-b*v[e]+(m[r]+f[0]-b*t)*g)/(m[r]+f[0]-b*t), t = 0 .. T)*Unit(m/s)], [int((-b*v[e]+(m[r]+f[0]-b*t)*g)/(m[r]+f[0]-b*t), t = 0 .. T)*Units:-Unit(m/s)]) 

All the input equations (in black) were created using the new 2-D math editor. Integrals, superscripts, subscripts, fractions, as well as many other layouts and over a thousand different symbols are available through the palettes and keyboard commands. The mathematics is formatted as you type, so you can easily make it look just the way it would in a technical paper or text book.  You will find the list of math editor keyboard shortcuts for your platform from the Quick Help pop-up, which appears on start-up or can be invoked by selecting Help>Quick Help from the menu. 


The quantities in Unit(unit)notation represent units. These units can be added to an equation using the new Units palettes, or through the new Units context menus. Using the context menus, you can also simplify expressions involving units, convert from one system of measurement to another, or replace the displayed unit with an equivalent unit.  To see the context menu options, right-click on the Unit(m/s) unit in the output, and select Units>. 


Maple does not evaluate this integral because it results in a logarithmic term that would be infinite if the denominator were nonpositive.  Let's call int again using the continuous option.  This tells Maple not to worry about discontinuities in the integrand. 

(Typesetting:-mprintslash)([v[r] := (-v[e]*ln(-m[r]-f[0])+g*T+v[e]*ln(-m[r]-f[0]+b*T))*Unit(m/s)], [(-v[e]*ln(-m[r]-f[0])+g*T+v[e]*ln(-m[r]-f[0]+b*T))*Units:-Unit(m/s)]) 


This time, when we ask for the value of v[r], Maple gives the classic rocket equation.  Best of all, Maple carries the units through the integration, giving its symbolic answer in m/s.   


We now take the numeric values for each of the parameters from the table at the beginning of the worksheet: 


m[r], f[0], b, v[e], g := getParameters() = 0.6e6, 0.192e7, 0.16e5, -3000, -9.81 

m[r] = 0.6e6 

f[0] = 0.192e7 

b = 0.16e5 

v[e] = -3000 

g = -9.81 


How long will the fuel last?   

fuelTime := solve(f[0]-Typesetting:-delayDotProduct(b, t), t) = 120. 


The next paragraph shows another example with inline output. In this case, the number of seconds is displayed twice seamlessly inside the same paragraph. If you expand the document block, you will see that the number comes from the value of the fuelTime variable. If that variable is changed and the document re-executed, the paragraph will automatically be updated to reflect the new value. 

This provides about 120. seconds' worth of fuel.  Now let's plot the velocity as T goes from 0 to 120. seconds.  To plot an expression that has units, we must first strip off the units with the unit_free option to convert. 

vFinal := convert(v[r], unit_free) = (Typesetting:-mprintslash)([(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)], [(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)]) 

In Figure 1, we see that the rocket will  have a velocity of over 3 km/s when its fuel runs out. 


Note that the plot command itself, which is frequently of little interest to the reader,  is hidden. 

Velocity after fuel runs out 

There's a problem with the above.  We very politely asked our model for the rocket's velocity up until the time at which it runs out of fuel, 120. seconds.  But try redrawing the plot above with a maximum time greater than 120. It predicts the velocity of the rocket will become infinite! 



(Typesetting:-mprintslash)([(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)], [(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)])
(Typesetting:-mprintslash)([(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)], [(44219.30838+9424.777962*I)-9.81*T-3000*ln(-0.252e7+0.16e5*T)])


You can observe the velocity of the rocket extended beyond the point when fuel has run out by adjusting the slider bar below.  Move the slider to pick the maximum time for plotting.  

Minimum Time: Embedded component 

Maximum Time: Embedded component 

Embedded component 

This plot is controlled by a slider. When the sliders are moved, the curve is updated. Along with sliders, edit boxes, buttons and plot regions, you can also embed toggle buttons, check boxes, list boxes, and math edit boxes in which 2-D math can be entered and displayed. 


The plot has been placed to the right of the sliders that are used to control it. This layout has been done by using a table. If you move your mouse over the table, you will see where the hidden borders lie.  Tables can be embedded inside cells of other tables, and you can set the visibility of each table's exterior and interior borders. In this way, you can control the layout,  placement and appearance of text, plots and other objects in your documents. 


The problem is with our mathematical model.  We defined M to be m[r]+f[0]-b*t without any bounds on t.  But as t increases, this formula says that M shrinks to zero and then becomes negative! We can plug this hole in our model using Maple's handy piecewise command. 

(Typesetting:-mprintslash)([M := (0.6e6+(PIECEWISE([0.192e7-0.16e5*t, t < 120.0000000], [0, otherwise])))*Unit(kg)], [(0.6e6+piecewise(t < 120.0000000, 0.192e7-0.16e5*t, 0))*Units:-Unit(kg)]) 


But the mass formula is not the only difficulty.  The net acceleration on the rocket becomes just g when the fuel runs out.  So we need to modify our force equation as well.  

Rewrite the formula for the velocity of the exhaust using the
piecewise command, assuming that the exhaust velocity is still v[e] for as long as the fuel holds out.  

(Typesetting:-mprintslash)([velExhaust := PIECEWISE([-3000, t < 120.0000000], [0, otherwise])], [piecewise(t < 120.0000000, -3000, 0)]) 

(Typesetting:-mprintslash)([F[net] := (-0.16e5*(PIECEWISE([-3000, t < 120.0000000], [0, otherwise]))-0.5886e7-9.81*(PIECEWISE([0.192e7-0.16e5*t, t < 120.0000000], [0, otherwise])))*Unit(N)], [(-0.16e5...
(Typesetting:-mprintslash)([F[net] := (-0.16e5*(PIECEWISE([-3000, t < 120.0000000], [0, otherwise]))-0.5886e7-9.81*(PIECEWISE([0.192e7-0.16e5*t, t < 120.0000000], [0, otherwise])))*Unit(N)], [(-0.16e5...

a := F[net]/M = (Typesetting:-mprintslash)([(-0.16e5*(PIECEWISE([-3000, t < 120.0000000], [0, otherwise]))-0.5886e7-9.81*(PIECEWISE([0.192e7-0.16e5*t, t < 120.0000000], [0, otherwise])))*Unit(m/s^2)/(0.6e6+(PIECEWISE... 



Integrating the modified expression of the acceleration to obtain the velocity: 


(Typesetting:-mprintslash)([v[r] := ((17257.71792+9424.777961*I)+(PIECEWISE([-9.810000000*T-3000.*ln(-315.+2.*T), T < 120.], [-9.810000000*T+(-12952.46434-9424.777961*I), 120. <= T])))*Unit(m/s)], [((... 

m[r], f[0], b, v[e], g := getParameters() = 0.6e6, 0.192e7, 0.16e5, -3000, -9.81 

m[r] = 0.6e6 

f[0] = 0.192e7 

b = 0.16e5 

v[e] = -3000 

g = -9.81 

(Typesetting:-mprintslash)([vFinalFixed := (17257.71792+9424.777961*I)+(PIECEWISE([-9.810000000*T-3000.*ln(-315.+2.*T), T < 120.], [-9.810000000*T+(-12952.46434-9424.777961*I), 120. <= T]))], [(17257.... 


This is more realistic.  After the fuel runs out, the velocity decreases linearly with time. 



Move the slider to adjust the maximum time shown in the plot. 


Minimum Time: Embedded component 

Maximum Time: Embedded component 

Embedded component 

Maple 10 allows you to add grid lines to your 2-D plots. You can add grid lines through the plot command, the plot builder, the context menus, or simply by clicking on the Image  button on the toolbar, which acts as a grid line toggle. 

Investigate the relationship between the mass and velocity of the rocket 

Here we show how the velocity of a rocket changes from its launch time into its time in space. We also show the differences in velocity caused by having a lighter or heavier initial mass. 

We use the following formula for the velocity: 

(Typesetting:-mprintslash)([3000*ln(-mass-1920000.00)+(PIECEWISE([-9.81*T-3000*ln(-mass-1920000.00+16000*T), T <= 120], [-9.81*T-3000*ln(-mass), otherwise]))], [3000*ln(-mass-1920000.00)+piecewise(T <... 

You can use the below sliders to pick the time interval to show in the plot. Enter the range of masses for the rocket in the text boxes. 

Minimum Time: 

Embedded component 

Maximum Time: 

Embedded component 

Minimum Mass: 

Embedded component 

Maximum Mass: 

Embedded component 

Mass:Embedded component 


As the mass increases from (Typesetting:-mprintslash)([300000*Unit(kg)], [300000*Units:-Unit(kg)]) to(Typesetting:-mprintslash)([300001*Unit(kg)], [300001*Units:-Unit(kg)]), the maximum velocity drops down from (Typesetting:-mprintslash)([4827.24000*Unit(m/s)], [4827.24000*Units:-Unit(m/s)]) to (Typesetting:-mprintslash)([4827.23133*Unit(m/s)], [4827.23133*Units:-Unit(m/s)]).  The maximum velocity for a lighter rocket is higher than that for a heavier one (as expected). 

Embedded component 



Other new plotting features include logarithmic axes and glossiness of 3-D plots, as seen in the plot above. To add glossiness to a 3-D plot, first add a lighting model. Like other plot options, you can set these options programmatically or interactively using the context menus.  To set glossiness using the context menu, right-click on the plot, and then choose Lighting> to select a lighting model. Right-click again and choose Glossiness... The amount of glossiness is controlled by a slider.  


More information about Maple 10 can be found at  


Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.