Student[Basics]
CompleteSquareSteps
generate steps for completing the square of a quadratic expression
Calling Sequence
Parameters
Description
Examples
Compatibility
CompleteSquareSteps( expr, variable )
CompleteSquareSteps( expr, implicitmultiply = true )
expr
-
string or expression
variable
(optional) variable to collect the terms by
implicitmultiply
(optional) truefalse
output = ...
(optional) option to control the return value
displaystyle = ...
(optional) option to control the layout of the steps
bringtoleft
The CompleteSquareSteps command accepts a polynomial and displays the steps required to complete the square. As a pre-step, the given expression will be reorganized into the general form of a quadratic by expanding and simplifying as needed.
An optional variable can be provided as a second argument. This so-called variable can also be an expression, such as sin(t) for completing the square to the form (sin(t)+a)^2+b. If no variable is provided, the return of indets(expression,name) is used to find the first variable that has degree 2.
If expr is a string, then it is parsed into an expression using InertForm:-Parse so that no automatic simplifications are applied, and thus no steps are missed.
The implicitmultiply option is only relevant when expr is a string. This option is passed directly on to the InertForm:-Parse command and will cause things like 2x to be interpreted as 2*x, but also, xyz to be interpreted as x*y*z.
The output and displaystyle options are described in Student:-Basics:-OutputStepsRecord. The return value is controlled by the output option.
Setting bringtoleft=false applies the semantics used by Student:-Precalculus:-CompleteSquare when the input expr is an equation or inequality: it attempts to complete the square for quadratics on either or both sides of the relation. The default bringtoleft=true brings the right-hand side of the relation to the left side before proceeding to complete the square.
This function is part of the Student:-Basics package.
with⁡Student:-Basics:
CompleteSquareSteps⁡x+1⁢x−3=4⁢x+2
x+1⋅x−3=4⋅x+2•Bring terms to left sidex+1⁢x−3−4⁢x−2=0•Collect in terms ofxx2−6⁢x−5=0•Rewritex2−6⁢x−5so it contains a perfect square and has the form (x2+2⋅a⋅x+a2) +C. So we have2⁢a=−6a=−3•Add and subtract−32x2−6⁢x+9−9−5=0•The first3terms can be regrouped as a perfect squarex−32−9−5=0•Simplify the remaining termx−32−14=0
CompleteSquareSteps⁡sin⁡t2+2⁢sin⁡t+1,sin⁡t
sin⁡t2+2⋅sin⁡t+1•Rewritesin⁡t2+2⁢sin⁡t+1so it contains a perfect square and has the form (sin⁡t2+2⋅a⋅sin⁡t+a2) +C. So we have2⁢a=2a=1•Add and subtract12sin⁡t2+2⁢sin⁡t+1−1+1•The first3terms can be regrouped as a perfect squaresin⁡t+12−1+1•Simplify the remaining termsin⁡t+12
The Student:-Basics:-CompleteSquareSteps command was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
The bringtoleft option was introduced in Maple 2024.
For more information on Maple 2024 changes, see Updates in Maple 2024.
See Also
Student:-Basics
Student:-Basics:-ExpandSteps
Student:-Basics:-LinearSolveSteps
Student:-Calculus1:-ShowSolution
Student:-Calculus1:-ShowSteps
Student:-Precalculus:-CompleteSquare
Download Help Document