 GetProblem - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Packages : Calculus 1 : Single Stepping : Student/Calculus1/GetProblem

Student[Calculus1]

 GetProblem
 retrieve a problem from the Calculus1 internal problems table Calling Sequence GetProblem(expr, format) Parameters

 expr - (optional) algebraic or algebraic equation; select the problem to retrieve format - (optional) $\mathrm{BooleanOpt}\left(\mathrm{internal}\right)$; specify the result format Description

 • The Calculus1 package maintains a table of problems stepped through in the current session. One of these problems is designated the current problem.  The GetProblem command sets the current problem and focuses package commands and other Maple commands on the problem and its subproblems.
 • The normal output from a call to the package routine Rule is an equation that is displayed on your screen using standard calculus notation.  However, the left-hand side of this equation is only displayed this way; its actual value is different.  If you use the lprint command, Maple displays its structure, which is similar to:

 CALCULUS1OBJECT( [1, [], []], {x} ) = ...

 This representation serves several purposes. Most importantly, it is opaque to main commands, such as normal, simplify, expand, and value.  This allows you to apply any of these commands to such an equation, and then continue to work with the result in the Calculus1 environment.
 However, to work with such an equation outside the Calculus1 environment, first convert this CALCULUS1OBJECT to its corresponding standard form.  You accomplish this by passing this equation to GetProblem without the format option or with internal = false option.
 Note: The standard Maple commands diff, int, limit, and series accept the CALCULUS1OBJECT representation. Therefore, you do not need to transform the output from a Rule invocation by GetProblem to apply these commands.
 • If provided, the parameter expr must be a(n):
 1 Problem number (positive integer); see WhatProblem and GetNumProblems
 2 Output from a previous invocation of Rule
 3 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.)
 • If the expr parameter is omitted, GetProblem returns the current problem. Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{Calculus1}\right]\right):$
 > $\mathrm{infolevel}\left[\mathrm{Student}\left[\mathrm{Calculus1}\right]\right]≔1:$
 > $\mathrm{Rule}\left[\mathrm{+}\right]\left(\mathrm{Diff}\left({x}^{2}+\mathrm{sin}\left(x\right),x\right)\right)$
 Creating problem #1
 $\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left({{x}}^{{2}}{+}{\mathrm{sin}}{}\left({x}\right)\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left({{x}}^{{2}}\right){+}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{sin}{}\left({x}\right)$ (1)
 > $\mathrm{Rule}\left[\mathrm{+}\right]\left(\mathrm{Int}\left(x+\mathrm{cos}\left(x\right),x\right)\right)$
 Creating problem #2
 ${\int }\left({x}{+}{\mathrm{cos}}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }{x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\int }{\mathrm{cos}}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (2)
 > $\mathrm{Hint}\left(\mathrm{GetProblem}\left(1,\mathrm{internal}\right)\right)$
 $\left[{\mathrm{power}}\right]$ (3)
 > $\mathrm{simplify}\left(\mathrm{GetProblem}\left(2,\mathrm{internal}\right)\right)$
 ${\int }\left({x}{+}{\mathrm{cos}}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{\int }{x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\int }{\mathrm{cos}}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (4)
 > $\mathrm{value}\left(\mathrm{GetProblem}\left(2,\mathrm{internal}\right)\right)$
 ${\int }\left({x}{+}{\mathrm{cos}}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}\frac{{{x}}^{{2}}}{{2}}{+}{\mathrm{sin}}{}\left({x}\right)$ (5)

If you do not specify the internal option, the Maple command evaluates both sides of the equation.

 > $\mathrm{value}\left(\mathrm{GetProblem}\left(2\right)\right)$
 $\frac{{{x}}^{{2}}}{{2}}{+}{\mathrm{sin}}{}\left({x}\right){=}\frac{{{x}}^{{2}}}{{2}}{+}{\mathrm{sin}}{}\left({x}\right)$ (6)

 See Also