Docsity

Finding Intersections of Curves and Identifying Relative Extreme Points using MAPLE - Prof, Lab Reports of Mathematics

Toggle sidebar
bg1
Math 108, Lab2
More on solving equations in MAPLE
Let’s review MAPLE’s approach to finding where two curves intersect. look at an example where we
have a parabola and a straight line and want to know where they intersect. Enter:
parab :=x2+x;
line :=3∗x+1;
plot ([parab,line],x=−1..3, color = [red,blue] );
It is clear that there are two points of intersection. We recall that finding points of intersection of two
curves is the same as solving the equations of the curves simultaneously, so we enter
solve(parab =line,x);
and we get x=1±√2.
MAPLE Prefers Formulas, not Functions.
Now we encounter one of MAPLE’s technical quirks – for MAPLE there is a crucial difference be-
tween formulas and functions, and MAPLE prefers formulas. Let’s look at an example. Enter
f:=x2+5;
This is a formula. To find out the value of that formula when x = 2 we enter
subs (x=2,f);
and we get the numerical value 9. We are tempted to write “f(2)” just as we do in class and in homework,
thinking it to be a shorthand for “the value of f when x = 2”. Try entering
f(2);
and we get x(2)2+5 which is completely different from the expected numerical value 9. Obviously
MAPLE thinks of “f(2)” much differently than we do. In lab, avoid using the function-type notation f(2)
and use subs(x=2,f); instead.
Finding where functions increase and decrease
In this section, we will use MAPLE and our knowledge of derivatives to help us find where certain
functions are increasing or decreasing. From class, we know that the derivative function f0(x)is a formula
that computes the slope of the tangent line to the graph of f(x)at various points and we know:
General Rule # 1: When f0(x)>0, the graph of f(x)is increasing; when f0(x)<0the
graph of f(x)is decreasing.
Let’s begin by using MAPLE to illustrate General Rule #1.
Example A: Enter
f:=x4−3∗x2;
plot(f,x=−3..3);
From that graph we see the fdecreases until xreaches a point about 1.5 units left of zero, then increases
until xreaches 0 (or something close to it), and then decreases until xreaches a point about 1.5 units to the
right of zero, and then increases thereafter.
1
pf3
pf4
pf5

Partial preview of the text

Download Finding Intersections of Curves and Identifying Relative Extreme Points using MAPLE - Prof and more Lab Reports Mathematics in PDF only on Docsity!

Math 108, Lab

More on solving equations in MAPLE

Let’s review MAPLE’s approach to finding where two curves intersect. look at an example where we have a parabola and a straight line and want to know where they intersect. Enter:

parab := x^2 + x; line := 3 ∗ x + 1; plot ([parab, line], x = − 1 ..3, color = [red,blue] );

It is clear that there are two points of intersection. We recall that finding points of intersection of two curves is the same as solving the equations of the curves simultaneously, so we enter

solve(parab = line, x);

and we get x = 1 ±

MAPLE Prefers Formulas, not Functions.

Now we encounter one of MAPLE’s technical quirks – for MAPLE there is a crucial difference be- tween formulas and functions, and MAPLE prefers formulas. Let’s look at an example. Enter

f := x^2 + 5;

This is a formula. To find out the value of that formula when x = 2 we enter

subs (x = 2 , f );

and we get the numerical value 9. We are tempted to write “f(2)” just as we do in class and in homework, thinking it to be a shorthand for “the value of f when x = 2”. Try entering

f(2);

and we get x( 2 )^2 + 5 which is completely different from the expected numerical value 9. Obviously MAPLE thinks of “f(2)” much differently than we do. In lab, avoid using the function-type notation f ( 2 ) and use subs(x = 2 , f ); instead.

Finding where functions increase and decrease

In this section, we will use MAPLE and our knowledge of derivatives to help us find where certain functions are increasing or decreasing. From class, we know that the derivative function f ′(x) is a formula that computes the slope of the tangent line to the graph of f (x) at various points and we know:

General Rule # 1: When f ′(x) > 0 , the graph of f (x) is increasing; when f ′(x) < 0 the graph of f (x) is decreasing.

Let’s begin by using MAPLE to illustrate General Rule #1.

Example A: Enter f := x^4 − 3 ∗ x^2 ; plot( f , x = − 3 .. 3 );

From that graph we see the f decreases until x reaches a point about 1.5 units left of zero, then increases until x reaches 0 (or something close to it), and then decreases until x reaches a point about 1.5 units to the right of zero, and then increases thereafter.

The challenge is to figure out exactly where f changes from decreasing to increasing, and vice-versa. To do that we look at f ′(x). Enter

