Student[Calculus1][Rule]  apply a rule to a Calculus1 problem

Calling Sequence


Rule[rule](expr, opn)


Parameters


rule



(optional) specify the rule to apply

expr



algebraic or algebraic equation; select the problem to request a rule for

opn



(optional) symbol; specify the problem type





Description


•

See SingleStepOverview for an overview of the singlestepping (or stepbystep) functionality of the Calculus1 package.

•

The Rule[rule](expr) command applies the specified rule to the problem matching expr. If no problem in the Calculus1 table of problems for the current session matches expr, a new problem is created for this expression, and then the rule is applied. The parameter expr must be a(n):

1.

New problem (typically an expression of the form Diff(...), Int(...), or Limit(...))

2.

Output from a previous invocation of Rule

4.

Subproblem label, as displayed by a call to ShowIncomplete (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 Rule.)

5.

NULL; that is, the invocation is Rule[](expr)  all relevant understood rules are applied to expr (see Understand and SingleStepOverview)

6.

Name (for example, power or sin)  the named rule is applied

7.

Name followed by the parameters required by the rule with that name (for example, )  the named rule is applied, using the parameters as needed

8.

List whose entries comprise one of the previous forms  the action taken is the same as if the list structure were not present

9.

Expression sequence of lists of the previous form  the action taken is determined by the first list

•

The output from a call to Hint can always be used as the rule parameter to Rule.

•

The Rule[rule](expr, opn) command applies the specified rule to the problem matching expr, setting the operation type for the problem to be opn if this is a new problem. If expr matches a problem in the Calculus1 table of problems for the current session, the opn parameter is ignored (that is, you cannot change the operation type of an existing problem).


It may be necessary to use this form of the Rule command if expr contains more than one Calculus1 operation type, for example, . If expr specifies only a single operation type, the opn parameter can be omitted.

•

When you invoke Rule additional times on a problem, it generally applies additional rules to the same subproblem (or one of its subproblems) to which it applied previous rules. For example, in the sequence

>

Rule[`+`](Diff(x^2+sin(x)*x^2, x));

 (1) 
 (2) 
 (3) 

the power rule is applied to the second term (the one that originally multiplied the term) because it is a subproblem of the subproblem to which the previous rule (the product rule) was applied.


You can control the subproblem to which Rule applies a rule by specifying a subproblem label as the expr parameter. (See ShowIncomplete and SingleStepOverview.) This functionality must be used when a rule can be applied to multiple subproblems, for example, a change of variables rule if there is more than one incomplete integral in the problem.


Note: If you focus on a part of a problem by using a subproblem label as the expr argument, the output from Rule shows only the current state of that subproblem. Subsequent Rule calls are also applied to that subproblem until it is solved, or you explicitly request a different problem or different part of the current problem using GetProblem. When a subproblem is completed, its results are substituted into the larger problem, and the focus moves to the problem at the next point where a subproblem is incomplete.

•

When you invoke Rule[rule](expr) to apply rule to the problem referenced by expr, the Rule routine first checks to ensure that the requested rule can, in fact, be applied to this problem. If it can, the rule is applied. Next, the routine applies the rules currently in the understood rules list for the corresponding operation to the problem. This allows you to request that rules that you understand well be automatically applied, letting you focus on new rules and techniques. See Understand for more information about this functionality.

•

The application of a rule by the Rule command can result in a complicated expression. The Rule routine attempts to keep expressions as simple as possible, but you may need to adjust the form of the problem after the invocation of Rule returns. Any of the main Maple routines, such as normal, simplify, or expand, can be applied to the output from Rule. These operations do not change the internal representation of the problem. That is, the GetProblem() command returns the form of the problem before the main Maple command. However, the Rule routine recognizes that you are continuing to work on the same problem, and works with the new form of the problem returned by the main command, provided you pass the complete equation output to the call to the main Maple command. See the Examples below.

•

The command ShowSolution can be used to complete the solution to a problem from its current state.

•

The application of a rule by a call to Rule can be reversed by calling Undo. Note that this is not the same as reverting a change of variables substitution by using the revert rule. To undo a change of variables substitution before performing the integration (or limit), you must use Undo. To revert a substitution to complete a problem after the integration (or limit) has been computed in the new variable, use Rule[revert](expr).

•

It is recommended that you use the Maple userinfo system, by setting infolevel[Student] := 1 or infolevel[Student[Calculus1]] := 1. This displays informative messages in the form of userinfo output from Calculus1 routines as you solve complicated problems.



Examples


>


>


>


 (4) 
To ensure that the change of variables is applied to the correct subproblem, use a subproblem label.
>


 (5) 
>


Applying substitution x = 1/2*u, u = 2*x with dx = 1/2*du, du = 2*dx
 
 (6) 
>


 (7) 
>


 (8) 
After we apply the revert rule, this subproblem is complete. Therefore, the focus moves to the larger problem.
>


Reverting substitution using u = 2*x
 
 (9) 
>


 (10) 
>


 (11) 
>


 (12) 
>


 (13) 
>


Creating problem #2
Hints:
1. Use the substitution x^2+1 = u^2.
2. Note that the derivative of x^2+1 is 2*x, so we can make a change of variable.
3. Integrals involving expressions of the form sqrt(a^2x^2) can often be simplified using the substitution u = sqrt((ax)/(a+x)).
 
 (14) 
There are multiple hints. Try the first hint.
>


Applying substitution x = (u^2+1)^(1/2), u = (x^2+1)^(1/2) with dx = 1/(u^2+1)^(1/2)*u*du, du = x/(x^2+1)^(1/2)*dx
 
 (15) 
To try other hints, use the Undo command, and then the Rule command.
>


 (16) 
>


Applying substitution x = (u+1)^(1/2), u = x^2+1 with dx = 1/2/(u+1)^(1/2)*du, du = 2*x*dx
 
 (17) 
>


 (18) 
To simplify the integrand, use the main expand command.
>


 (19) 
>


 (20) 
>


 (21) 
>


 (22) 
>


 (23) 
>


 (24) 
>


 (25) 
>


 (26) 
>


 (27) 
>


Creating problem #5
Rewrite the expression as an exponential to prepare for using l`Hopital's rule
 
 (28) 
>


 (29) 
>


 (30) 
>


 (31) 
Maple returns an error if the operation type is ambiguous.
>


>


 (32) 


See Also


diff, DiffTutor, Int, IntTutor, Limit, LimitTutor, Student, Student[Calculus1], Student[Calculus1][DiffRules], Student[Calculus1][IntRules], Student[Calculus1][LimitRules], Student[Calculus1][SingleStepOverview]

