Main content

### Course: Calculus, all content (2017 edition) > Unit 3

Lesson 3: Relative minima & maxima# Analyzing a function with its derivative

Taking the derivative of f(x)=x³-12x+2 and graphing the derivative, so we can tell when f is increasing or decreasing, and where is its relative extremum points. Created by Sal Khan.

## Want to join the conversation?

- How can we figure out the maxima or minima
**without graphing**the function? Is there a way?(91 votes)- Take the derivative of the function and find where that equals 0 to find critical points. Then take the second derivative and find its value at the critical points. If the second derivative is positive, then the point is a minimum; if it's negative, then it's a maximum; if it's zero, then it's an inflection point.

Sal talks about it here: https://www.khanacademy.org/math/calculus/derivative_applications/critical_points_graphing/v/concavity--concave-upwards-and-concave-downwards-intervals(146 votes)

- How do we know that the graph will pass over to the positive side of the graph it could also remain in the negative side by changing its concavity?(9 votes)
- Good question, and it is related to something you will be studying soon.

To recap: f(x)=x^3-12x+2 and f'(x)=3x^2-12

1)

We found two critical points of f(x) via f'(x), x=-2 and x=2, so we know the function will pass from the negative side of the y axis (x<0), to the positive side (x>0).

2)

When x=-2, we have f(-2) = (-2)^3 - 12(-2) + 2 = -8 - (-24) + 2 = -8 + 24 + 2 = 18

When x=2, we have f(2) = (-)^3 - 12(2) + 2 = 8 - (24) + 2 = 8 - 24 + 2 = -14

So we know as x moves from -2 to 2, f(x) will move from y=18 to y=-14.

And this is how we know the graph will pass over to the positive side of both the x and y axes.

Had there been anymore concavity changing points (there is only 1 at x=0), they would have been hinted at via the first derivative test, so you can be sure that the graph is concave down for all x<0 and concave up for all x>0. What you will learn soon are inflection points, where concavity changes, and how the are found, via the 2nd derivative test. In this case, given that the first derivative is f'(x)=3x^2-12, the second derivative is f''(x)=6x, and it is only zero at x=0, so x=0 is the only place where the graph changes concavity.

You might want to try this great tool that graphs function to help you get an intuition of the relationship between the degree of a function and its behavior. https://www.desmos.com/calculator(14 votes)

- how did you find the derivative 3x^2 -12(4 votes)
- Taking the derivative is actually very easy:

First what you have to do is to write down the original function f(x), which would be f(x)=x^3-12x-5 in this case!

now you look at all x-variables...

take the power of the x-variable and multiply it by the coefficient and subtract the power by one; like this: 1*x^3 -> 1*3x^3-1 -> 3x^2 !

next step: 12x = 12x^1 -> 12*1x^1-1 -> 12x^0 [anything raised to zero equals 1] -> 12*1 -> 12

last step: "5".. there is no variable, so this you just can cross out

result: f'(x)=3x^2-12(11 votes)

- Can i just substitute 2 and -2 in the original function and conclude that the greater f(x) value as a result of the substitution is the maximum point and the lesser is the minimum point?(7 votes)
- yes u can do it but only for global ones not for local points .(5 votes)

- In second derivative test , if the value is less than 0 why is it maximum ?? Also if greater than 0 why is it minimum??(6 votes)
- If the value of the second derivative is less than 0 (a negative value) then it means the shape of the original function is concave down (resembling a hill or bump or upside down "u", or a parabola opening downward) which means the critical point in the interval of the concave down shape will be the highest point in the interval (the peak of the hill) and thus it is a local maximum.

If the value of the second derivative is more than 0 (a positive value) then the shape of the original function is concave up (resembling a bowl, a dent/pit, or a "u" shape, or a parabola opening upwards) and the critical value in a concave up shape is the lowest point in the interval at the very base/bottom of the "pit" and thus it is a local minimum.(3 votes)

- So there are no other local minima or maxima points in that function or are these global maxima and minima points?(2 votes)
- as far as I have seen in the lecture Sal has drawn the graph of f'(x) rather than f(x) and according to my understanding The relative extrema's and absolute extrema's are part of f(x) graph itself rather than its derivative. Hope you get the idea(1 vote)

- I need help trying to solve f(x)= 2x^3+3x^2-72x. I have a problem seting the critical value to 0 and solving.(1 vote)
- First factor out x

f(x) = x*(2x^2+3x-72)

To find the roots, set f(x) = 0 and solve for x values.

One will be x = 0, and the other two will come from the quadratic formula applied to 2x^2+3x-72.(6 votes)

- Find the area of the largest isosceles triangle that can be inscribed in a circle of radius 4

