Worksheet03 - Maple for Math Majors Roger Kraft Department...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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: Maple for Math Majors Roger Kraft Department of Mathematics, Computer Science, and Statistics Purdue University Calumet [email protected] 3. Solving Equations 3.1. Introduction Two of Maple's most useful commands are solve , which solves equations symbolically, and fsolve , which solves equations numerically. The first section of this worksheet gives an overview of working with these two commands. The rest of this worksheet goes into the details of using the solve command to solve single equations and systems of equations. We introduce Maple's RootOf expressions, which are used throughout Maple and are often used in the results returned by solve , and we consider the allvalues command for interpreting RootOf expressions. We also consider what kinds of equations solve can and cannot solve. Finally, we show how the numerical solving command fsolve can be used when solve does not return a result. > 3.2. The basics of using solve and fsolve Recall that an equation is a made up of an equal sign with an expression on either side of it. An equation can either be true, like = + 2 2 4, or false, like = + 2 2 5. Most of the time, equations contain one or more unknowns in them, as in = + x 2 2 4. When an equation contains an unknown, then we can ask for which values of the unknown is the equation true. For example, the equation = + x 2 2 4 is true when the unknown x is given either the value 2 or - 2 . The values that make an equation true are called the solutions of the equation. Maple has two commands that can be used to find the solutions to an equation, solve and fsolve . The solve command attempts to solve an equation symbolically. > solve( x^2+2=4, x); The fsolve command attempts to solve an equation numerically. > fsolve( x^2+2=4, x); The rest of this section is an overview of using solve and fsolve . The rest of the sections in this worksheet go into the details of using these two commands. We use the solve command by giving it an equation in some unknowns and also one specific unknown that it should solve the equation for. For example, an equation like = 1- a x 2 b has three unknowns in it. Each of the following solve commands solves this equation for one of the unknowns (in terms of the other unknowns). > solve( 1=a*x^2-b, a ); > solve( 1=a*x^2-b, b ); > solve( 1=a*x^2-b, x ); The next two commands check that each solution from the last result really does solve the equation for x (notice the use of indexed names). > subs( x=%[1], 1=a*x^2-b ); > subs( x=%%[2], 1=a*x^2-b ); > Exercise: For each of the following two solve commands, use the subs command to verify that the solution really does solve the equation. > solve( 1=a*x^2-b, a ); > solve( 1=a*x^2-b, b ); > Exercise: Let us give the equation = 1- a x 2 b a name....
View Full Document

{[ snackBarMessage ]}

Page1 / 21

Worksheet03 - Maple for Math Majors Roger Kraft Department...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online