Classroom Tips and Techniques: Stepwise Solutions in Maple - Part 1 Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft Introduction Maple's powerful mathematical engine is primarily designed to provide the results of mathematical operations. But there are commands, Assistants, Tutors, and Task Templates that show stepwise calculations in algebra, calculus (single-variable, multivariable, vector), and linear algebra. In this article we discuss Maple's functionality for providing these stepwise solutions to mathematical problems in algebra and calculus (both of one and several variables). In our next article, we will continue with stepwise tools in linear algebra and vector calculus. However, we hasten to point out that often, the underlying algorithms Maple uses are not the ones students see in their textbooks. For example, the standard calculus text contains a detailed section on methods of integration, a collection of manipulations designed to produce the antiderivatives of most of the elementary functions. Maple, on the other hand, will use a number of other devices, including the Risch algorithm, to obtain these antiderivatives. Because Maple "does" symbolic math, it is always possible to guide Maple through nearly any segment of mathematical calculations. Thus, if Maple does not have a built-in tool for displaying a calculation stepwise, the calculation can always be reduced to its rudiments by simply directing Maple to take the required steps. Stepwise Algebra Solving Equations Maple's solve and fsolve commands solve equations analytically and numerically, respectively. Stepwise solutions are provided by the Equation Manipulator, an Assistant that can be accessed either from the Tools menu, or from the Context Menu by choosing the option "Manipulate Equation." Demonstrations of stepwise equation-solving can be viewed in the recorded webinar "Clickable Calculus: Precalculus, and Calculus of One and Several Variables." Partial Fraction Decomposition The indefinite integral of the function requires the partial fraction decomposition which can also be obtained from the Context Menu under the Conversions option. A stepwise decomposition is available via the Task Template in Table 1. ToolsظTasksظBrowse: AlgebraظPartial FractionsظStepwise Stepwise Partial Fraction Decomposition Initialize Write rational function here 3 2 x C x C 4 xC 1 2 2 x C 4 x C 1 Factor Denominator Clear Write the partial-fraction decomposition template in this box 3 2 x C x C 4xC 1 2 2 x C 4 x C 1 c xC d a xC b C 2 2 x C 1 x C 4 ≡ * Check Template Fractions Clear Correct! To determine the constants, multiply both sides of the identity (*) by the denominator of the fraction on the left. Expand (Clear Parentheses) 3 Clear 2 C x C 4xC 1 3 2 3 2 a x C a xC b x C bC cx C 4c xC d x C 4d Collect Like Terms Clear 0 3 2 a C c K 1 x C K 1C b C d x C a C 4 c K 4 x K 1C b C 4 d Form Equations Clear -1 C b C 4 d aC 4c-4 -1 C b C d aC c-1 0 = 0 0 0 Solve Equations Clear ↓ a = 0, b = 1, c = 1, d = 0 Partial Fractions: Clear 3 2 x C x C 4xC 1 2 2 x C 4 x C 1 1 2 x C 4 Table 1 C = x 2 x C 1 Stepwise partial fraction Task Template The algebra for obtaining the equations that determine the coefficients is not unique. This Task Template adopts one particular strategy for this, but there are other methods. These algebraic steps can also be implemented directly in Maple, either with the appropriate commands, or even via the Context Menu, as we show in Table 2. The left-hand column in this table states the action to perform, and the right-hand column shows the effect of carrying out that instruction. The initial identity 1. Enter identity. Press Enter key. 2. Context Menu: Move to Left Left-hand Side Simplify Numerator Collectظ Coefficientsظ Solve 3. Using equation labels and the evaluation template from the Expression palette, transfer the values of the coefficients to the identity. Table 2 Stepwise partial-fractions by first principles via the Context Menu Stepwise Calculus of a Single Variable Limits The Limit Methods tutor, shown in Table 3 as a screen-shot, will guide the evaluation of a limit. This tutor is available from the Tools menu, or from the Context Menu after the Student Calculus 1 package has been loaded. Table 3 The Limit Methods tutor applied to The sequence of steps can be copied and pasted from the tutor, but that does not salvage the per-step annotations. Closing the tutor only provides the final answer, not the intermediate steps. The greatest value in the tutor seems to be its use as an experimental platform for investigating how a limit might be calculated. The annotated stepwise solution shown in Table 4 is available via the ShowSteps command, or better yet, from the Context Menu under the SolveظShow Solution Steps option (after loading the Student Calculus 1 package with the Tools menu option: Load Package). Loading Student:-Calculus1 Table 4 Stepwise limit via the SolveظShow Solution Steps option in the Context Menu Derivatives The Differentiation Methods tutor, shown in Table 5 as a screen-shot, will guide the differentiation process. This tutor is available from the Tools menu, or from the Context Menu after the Student Calculus 1 package has been loaded. Table 5 The Differentiation Methods tutor applied to The sequence of steps can be copied and pasted from the tutor, but that does not salvage the per-step annotations. Closing the tutor only provides the final answer, not the intermediate steps. The greatest value in the tutor seems to be its use as an experimental platform for investigating how a derivative might be evaluated. The annotated stepwise solution shown in Table 6 is available via the ShowSteps command, or better yet, from the Context Menu under the SolveظShow Solution Steps option (after loading the Student Calculus 1 package with the Tools menu option: Load Package). Loading Student:-Calculus1 Table 6 Stepwise differentiation via the SolveظShow Solution Steps option in the Context Menu Notice that the differentiation operator "d" is gray, not black. This indicates the inert form of the operator, obtained by applying the Context Menu: 2-D MathظConvert ToظInert Form to the operator in the Expression palette. Integrals The Integration Methods tutor, shown in Table 7 as a screen-shot, will guide the integration process. This tutor is available from the Tools menu, or from the Context Menu after the Student Calculus 1 package has been loaded. Table 7 The Integration Methods tutor applied to The sequence of steps can be copied and pasted from the tutor, but that does not salvage the per-step annotations. Closing the tutor only provides the final answer, not the intermediate steps. The greatest value in the tutor seems to be its use as an experimental platform for investigating how an integral might be evaluated. The annotated stepwise solution shown in Table 8 is available via the ShowSteps command, or better yet, from the Context Menu under the SolveظShow Solution Steps option (after loading the Student Calculus 1 package with the Tools menu option: Load Package). Loading Student:-Calculus1 Table 8 Stepwise integration via the SolveظShow Solution Steps option in the Context Menu The integral operator is not black, but gray, the inert form of the operator, obtained by applying in the Expression the Context Menu: 2-D MathظConvert ToظInert Form to the operator palette. The change annotation in Table 8 includes the required change of variable, something that the tutor does not provide. Note too, that the procedure followed by Maple is not the only method of solution. It is also possible to "factor out the 4" and set to obtain Tangent Line It is a staple of the calculus course to find the equation of the line tangent to a curve at a given point. Since this requires computing a derivative to obtain the slope of the tangent line, and a bit of algebra to simplify the point-slope form of the equation of the line, this calculation can certainly be implemented "from first principles" directly in Maple. However, as shown in Table 9, there is the Tangent Line task template, which we have used to find, at , the line tangent to . Both the solution and the details of the calculation are provided by this task template. ToolsظTasksظBrowse: CalculusظDerivativesظApplicationsظTangent Line Tangent Line 2 C xC 1 2 (Default value: ) Find Tangent Line =5xK 3 Clear Compute Details 2xC 1 5 7 Graph 5 x- 2 C 7 Clear Details Table 9 Clear Graph Equation of a tangent line by the Tangent Line task template Normal Line It is also a staple of the calculus course to find the equation of the line normal to a curve at a given point. Since this requires computing a derivative to obtain the slope of the tangent line, and a bit of algebra to simplify the point-slope form of the equation of the line, this calculation can certainly be implemented "from first principles" directly in Maple. However, as shown in , the line Table 10, there is the Normal Line task template, which we have used to find, at normal to . Both the solution and the details of the calculation are provided by this task template. ToolsظTasksظBrowse: CalculusظDerivativesظApplicationsظNormal Line Normal Line 2 C xC 1 2 (Default value: ) Find Normal Line = K 1 37 xC 5 5 Clear Compute Details Graph 2xC 1 5 7 = - Normal Line: 1 x- 2 C 7 5 Clear Details Table 10 Clear Graph Equation of a normal line by the Normal Line task template Derivative by Definition Table 11 contains the "Derivatives by Definition" task template. ToolsظTasksظBrowse: CalculusظDerivativesظDerivatives by Definition Derivatives by Definition Enter the function and the value of for which is to be obtained. 2 C 2 x a (Default value: ) Difference Quotient 2aC hC 2 Simplify Derivative 2aC 2 Clear All Table 11 The derivative of task template by definition, using the "Derivatives by Definition" Difference (or Newton) Quotient The difference (or Newton) quotient is the slope of the secant line, which, in the limit, becomes the slope of the tangent line. In essence, this is the expression whose limit yields the derivative. This calculation is captured by the Difference (or Newton) Quotient task template, as shown in Table 12. ToolsظTasksظBrowse: CalculusظDerivativesظDifference (or Newton) Quotient The Difference (or Newton) Quotient Enter the function to be evaluated, the -coordinate of the point of tangency, , and , where is the -coordinate of the point at which the secant line will be found. 3 1 1 Clear All Slope of Secant Line 7 Equation of Secant Line =7xK 6 Equation of Tangent Line =3xK 2 Launch Tutor Graph Table 12 Animation The difference quotient for Clicking the "Launch Tutor" button in the task template will launch the Tangent (Newton Quotient) tutor that is shown in Table 13. This tutor could be accessed independently from the ToolsظTutors menu. Table 13 The Tangent (Newton Quotient) tutor for Implicit Differentiation defined by the equation can be The implicit derivative of obtained with the Context Menu option "Differentiate Implicitly." It can be obtained stepwise with the task template in Table 14. ToolsظTasksظBrowse: CalculusظDerivativesظImplicit Differentiationظ Implicit Differentiation Enter an equation in two variables: 2 2 3 x C 2 x y K 5 y C 12 = 0 Clear All Dependent variable: Implicit Derivative: Independent variable: 3xC y dy = K xC 5y dx Execute Stepwise Calculation Make dependent variable explicit: 2 2 3 x C 2 x y x K 5 y x C 12 = 0 Execute Differentiate with respect d 6xC 2yx C 2x y x K 10 y x to independent variable: dx Execute Stepwise Isolate Derivative: d K 6xK 2yx yx = dx 2 x K 10 y x Execute Make independent variable dy 3xC y = K implicit: dx xK 5y Execute d yx =0 dx Table 14 Stepwise implicit differentiation via task template Clicking the "Stepwise" button will launch the Differentiation Methods tutor in which the derivative can be computed step-by-step. Riemann Sums The Riemann sum for finding the area bounded by and the -axis can be explored graphically and numerically by tutor; and analytically, by task template. Table 15 shows the Riemann Sums tutor applied to this function. Table 15 Application of the Riemann Sums tutor to the function By default, a midpoint sum is chosen, but we have elected to demonstrate the left sum. The graph divided into equal subintervals, each one supporting a rectangle shows the interval whose height is determined at the left edge of the subinterval. The area under curve is displayed, along with the approximate area, namely, the sum of the areas in the left-rectangles. Table 16 shows via task template the analytic evaluation of the corresponding Riemann sum for , arbitrary, rectangles. ToolsظTasksظBrowse: CalculusظIntegrationظRiemann SumsظLeft The Left Riemann Sum Enter : > Enter the interval : > Enter the value of : > The left Riemann sum: > Value of the Riemann > sum: > Table 16 Analytic approach to left Riemann sum for by task template Of course, the analytic expression obtained for this left Riemann sum approaches as Mean Value Theorem for The Mean Value theorem states that under suitable conditions, some in the interval . In this form, the theorem relates to the linear (or tangent line) . approximation. If rearranged to the theorem has a geometric interpretation: in the interval , there is a point where the tangent line is parallel to the secant line connecting with . This is well illustrated by the Mean Value Theorem tutor shown in Table 17, where the tutor is applied to the function on the interval . Table 17 Mean Value Theorem tutor applied to on The graph in the tutor shows the geometry - the tangent line is parallel to the secant line. The value of is also determined to be , and the linear "approximation" is exact at this value because . Table 18 contains a task template that might be a more convenient implementation of the Mean Value theorem calculations. ToolsظTasksظBrowse: CalculusظMean Value Theorem Mean Value Theorem Enter and an interval 6C x K x 2 Clear K 2 Clear a 1 Clear b Computational Mode: Analytic Numeric Mean Value Theorem Clear K 1 2 Table 18 Mean Value theorem via task template The task template has two advantages: the value of can be obtained exactly, when possible; and the display of the linear approximation is easier to read. Rolle's Theorem Rolle's theorem states that under suitable conditions, when , there is in the interval where the tangent line is horizontal, that is, where . This theorem, used to prove the Mean Value theorem, is illustrated by the graph in Table 19, constructed with the RollesTheorem command in the Student Calculus 1 package. Loading Student:-Calculus1 Table 19 Rolle's theorem illustrated by the RollesTheorem command The usage returns the value of at which the horizontal tangent is found. Table 20 contains a task template that might be a more convenient implementation of the Rolle's theorem calculations. ToolsظTasksظBrowse: CalculusظRolle's Theorem Rolle's Theorem Enter 6C x K x and an interval for which 2 Clear K 2 3 Clear a Clear b Computational Mode: Analytic Points where Numeric : 1 2 Table 20 Rolle's Theorem Clear Rolle's theorem via task template Curve Analysis In the era before the widespread availability of graphing hardware and software, a significant portion of a first calculus course was devoted to curve sketching. Surprisingly, few modern calculus texts deviate from this historic practice, in spite of the reasonable cost of graphing technology. Maple has a Curve Analysis tutor that implements its FunctionChart (equivalently, FunctionPlot) command. In addition to drawing an annotated graph, the tutor provides much of the data upon which the traditional approach to curve sketching is based. Unfortunately, when the tutor is closed, only the graph is preserved. Hence, the task template "Find Special Points on a Function" is a useful addition to the tutor. Table 21 shows the tutor applied to the function Table 21 on the interval . The Curve Analysis tutor applied to Clicking on the eight radio-buttons provides the raw data with which a graph could be sketched in the historic approach to this task. Table 22 shows, for the function some of this information being captured with a task template. ToolsظTasksظBrowse: CalculusظFind Special Points on a Function > > > > > > > Table 22 The task template "Find Special Points on a Function" applied to The graph in Table 21 shows that has three -intercepts in the interval , yet the Roots command did not find any zeros. The following modification of the Roots command yields the three -intercepts as floating-point numbers. These values are the same as those computed via Maple's solve command returns the exact solutions on the left in Table 23. Although these , they are actually real, as can be seen from their equivalents shown on solutions contain the right. Table 23 Exact zeros of the cubic function Surface Area of a Surface of Revolution The surface area of the surface of revolution formed when , is rotated about the -axis can be computed by means of the Surface of Revolution tutor, as shown in Table 24. Table 24 Surface of Revolution tutor used to obtain the surface area of a surface of revolution In addition to the graph, this tutor displays the integral whose value is the required surface area, the exact value of the integral, and its floating-point equivalent. Clicking the "Frustums" radio button and then the "Display" button will show the surface approximated by segments (frustrums) of cones. After these choices have been made, the display will include a Riemann-sum approximation corresponding to the discretization. Volume of a Solid of Revolution , is rotated about the -axis The volume of the solid of revolution formed when can be computed by means of the Volume of Revolution tutor, as shown in Table 25. Table 25 Volume of Revolution tutor used to obtain the volume of a solid of revolution. In addition to the graph, this tutor displays the integral whose value is the required volume, the exact value of the integral, and its floating-point equivalent. For a horizontal axis of rotation, the "Disks" radio button is available; for a vertical axis, the "Shells" radio button is available. If "Disks" are selected, the solid is shown segmented into the chosen number of disks, and the display will include the corresponding Riemann sum. A similar statement can be made for shells, mutatis mutandis. In either event, the corresponding Riemann-sum approximation is provided. Stepwise Calculus of Several Variables The MultiInt Command The MultiInt command of the Student Multivariable Calculus package will formulate and evaluate an iterated multiple integral. One of its output options is a display of the steps involved in executing the calculation. Table 26 shows the use of this command to evaluate the volume of the region Loading Student:-MultivariateCalculus > Table 26 Volume of the region computed stepwise by the MultiInt command The first line of the output is the unevaluated integral; and the last, the value of the integral. The second line shows the outer integral after the inner integral has been evaluated as far as the antiderivative with respect to . For this antiderivative, has been held fixed. The antiderivative must be evaluated at the limits in the inner integral. The third line shows the outer integral completely in . The fourth line is the antiderivative with respect to that must be evaluated at the limits in the outer integral. The final value is in the last line. This integration tool is available as the task template in Table 27. ToolsظTasksظBrowse: Multivariate CalculusظMultiple IntegrationظCartesian 2-D Iterated Double Integral in Cartesian Coordinates Integrand: Region: > > > > > Inert integral: > Value: > Stepwise Evaluation: > > Table 27 Access to the MultiInt command through a task template Critical Points and the Second-Derivative Test A common task in the first multivariate calculus course is the determination and classification of critical points of a multivariate function. Table 28 addresses this with a task template. ToolsظTasksظBrowse: Multivariate CalculusظCritical Points & Second Derivative Test Critical Points and the Second Derivative Test Objective Function > List of Independent Variables > Equations > Critical Points > Second Derivative > Test Hessians and their > Eigenvalues > Table 28 Finding and classifying critical points for a multivariate function The given function has two critical points, both found with the Solve command. However, the format of the solution is not "points" so the output has to put into the form of a list of lists. The second-derivative test is applied to each point. The origin cannot be classified by this test, so nothing is said about it by the test. The other point is found to be a saddle point. In the final "row" of the template, the Hessian matrix (the matrix of second derivatives) and its eigenvalues is given for each point. Since the Hessian is symmetric, the signs of its eigenvalues suffice to determine if the matrix is positive or negative definite, or even indefinite. At the origin, the Hessian has a zero eigenvalue, and is singular. That is why the origin cannot be classified by the second-derivative test. The eigenvalues at the other point are of opposite sign, so the Hessian there is indefinite. That's why the second point is a saddle. Center of Mass The Student Precalculus package contains a CenterOfMass command that will determine the center of mass of a discrete distribution of masses in . The Student Multivariate Calculus package contains a CenterOfMass command that will determine the center of mass of a or , using Cartesian, polar, spherical, or cylindrical continuous distribution of mass in coordinates. In each case, this command writes the expressions for the coordinates of the center of mass, then evaluates the integrals expressing the appropriate moments and total mass. In (Cartesian and polar), the CenterOfMass command can draw a graph of the density function over the planar region on which it is defined. All of the continuous cases are implemented in task templates. Cartesian 2-D To find the center of mass of the planar region whose density is , use the task template in Table 29. ToolsظTasksظBrowse: Multivariate CalculusظCenter of MassظCartesian 2-D Center of Mass for Planar Region in Cartesian Coordinates Density: > Region: > > > > Moments Mass: > Inert Integral - Explicit values for > and Plot: > > Table 29 Center of mass of a planar region in Cartesian coordinates The red region in the graph is the planar region whose center of mass is located at the green dot, whereas the blue surface is a graph of the density function . Polar To find the center of mass of the planar region whose density is , use the task template in Table 30. ToolsظTasksظBrowse: Multivariate CalculusظCenter of MassظPolar Center of Mass for Planar Region in Polar Coordinates Density: > Region: > > > > Moments Mass: Inert Integral - > Explicit values for and > Plot: > > Table 30 Center of mass of a planar region in polar coordinates The red region in the graph is the planar region whose center of mass is located at the green dot, whereas the blue surface is a graph of the density function . Cartesian 3-D To find the center of mass of the region whose density is , use the task template in Table 31. ToolsظTasksظBrowse: Multivariate CalculusظCenter of MassظCartesian 3-D Center of Mass for 3D Region in Cartesian Coordinates Density: > Region: > > > > > > Moments Mass > : Inert Integral - Explicit values for , , and > > Table 31 Center of mass of a spatial region in Cartesian coordinates The task template fixes the order of integration, but the CenterOfMass command will accept any of the other five possible orders for integration over a region in . Cylindrical To find the center of mass of the region , use the task template in Table 32. whose density is ToolsظTasksظBrowse: Multivariate CalculusظCenter of MassظCylindrical Center of Mass for 3D Region in Cylindrical Coordinates Density: > Region: > > > > > > Moments ÷ Mass:Inert Integral - > Explicit values > for , , and , the center of mass given in cylindrical coordinates: > Table 32 Center of mass of a spatial region in cylindrical coordinates Spherical To find the center of mass of the region whose density is , use the task template in Table 33. ToolsظTasksظBrowse: Multivariate CalculusظCenter of MassظSpherical Center of Mass for 3D Region in Spherical Coordinates ( is the colatitude, measured down from the -axis) Density: > Region: > > > > > > Moments ÷ Mass:Inert Integral - > Explicit values > for , and , the center of mass given in spherical coordinates: > Table 33 Center of mass of a spatial region in spherical coordinates Unfortunately, the value of is being computed incorrectly by the CenterOfMass command. , not . Corrected code will be available in versions of Maple In the present example, after Maple 13.02. Legal Notice: © Maplesoft, a division of Waterloo Maple Inc. 2010. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.
© Copyright 2026 Paperzz