a)solve by writing the area as a function of h

b)solve by writing the area s a function of a

c) identify the type of triangle of maximum area

Im really aggravated with this problem because I did part of part a, which is to write the function... A=1/2(2x)94+h). I cant solve it because Im getting a different derivative compared to others.

And as for b) I know we have to use trig but I dont know how it implement it with regard to area.(2 votes) - I'm having trouble finding the second derivative for (x+1)/ sqrt(x), so that I can look for points of concavity

I'm getting a weird value(2 votes)- The second derivative is:

(3-x)/ (4 √x⁵)

Here's how I'd recommend doing this derivative:

y =(x+1)/ √(x)

y = x/√x + 1/√x

y = x^(½) + x^(-½)

dy/dx = ½x^(-½) - ½ x^(-³⁄₂)

d²y/dx² = -¼ x^(-³⁄₂) + ¾x^(-⁵⁄₂)

Factor ¼ x^(-⁵⁄₂)

= ¼ x^(-⁵⁄₂) [ -x + 3]

= (3-x) / (4 √x⁵)(1 vote)

- To figure out whether the critical point is a maximum or minimum, can I simply plug in a value for x ?

Ex: In this video, the derivative of f(x) is 3x^2 - 12. We know that the derivative is zero or that the critical points are at 2 and -2. To find if critical point is a maximum or minimum for critical point 2. Why can't I just do f ( 1 ) = 3 ( 1 ) ^ 2 - 12 which equals a negative number so I know that the function is negative before the critical point from the Left. No I plug in f ( 3 ) = 3 ( 3 ) ^ 2 - 12, I get a positive number so I know the function is positive after passing the critical point. So I have figured out that the critical point at 2 is a minimum because before 2 the slope is negative and after 2 the slope is positive. IS this an accurate way of finding out whether or not the critical point is a maximum or minimum? Is there a better, more valid way of doing this?

Thank you(2 votes)- Yes, that works. Whether what you described (which is the First Derivative Test) is the easiest way depends on whether your original function or your derivative is easier to do the math with. So, once you have the critical points, just decide whether it is easier to use f(x) or f'(x) to do the further computations.

What you left out is that if f'(x) has the same sign on both sides of the critical point, then you don't have an extremum at all, but instead you have a saddle point.

Yet another way to find whether a critical point is a max or a min is the second derivative test -- frequently easier, but it does not always work. Here's how to do it:

If f'(c) = 0 (this method doesn't work for critical points where f'(c) does not exist),

Then:

If f''(c) > 0 then f(c) is a minimum ←**Note these are second derivatives, not first**

If f''(c) < 0 then f(c) is a maximum

If f''(c) = 0 or if f''(c) does not exist, then you cannot tell by this method(1 vote)

## Video transcript

