Overview of Single Step Computation in Calculus1See Student[Calculus1] for a general introduction to the Calculus1 subpackage of the Student package and a list of single-step routines.The single step functionality of the Calculus1 package enables you to solve a single-variable calculus computation one step at a time.Single-step functionality is available for the three main types of single-variable calculus problems: differentiation, integration, and limit.To perform a single step of a calculation, use the Rule routine with two parameters: the rule to apply and the expression to which it is applied. The rule is specified by an index (in brackets) to the Rule command and the expression is passed as the argument. For example, to apply the sum rule to the expression NiMtSSVEaWZmRzYiNiQsJiokSSJ4R0YlIiIjIiIiRilGK0Yp, enter:Rule[sum](Diff(x^2+x,x));The normal output from Rule is an equation where the left-hand side is the original form of the problem and the right-hand side is the form of the problem after applying the rule. This output can be passed as the argument to another Rule call, the output of which has the same left-hand side and the right-hand side reflects the next rule application.For detailed information on rules for differentiation, integration, and limits, see Differentiation Rules, Integration Rules, and Limit Rules.The Calculus1 package maintains a table of problems that have been defined in single-step mode. When Rule is invoked, its argument is checked to verify whether it matches a problem in this table. If it does not, a new entry is created for this expression in the problems table before the rule is applied. The problems table is not directly available to you (it is a private member of the Calculus1 module), but you can refer to problems in the table using commands in the package. For example, to display the current state of problem #3, enter Show(3).A Short ExampleGetting InformationLearningMore Details and CautionsExample Worksheet

