Others such as map are useful for sets lists and

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t the constant from 2x + 2y ? Currently, this operation is not possible in Maple because its simplifier automatically distributes the number over the product, believing that a sum is simpler than a product. In most cases, this is true. If you enter the following expression, Maple automatically multiplies the constant into the expression. > 2*(x + y); 2x + 2y How can you then deal with such expressions, when you need to factor out constants, or negative signs? To factor such expressions, try this substitution. 42 • Chapter 2: Mathematics with Maple: The Basics > expr3 := 2*(x + y); expr3 := 2 x + 2 y > subs( 2=two, expr3 ); x two + y two > factor(%); two (x + y ) 2.7 Conclusion In this chapter you have seen many of the types of objects which Maple is capable of manipulating, including sequences, sets, and lists. You have seen a number of commands, including expand, factor, and simplify, that are useful for manipulating and simplifying algebraic expressions. Others, such as map, are useful for sets, lists, and arrays. Meanwhile, subs is useful almost any time. In the next chapter, you will learn to apply these concepts to solve systems of equations, one of the most fundamental problems in mathematics. As you learn about new commands, observe how the concepts of this chapter are used in setting up problems and manipulating solutions. 3 Finding Solutions This chapter introduces the key concepts needed for quick, concise problem solving in Maple. Several commands are presented along with information on how they interoperate. In This Chapter • Solving equations symbolically using the solve command • Manipulations, plotting, and evaluating solutions • Solving equations numerically using the fsolve command • Specialized solvers in Maple • Functions that act on polynomials • Tools for solving problems in calculus 3.1 The Maple solve Command The Maple solve command is a general-purpose equation solver. It takes a set of one or more equations and attempts to solve them exactly for the specified set of unknowns. (Recall from 2.5 Basic Types of Maple Objects that you use braces to denote a set.) Examples Using the solve Command In the following examples, you are solving one equation for one unknown. Each set contains only one element. > solve({x^2=4}, {x}); 43 44 • Chapter 3: Finding Solutions {x = 2}, {x = −2} > solve({a*x^2+b*x+c=0}, {x}); 1 −b + {x = 2 √ 1 −b − b2 − 4 a c }, {x = a 2 √ b2 − 4 a c } a Maple returns each possible solution as a set. Since both of these equations have two solutions, Maple returns a sequence of solution sets. Solving for All Unknowns If you do not specify any unknowns in the equation, Maple solves for all of them. > solve({x+y=0}); {x = −y, y = y } Here, the result is one solution set containing two equations. This means that y can take any value, while x is the negative of y . This solution is parameterized with respect to y . Expression versus Equation If you give an expression rather than an equation, Maple automatically assumes that the expression is equal to zero. > solve({x^3-13*x+12}, {x}); {x = 1}, {x = 3}, {x = −4} Systems of Equations The solve command can also handle systems of equations....
View Full Document

This note was uploaded on 08/27/2012 for the course MATH 1100 taught by Professor Nil during the Spring '12 term at National University of Singapore.

Ask a homework question - tutors are online