DOC PREVIEW
IIT MATH 149 - Lab 1 BUSI 6480 Lecture 7

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

MATH 149LABORATORY 1INTRODUCTION TO MAPLE In this laboratory we will define functions and analyze their domains, ranges and zeros using Maple. We will also consider composite functions. To define the function f ( x ) = − − + x37x2x750 in Maple, we enterf:=x->(x^3-7*x^2-x+7)/(50); := f → x − − + 150x3750x2150x750 Note that since f is a polynomial, we know that Domain( f ) = ( −∞ , ∞ ), and because f is of odd order it follows that Range( f ) = ( −∞ , ∞ ). We may plot f over the the interval [-10 , 10] with the following command:> plot(f,-10..10,color=blue);To locate the zeros of f we factor the polynomial expression f ( x ):> factor(f(x));() − x 1( ) − x 7( ) + x 150 Evidently, f has three zeros: x = -1, 1, 7. Alternatively, we can find these zeros by writing a Maple command to solve the equation f ( x ) = 0 for x .> S:=solve(f(x)=0,x); := S ,,17-1 In order to refer to the first element in the list of solutions we may enter S [ 1 ].> S[1];1 As you would expect, the third solution is denoted by S[ 3 ] in Maple .> S[3];-1 We may sketch a graph of f over a smaller interval to show detailed behavior of the function.> plot(f,-4..8,color=black);Now consider the function g ( x ) = − x4 + 1 x . We begin by defining g in Maple.> g:=x->x^4-sqrt(1+x); := g → x − x4 + x 1 Note that Domain ( g ) = [ -1 , +∞ ) since + 1 x is a real number if and only if ≤ −1 x . If we try plotting g over the interval [ -1 , 10 ] we obtain the following graph:> plot(g,-1..10,color=blue); It appears that the zeros of g occur in the interval ( -1 , 52 ) so it makes sense to redraw the graph over a shorter interval. Doing this will help us to estimate the locations of the zeros.> plot(g,-1..5/2,-5..10,color=blue);Note that the second interval of values in the above plot command : -5 . . 10, specifies the range of values that appear along the y axis. It is now evident that g has one zero in the interval ( -1 , −12 ) and one in the interval ( 1 , 32 ). We will attempt to find these values using a solve command as above:> solve(g(x)=0,x);,,,xxxx This time the solve command does not give us a result that we can use.. In such a case we can utilize the fsolve command to approximate each of the roots to any desired number of decimal places. (The default number of decimal places is 10, which we will use here.) When approximating the zeros of a function g we use the command fsolve ( g ( x ) = 0 , x , a . . b ) ; where ( a , b ) is an interval known to contain a single root to the equation g ( x ) = 0. > fsolve(g(x)=0, x, -1..-1/2);-0.8116523200> fsolve(g(x)=0, x, 1..3/2);1.096981558 Finally, to determine the range of g, we observe from our graph that Ran( g ) contains all numbers larger than the minimum value of g(x).. In class we will develop an analytic method for finding this minimum . For now, we can estimate the minimum value of g ( x ) by redrawing the graph of g over the short interval [0.45 , 0.60 ].> plot(g,0.45..0.60,color=blue); Now position the mouse arrow inside the coordinate plane of this plot and click the left hand mouse button once. A rectangular frame will appear about the graph. Now move the mouse arrow to the minimum point and click once again. The upper left hand corner of the context bar will show the coordinates of the point at the tip of the arrow. The y-coordinate of this point approximates the minimum value of g. The actual minimum value is ( )g x0, where .> x[0]:= 0.4689591882; := x00.4689591882To ten significant digits the minimum value, gMin, is > gMin:=g(x[0]); := gMin -1.163640263 Thus, Ran( g ) = [ gMin , ∞ ). We can define the composite funtion h = f o g in Maple with the following command:> h:=x->(f@g)(x); := h → x ()()@fgx To see the value of h ( x ) we enter> h(x); − − + + () − x4 + x 13507( ) − x4 + x 1250x450 + x 150750 If we would like to expand the above expression into a sum of simpler terms we may enter:> expand(%); − + + − − + − x12503 + x 1 x8503 x550x425 + x 1 x507 x8507 + x 1 x4257 x50 Note that the symbol " % " stands for "the last output". Following is first the graph of h, and the graphs of f , g , and h plotted on the same coordinate system.> plot(h,-1..2,-2..5,color=blue);> plot([f,g,h],-1..2,-2..5,color=[red,green,blue]); The graphic capability of Maple can also be used to solve inequalities. As an example, consider the inequality< x2()sinx()cosx, x in [-π , π]. Graph the functions together: > f:=x->x^2; g:=x->sin(x)*cos(x); plot([f,g],-Pi..Pi,color=[red,green]); := f → xx2 := g → x ()sin x ()cos xThe solution to the inequality is the set of numbers x such that f(x) < g(x), i. e. , those values of x such that the green curve is above the red curve. We will look more closely at the interval [0,1]:> plot([f,g],0..1,color=[red,green]);The curves intersect at 0 and at a point with X-coordinate between 0.6 and 0.8. To find this point we will solve the equation f(x)=g(x):> solve(f(x)=g(x),x);Warning, solutions may have been lostWe again need to use "fsolve":> fsolve(f(x)=g(x),x,0.6..0.8);0.7022074120> Therefore, the solution set is { 0, 0.7022074120


View Full Document

IIT MATH 149 - Lab 1 BUSI 6480 Lecture 7

Documents in this Course
QUIZ

QUIZ

2 pages

QUIZ

QUIZ

3 pages

Quiz

Quiz

2 pages

Exam

Exam

4 pages

Load more
Download Lab 1 BUSI 6480 Lecture 7
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 1 BUSI 6480 Lecture 7 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 1 BUSI 6480 Lecture 7 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?