deriv f := di f f ( f , x); [we get 4x^3 − 6 x] plot(deriv f , x = − 3 .. 3 );

We see that deriv f is a curve that is negative (= lies below the x-axis) until about 1.5 units left of zero, and then deriv f starts being positive (= lies above the x-axis) for a while. What we want to know is the cut-off point between where deriv f is negative and positive. That will give us the first turn-around point for the function f (x). We can find that cut-off point by entering the two-step command

answers := f solve(deriv f = 0 , x);

We get three answers x = − 1. 224744871 , 0 , 1 .224744871 and now we can say with certainty that the graph of f changes from decreasing to increasing at x = answers[ 1 ] (which means the first entry in the list called “answers”), then changes back to decreasing at x = answers[ 2 ], and finally changes back to increasing at x = answers[ 3 ].

The numbers obtained from solve(deriv f = 0 , x) are candidates for max/min of f and as it happens, if we start with f (x) = x^2 − 3 ∗ x^2 then each candidate gives either a maximum or a minimum value of our formula f. But that is not always the case. Often some of the candidates found using the derivative do not give hilltops or valley bottoms. As we will say later “not all candidates are elected.”

Example B: Enter

g := 3 ∗ x^4 − 16 ∗ x^3 + 30 ∗ x^2 − 24 ∗ x; plot(g, x = 0 .. 3 );

What you see is a curve that decreases until x reaches a point near x = 1, then does something hard to describe until x reaches a point near 2, and then increases again. To get a better idea of what’s really going on, let’s look at g′(x). Enter

derivg := di f f (g, x); [we get 12x^3 − 48 x^2 + 60 x − 24] plot(derivg, x = 0 .. 3 );

What we see is a graph that starts out below zero, rises to zero close to x = 1, drops below zero again until x is near 2, and then rises above zero. Let’s determine more precisely where the cut-offs occur. Enter

solve(derivg = 0 ); [and we get the list 1,1,2].

(You might have heard people say that x = 1 is a “repeated root” of derivg.) From our plot of derivg, we can say that derivg < 0 for 0 < x < 1, and then derivg < 0 for 1 < x < 2, and then derivg > 0 for 2 < x < 3. Applying General Rule #1 we say that g is decreasing for 0 < x < 2 and g is increasing for 2 < x < 3.

General Rule #2: Given a function h, the solutions of h′(x) = 0 are candidates for where h′^ might change signs (and so are x-values in the domain where h′^ might not exist). At such points the graph of h might change from increasing to decreasing, or vice-versa. But there is no guarantee that the sign of h′^ actually does change at a given candidate point. We will express this by saying “Not every candidate is elected.”

The negative solution is not relevant because we were told to consider only values of x that are greater than 0. Hence we want candidatek[ 1 ] which is approximately 0. 2425356250

Final question for today: We determined that a low point for the function k(x) = ( 1 /x) + 17 x occurs when x is approximately candidatek[ 1 ] = 0 .2425356250. What is the corresponding point on the graph? We enter

subs(x = candidatek[ 1 ], k);

and we get 2

17 which is about 8.246211251. That is the y coordinate of the point on the graph. Thus the low point we are searching for is approximately (. 2425356250 , 8. 246211251 ).

Lab 2 Homework Assignment; Value = 15 points; Due when your lab meets next week

Directions: Give the MAPLE command(s) that you used to solve the following, and the answer(s) that you got from MAPLE. Clearly number your problems. Once again, you may work together in groups of size up to 3, or you may work alone.

  1. Consider the function g(x) = x + (^) x^12 for 0. 5 < x < 3.

a) At what x-value does the graph change from decreasing to increasing (or vice versa)?

b) Just before the x-value found in a), the function g(x) is (increasing or decreasing).

c) At the x-value found in a), the function g(x) has a relative (maximum, minimum).

  1. You don’t know the formula for the function h(x) but you do know that its derivative formula is derivh := x^2 + x − 3.

a) At which point(s) does h(x) switch from increasing to decreasing?

b) At which points does h(x) have a local minimum value?

  1. Consider the function k(x) = (^) x^32 + (^) ( 3 −^2 x) 2. Be careful to make sure that you entered the formula into

MAPLE properly. One way to test your entry is to make sure that k( 1 ) = 72.

a) Use k′(x) to determine the x value of the lowest point on the graph of k(x) for x between 0 and 3. Give 5 correct decimal places and give both coordinates.

b) Check your answer to a) by printing out the graph of k(x) for 0. 5 ≤ x ≤ 2 .8.