<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">A Short Example</Text-field>Note: Before using the various commands from the Calculus1 package, execute the command with(Student[Calculus1]) (or with(Student:-Calculus1)) so that the short form names of the package commands are available.with(Student[Calculus1]):infolevel[Student[Calculus1]] := 1:Rule[sum](Diff(x^2+x*sin(x),x));Rule[power](Rule[product](The first step in a single-step computation is the entry of an expression which is an inert form of a limit, differentiation, or integration problem, for example, NiMtSSZMaW1pdEc2JEkqcHJvdGVjdGVkR0YmSShfc3lzbGliRzYiNiUqJkkieEdGKCIiIi1JI2xuRzYkRiZGJzYjRitGLC9GKyIiIUkmcmlnaHRHRig=, NiMtSSVEaWZmRzYkSSpwcm90ZWN0ZWRHRiZJKF9zeXNsaWJHNiI2JCokSSJ4R0YoIiIjRis=, or NiMtSSRJbnRHNiRJKnByb3RlY3RlZEdGJkkoX3N5c2xpYkc2IjYkKiZJInhHRigiIiItSSRzaW5HNiRGJkYnNiNGK0YsL0YrOyIiIUYs. In the previous example, the first call to Rule creates a new problem in the package problems table, determines that it is a differentiation problem, and then applies the sum rule for differentiation.At any time, you can obtain the final answer by using value. You can also ask to see the complete solution using the ShowSolution command.You can also undo one or more steps of a problem (back to its original form) by using the Undo command. This command allows you to experiment, which is useful in the study of integration techniques when it is not obvious which rule to apply.If you do not know which rule to apply next in a single-step computation, ask for a hint by using the Hint command. The output from Hint can be used as the rule parameter in a call to Rule.It is recommended that you use the Maple infolevel facility by setting infolevel[Student] := 1 or infolevel[Student[Calculus1]] := 1. This displays informative messages from Calculus1 routines. In particular, explanatory text describing complicated hints is provided using this mechanism.Create a new problem.Int(x*cos(x), x);Hint(Rule[At this point you can continue working with this problem, return to the previous problem, get state information about either problem, or start a new problem.Finish problem #2.Rule[sin]();Return to problem #1.GetProblem(1, internal);Apply the identity rule.Rule[identity]();Show the unsolved subproblem.ShowIncomplete();Apply the sin rule.Rule[sin]();Use the Show routine to display the current state of problem #2.Show(2);Create a new limit problem and apply the addition rule.Rule[`+`](Limit(x^2+exp(x), x=1));
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk1">Getting Information</Text-field>There are three commands in the Calculus1 package that you can use to obtain information about the current state of any or all problems that are defined in a Maple session: Show, ShowSteps, and ShowIncomplete. Show is used to display the current state of a problem. ShowSteps displays all the steps between the initial and current state of the problem. ShowIncomplete is explained in the following paragraphs.Each problem in the Calculus1 internal problems table is represented in a form that package routines use to determine, for example, when rules are applied or what is displayed. In particular, each incomplete subproblem of a problem is assigned a label. The ShowIncomplete command displays these subproblems with their labels.You can refer to a subproblem directly by using its label as the argument to package routines, for example, Rule, Show, ShowIncomplete, and GetProblem. This focuses the corresponding routine on a particular subproblem and its subproblems, if any. In integration, differentiation, or limit problems, if a rule applies to more than one subproblem of the current problem, use the ShowIncomplete command to select a subproblem. For example:Int(sin(2*x) + cos(3*x),x);Rule[`+`]();ShowIncomplete();Rule[change, u=3*x](%Int14);Note: The displays produced by these three commands are printed only; they are not the return values of the commands. The return values are NULL. This means, for example, that the value of the history variable, %, is not changed by these commands. (ShowIncomplete takes an option that requests that it return its output as the value of the routine; if this option is given, the history variable is updated.)Note: Treat subproblem labels as temporary objects because the application of a rule to a problem can change the underlying problem representation, and hence the subproblem labels. It is recommended that you call ShowIncomplete to verify the value of a label before passing it to a command.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk2">Learning</Text-field>The methods of single-variable calculus computation proceed from simple (for example, the constant rule for limits) to challenging (for example, change of variables for integration). It would be tedious if you were required to explicitly apply the elementary rules when learning the more advanced methods.The Calculus1 package provides the Understand command to alleviate this problem. For example, if you execute the NiMtSStVbmRlcnN0YW5kRzYkSSpwcm90ZWN0ZWRHRiYvSSttb2R1bGVuYW1lRzYiSSpDYWxjdWx1czFHNiQvRihJKFN0dWRlbnRHNiRGJkkoX3N5c2xpYkdGKUYmNiZJJURpZmZHNiRGJkYvSSljb25zdGFudEdGJkkjYypHRilJIitHRiY= command, whenever you invoke Rule on a differentiation problem it automatically checks whether one or more of the constant, constantmultiple, or sum rules can also be applied. You can apply just the understood rules to a problem by calling Rule with an empty index (that is, as NiMtJkklUnVsZUc2JEkqcHJvdGVjdGVkR0YnL0krbW9kdWxlbmFtZUc2IkkqQ2FsY3VsdXMxRzYkL0YpSShTdHVkZW50RzYkRidJKF9zeXNsaWJHRipGJ0YqNiNJJWV4cHJHRio=).Understand(Diff, constant, `c*`, `+`);Create a new problem. The understood rules are automatically applied.Rule[](Diff(3*sqrt(x)-sin(x), x));Create a new problem.Diff(sqrt(x^2+1), x);Request a hint.Hint();Apply the hint.Rule[]();Note: The sum and constant rules have been applied to the derivative of the inner expression.Rule[`^`]();
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk3">More Details and Cautions</Text-field>
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk4">Internal Representation of Problems</Text-field>The Calculus1 package attempts to keep expressions as simple as possible. However, for example, after a change of variables rule is applied to an integral, the resulting integrand may not be simplified. In such circumstances, it may be beneficial to apply standard Maple commands (for example, normal, simplify, or expand) to the output of the Rule command; the symbolic option, available with certain of these commands, and the assuming operator may be helpful.These commands have no effect on the left-hand side of any equation returned by Rule. Although the displayed form of a left-hand side is typically a standard limit, derivative, or integral, the underlying representation of this object is different. If you use the lprint command, Maple displays its structure, which is similar to:NiMvLUkwQ0FMQ1VMVVMxT0JKRUNURzYiNiQ3JSIiIjciRio8I0kieEdGJkkkLi4uRzYkSSpwcm90ZWN0ZWRHRi9JKF9zeXNsaWJHRiY=This underlying representation allows the package to continue solving a problem after you apply a command, such as normal or simplify, to an expression before passing it to Rule. Thus, always pass the entire equation as the argument to Rule, not just its right-hand side.Most Maple commands do not accept CALCULUS1OBJECTs (the exceptions are diff, int, limit, and series). To work with both sides of an equation returned by a call to Rule, first transform its left-hand side into standard form by using the GetProblem routine (without the internal option).To use GetProblem to change the current problem or recover the current problem (see the following paragraph), use the internal option to ensure that the equation returned uses the CALCULUS1OBJECT representation for its left-hand side.If you create a problem by passing the first reference to an expression directly to Hint, there is no representation of the problem outside the internal Calculus1 problems table. That is, there is no reference to it. Use GetProblem(internal) to pass the problem as an argument to Rule.Hint(Limit(x*ln(x), x=0, right));Rule[](GetProblem(internal));
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk5">Internal State of Problems</Text-field>As discussed above, you can apply standard Maple commands, such as normal or expand, to the output from a Rule call. However, because these commands are not part of the Calculus1 package, they do not modify the internal state of a problem. Therefore, if you follow such a command with GetProblem(), the state of the problem is as it was after the last Rule call. Similarly, if you use Show, ShowSteps, or ShowIncomplete, you do not see the result of the standard Maple command.However, as noted previously, if you pass the result of the application of a standard Maple command to Rule or Hint, the internal state of the problem is updated with this new state before the command runs.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk6">Multiple Hints</Text-field>For challenging problems, a call to Hint may return more than one suggestion. The value returned from the call to Hint is then an expression sequence of lists, where each list is a rule.You can simply refer to this list as % in the index to Rule; in this case, Rule uses the first rule in the sequence. This means that the construct Rule[Hint(%)](%) is always valid (assuming that % refers to a calculus problem that is valid input to Rule).You can also select other hints by referring to %[2] or %[3], for example.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk7">Example Worksheet</Text-field>For more introductory examples, see Calculus1 Single Stepping Example Worksheet.The following is a list of the available Student[Calculus1] single-stepping routines.

See AlsoCalculus1 Single Stepping Example WorksheetStudentStudent[Calculus1]Student[Calculus1][InteractiveOverview]Student[Calculus1][VisualizationOverview]userinfo