We've got the function f of x
is equal to x to the third power minus 12x plus 2. And what I want to
do in this video is think about at
what points does my function f take on
minimum or maximum values? And to figure that out I
have to first figure out what are the critical
points for my function f. And then which of
those critical points do we achieve a minimum
or maximum value? And to determine
the critical points we have to find the
derivative of our function because our critical
points are just the point at which our
derivative is either equal to 0 or undefined. So the derivative of this
thing right over here, we're just going to use the
power rule several times, and then I guess you can
call it the constant rule. But the derivative of x to
the third is 3x squared. Derivative of negative
12x is negative 12. And the derivative
of a constant, it doesn't change
with respect to x, so it's just going
to be equal to 0. So we're going to get
a critical point when this thing right over
here, for some value of x is either undefined or 0. Well this thing is defined
for all values of x. So the only places we're
going to find critical points is when this thing
is equal to 0. So let's set it equal to 0. When does 3x squared
minus 12 equal 0? So let's add 12 to both sides. You get 3x squared
is equal to 12. Divide both sides by 3. You get x squared is equal to 4. Well this is going to
happen when x is equal to 2 and x is equal to negative 2. Just to be clear, f of
2, or let me be clear, f prime of 2, you get 3 times 4
minus 12, which is equal to 0. And f prime negative 2 is
also, same exact reason, is also equal to 0. So we can say-- and I'll
switch colors here-- that f has critical
points at x equals 2 and x equals negative 2. Well that's fair enough. But we still don't know
whether the function takes on a minimum values at
those points, maximum values of those points, or neither. To figure that out
we have to figure out whether the derivative changes
signs around these points. So let's actually try
to graph the derivative to think about this. So let's graph. I'll draw an axis
right over here. I'll do it down here
because maybe we can use that information
later on to graph f of x. So let's say this is my x-axis. This is my y-axis. And so we have critical points
at x is equal to positive 2. So it's 1, 2. And x is equal to negative 2,
1, 2. x is equal to negative 2. So what does this
derivative look like if we wanted to graph it? Well we have when x is equal
to 0 for the derivative we're at negative 12. So this is the point y
is equal to negative 12. So this is, we're graphing
y is equal to f prime of x. So it looks something like this. These are obviously the
0's of our derivative. So it has to move up to cross
the x-axis there and over here. So what is the
derivative doing at each of these critical points? Well over here our derivative
is crossing from being positive, we have a positive derivative,
to being a negative derivative. So we're crossing from being
a positive derivative to being a negative derivative,
that was our criteria for a critical point
to be a maximum point. Over here we're crossing
from a negative derivative to a positive
derivative, which is our criteria for a critical
point for the function to have a minimum value
at a critical point. So a minimum. And I just want to make sure
we have the correct intuition. If our function, if some
function is increasing going into some point,
and at that point we actually have
a derivative 0-- the derivative could
also be undefined-- but we have a derivative
of 0 and then the function begins decreasing, that's why
this would be a maximum point. Similarly, if we have a
situation where the function is decreasing going into a point,
the derivative is negative. Remember this is the
graph of the derivative. Let me make this clear. This is the graph of y is equal
to not f of x, but f prime of x. So if we have a situation
we're going into the point, the function has
a negative slope, we see we have a negative slope
here-- so the function might look something like this. And then right at this
point the function is either undefined
or has 0 slope. So in this case it has 0 slope. And then after that point,
let me do it right under it. So going into it we
have a negative slope. And then right over
here we have a 0 slope. Which I could draw it
even better than that. So if we were to imagine
going into it we have a negative slope, right at
that point we have a 0 slope, and then we have
a positive slope. So the function
begins increasing. That's why we say we have a
minimum point right over there. So what I did it
right over here is to try to conceptualize what
the function itself could look like given the derivative,
in this case switching from a positive derivative
to a negative derivative, across that critical
point, or going from a negative derivative
to a positive derivative. That's why this is the
criteria for a maximum point, this is the criteria
for a minimum point. Well with that out of the
way, can we use this intuition that we just talked
about to at least try to sketch the graph of f of x? So let's try to do it. And it's just going
to be a sketch, it's not going to be very exact. But at least it'll
give us a sense of the shape of what
f of x looks like. So my best attempt. So it might not be drawn
completely to scale. So it's my x-axis,
this is my y-axis. We know we have a critical point
at x is equal to positive 2. And we have a critical point
at x is equal to negative 2. We know just from inspection
that the y-intercept right here, if the graph
of y is equal to f of x, when x is 0 f of x is 2. So we're going to
hit right over-- I don't want to
draw this completely to the same scale as the x-axis. So let's say that this
is 2 right over here. So this is where
we're going to cross. This is going to
be our y-intercept. And so we said
already that we have a maximum point at x
is equal to negative 2. So what is f of negative 2?
f of negative 2 is equal to 8 or negative 8,
let me be careful. It's negative 8. And then we're going to have
12 times negative 2, which is negative 24. But then we're going to add it. So we're subtracting
negative 24. So this is plus 24. And then we finally have plus 2. So negative 8 plus 24 plus 2,
so that's going to be negative, let's see, negative 8 plus
24 is 16, plus 2 is 18. So f of negative
2 is equal to 18. And I'm not drawing it
completely to scale. But let's say that this
is 18 right over here. So this is the function. This is the point
negative 2 comma 18. And we know that
it's a maximum point. The derivative going into
that point is negative. The derivative going into that
point is negative-- sorry, the derivative going into
that point is positive. So we are increasing. The slope is positive. And then after we
cross that point, the slope becomes negative. The derivative cross the x-axis,
the slope becomes negative. I actually want to
use that same color. It looks like this. And then, of
course, the graph is going to cross the--
it's going to have a y-intercept,
something like that. And then, as we
approach 2, we are approaching another
critical point. Now what is f of 2? f of 2 is going to be equal
to positive 8 minus 24 plus 2. So this is 10 minus 24, which
is equal to negative 14. So let's say this is the point
negative 14 right over here. Actually I can draw
it a little bit. Let's say this is negative 14. So this is f of 2
right over there. And we saw already that
the slope is negative as we approach it. So our function is
decreasing as we approach it. And then right there
the slope is 0. We figured that
out earlier, that's how we identified it
being a critical point. And then the slope is
increasing after that, the derivative is positive. The slope is increasing. So this is our
sketch of what f of x could look like given that
these are the critical points. And we were able to identify
2 as a minimum point. So this was a minimum value. The function takes on a minimum
value when x is equal to 2. And the function took
on a maximum value when x was equal to negative 2.