L16-graphing2.mws

__Calculus I__

**Lesson 16: Analysing the Graphs of Functions 2 - **

Extrema and Asymptotes

For each function, we find:

- intervals of increase or decrease

- extrema

- intervals of concavity

- points of inflection

- asymptotes

**Example 1**

f(x) = sin(2x) - 2 sin(x), x in [ -
,
]

`> `
**restart: with(plots):**

`Warning, the name changecoords has been redefined`

`> `
**f1:= x -> sin(2 * x) - 2 * sin(x);**

`> `
**plot(f1(x), x=-Pi- .5..Pi + .5, color = red);**

`> `
**D(f1);**

We have: f1' (x) =

=

=

Hence we have critical values when cos (x) =
OR cos (x) = 1.

Recall plot of cos (x).

`> `
**plot(cos(x), x= -Pi..Pi, color = red);**

`> `
**solve(cos(x) = -1/2, x);**

We see that our critical values are: x = 0,
, and
. Let's look at the plot of f1' (x).

Thus f1 is increasing on ( -
,
) and (
,
).

Hence f1 has a local max when x =
and a local min when x =

We now turn to concavity.

`> `
**D(D(f1));**

Thus, f1'' (x) = -4 sin(2x) + 2sin(x)

= -4(2sin(x) cos(x))+ 2sin(x)

= 2sin(x) (-4cos(x) + 1)

Hence, f1'' (x) = 0 when sin(x) = 0 OR cos(x) =
.

Since
does not come from our standard triangles, we can only get a numerical estimate

for the solution to cos(x) =
. Lets plot f '' (x).

`> `
**fsolve(cos(x) = 1/4, x = -Pi..Pi);**

Conclusion, f 1 is concave up on (
,0) and (
,
)

and f1 is concave down on ( -
,
) and (0,
).

There are points of inflection when x = -
, -
, 0,
,
.

There are no asymptotes.

**Example 2**

`> `
**f2:= x -> surd(x,3)^5 - 5 * surd(x,3)^2;**

`> `
**plot(f2(x), x = -10..10, color = red);**

`> `
**D(f2);**

Too complcated!! We can do better ourselves!

f2 '(x) =

=
.

Thus, f2 '(x) = 0 when x = 2 and f2 '(x) is not defined for x = 0.

Hence we have two critical points: x = 0, 2. Let's plot f2 '(x). Since f2 '(x) is not defined

at 0, we plot first with negative values of x and then with positive values of x.

Conclusion: f2 is increasing on (-
,0) and (2,
).

f2 is decreasing on (0,2).

Hence, f2 has a local max when x = 0 and a local min when x = 2.

The function is NOT differentiable at x = 0.

Now we turn to concavity.

`> `
**D(D(f2));**

Again, too complicated! We can do better ourselves!

f2 ''(x) =

=
.

We see that f2 ''(x) = 0 when x = -1 and is NOT defined when x = 0.

Let's plot f2 ''(x). Again we do two plots to avoid x = 0.

Conclusions: f2 is concave up on (-1,0) and (0,
)

and f2 is concave down on (-
,-1).

There is a point of inflcetion when x = -1.

There are no asymptotes.

**Example 3**

`> `
**f3:= x -> x^2 / (2 * x + 5);**

`> `
**plot(f3(x), x = -5..5,y = -25..25, color = red);**

Using long division we have that

f3 =
and hence

y =
is a slant asymptote.

`> `
**D(f3);**

`> `
**simplify( 2*x/(2 * x + 5) - 2 * x^2 / (2*x + 5)^2);**

Hence there are critical points when x = 0, -5.

Note that
is not a critical value as the function is not defined there.

To determine where f3 '(x) is positive and negative it suffices to consider
,

since
is positive or 0.

`> `
**plot(x*(x+5), x = -10..10, color = red);**

Hence, f3 is increasing on ( -
,-5) and (0,
).

The function f3 is decreasing on (
) and (
,0). Remember the

function is NOT defined for x =
.

Thus, f3 has a local max when x = -5 and a local min when x = 0.

Let's turn to concavity.

`> `
**D(D(f3));**

`> `
**simplify( 2*1/(2*x+5)-8*x/((2*x+5)^2)+8*x^2/((2*x+5)^3) );**

Thus, f3 ''(x) =
.

Conclusions: f3 is concave up on (
,
) and is concave down on (-
,
).

Concavity chages as x passes through
, but as
is NOT in the domain

of the function we have no points of inflection.

`> `
**a3:= plot(f3(x), x = -10..10, y = -25..25,color = red):**

`> `
**b3:= plot(1/2 * x - 5/4, x = -10..10, color = magenta):**

`> `
**display({a3,b3});**