Appendix
A-11: Factoring and Collecting Terms
Example A-11.2
Collect like terms in 9⁢a⁢cos⁡2⁢x+9⁢b⁢sin⁡2⁢x−8⁢a⁢sin⁡2⁢x+8⁢b⁢cos⁡2⁢x−cos⁡2⁢x.
Solution
Maple Solution - Interactive
Control-drag the given expression and press the Enter key.
Context Panel: Simplify≻Size
9⁢a⁢cos⁡2⁢x+9⁢b⁢sin⁡2⁢x−8⁢a⁢sin⁡2⁢x+8⁢b⁢cos⁡2⁢x−cos⁡2⁢x
= simplify
9⁢a+8⁢b−1⁢cos⁡2⁢x−8⁢a−98⁢b⁢sin⁡2⁢x
Alternatively, the Collect option in the Context Panel can be used, but it will then be a multistep operation.
= collect
9⁢a+8⁢b−1⁢cos⁡2⁢x+9⁢b⁢sin⁡2⁢x−8⁢a⁢sin⁡2⁢x
9⁢b−8⁢a⁢sin⁡2⁢x+9⁢a+8⁢b−1⁢cos⁡2⁢x
To (1), apply Context Panel: Collect≻Function, and from the drop-down box in the resulting dialog, select cos2 x. Repeat this for (2), this time selecting sin2 x. The final result is (3). Applying the Factor option to (1) accomplishes nothing: Maple's factor command is not designed to group terms.
Maple Solution - Coded
Assign the given expression to a name such as q and use the collect command. The names of the functions to be collected are given in a list as the second parameter.
q≔9⁢a⁢cos2⁢x+9⁢b⁢sin2⁢x−8⁢a⁢sin2⁢x+8⁢b⁢cos2⁢x−cos2⁢x:
collectq,cos,sin
Of course, the simplify command with the size parameter will work, too.
simplifyq,size = 9⁢a+8⁢b−1⁢cos⁡2⁢x−8⁢a−98⁢b⁢sin⁡2⁢x
<< Previous Example Section A-11 Next Section of Appendix >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document