Rule - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[Calculus1]

  

Rule

  

apply a rule to a Calculus1 problem

 

Calling Sequence

Parameters

Description

Examples

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 single-stepping (or step-by-step) 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

3. 

Output from a call to GetProblem

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.)

• 

This command can be applied interactively by using the DiffTutor, IntTutor, or LimitTutor.

• 

The rule must be a(n):

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, change,u=2x) - 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

  

For information about the available built-in rules that can be applied to the various types of calculus problems, see Differentiation Rules, Integration Rules, and Limit Rules.

• 

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, ⅆⅆxx+fx+xⅆx.  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));

ⅆⅆxx2+sinxx2=ⅆⅆxx2+ⅆⅆxsinxx2

(1)

Rule[`*`]((1));

ⅆⅆxx2+sinxx2=ⅆⅆxx2+ⅆⅆxsinxx2+sinxⅆⅆxx2

(2)

Rule[`^`]((2));

ⅆⅆxx2+sinxx2=ⅆⅆxx2+ⅆⅆxsinxx2+2sinxx

(3)
  

the power rule is applied to the second x2 term (the one that originally multiplied the sinx 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 commands Show, ShowSteps, and ShowIncomplete can be used to obtain information about the current state of a problem.

• 

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

withStudentCalculus1:

infolevelStudentCalculus11:

Rule`+`Intx2+sin2x,x

Creating problem #1

x2+sin2xⅆx=x2ⅆx+sin2xⅆx

(4)

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

ShowIncomplete

Int2=x2ⅆx

Int3=sin2xⅆx

(5)

Rulechange,u=2x%Int3

Applying substitution x = 1/2*u, u = 2*x with dx = 1/2*du, du = 2*dx

sin2xⅆx=sinu2ⅆu

(6)

Rule`c*`

sin2xⅆx=sinuⅆu2

(7)

Rulesin

sin2xⅆx=cosu2

(8)

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

Rulerevert

Reverting substitution using u = 2*x

x2+sin2xⅆx=x2ⅆxcos2x2

(9)

Rule`^`

x2+sin2xⅆx=x33cos2x2

(10)

UnderstandDiff,constant,`c*`,`+`,identity

Diff=constant,constantmultiple,sum,identity

(11)

UnderstandInt,constant,`c*`,`+`

Int=constant,constantmultiple,sum

(12)

Intxsqrt1x2,x=a..b

abxx2+1ⅆx

(13)

hHint

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^2-x^2) can often be simplified using the substitution u = sqrt((a-x)/(a+x)).

hchange,x2+1=u2,u,change,u=x2+1,u,change,u=1x1+x,u

(14)

There are multiple hints. Try the first hint.

Rule

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

abxx2+1ⅆx=b2+1+a2+1

(15)

To try other hints, use the Undo command, and then the Rule command.

Undo

abxx2+1ⅆx

(16)

Ruleh2

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

abxx2+1ⅆx=a2+1b2+11uⅆu2

(17)

RuleIntexpx+lnx,x

Creating problem #3

ⅇx+lnxⅆx=ⅇx+lnxⅆx

(18)

To simplify the integrand, use the main expand command.

expand

ⅇx+lnxⅆx=ⅇxxⅆx

(19)

Ruleparts,x,expx

ⅇx+lnxⅆx=ⅇxxⅇxⅆx

(20)

Ruleexp

ⅇx+lnxⅆx=ⅇxxⅇx

(21)

ShowSteps

ⅇx+lnxⅆx=ⅇxxⅇxⅆxparts,x,ⅇx=ⅇxxⅇxexp

(22)

RulechainDiffsinx2+3x,x

Creating problem #4

ⅆⅆxsinx2+3x=ⅆⅆ_X0sin_X0_X0=x2+3x|ⅆⅆ_X0sin_X0_X0=x2+3xⅆⅆxx2+3

(23)

Rulesin

ⅆⅆxsinx2+3x=cosx2+3xⅆⅆxx2+3

(24)

Rulepower

ⅆⅆxsinx2+3x=cosx2+3x2x+3

(25)

UnderstandLimit,constant,`c*`,`+`,`^`,exp

Limit=constant,constantmultiple,sum,power,exp

(26)

Limit1+1tt,t=

limt1+1tt

(27)

Hint

Creating problem #5

Rewrite the expression as an exponential to prepare for using l'H\303\264pital's rule

rewrite,1+1tt=ⅇtln1+1t

(28)

Rule

limt1+1tt=ⅇlimttln1+1t

(29)

Hint

lhopital,ln1+1t,lhopital,t

(30)

Rule

limt1+1tt=ⅇlimttt+1

(31)

Maple returns an error if the operation type is ambiguous.

Rule`+`Diffx+Intx+cosx,x,x

Error, (in Student:-Calculus1:-Rule[`+`]) unable to determine which calculus operation is being applied in this problem; you can provide this information as the 2nd argument on your call to Rule or Hint

Rule`+`Diffx+Intx+cosx,x,x,Int

Creating problem #6

ⅆⅆxx+x+cosxⅆx=xx+xⅆx+cosxⅆx

(32)

See Also

diff

DiffTutor

Int

IntTutor

Limit

LimitTutor

Student

Student[Calculus1]

Student[Calculus1][DiffRules]

Student[Calculus1][IntRules]

Student[Calculus1][LimitRules]

Student[Calculus1][SingleStepOverview]