# Practice English Speaking&Listening with: MATLAB for Local Extrema

Normal
(0)
Difficulty: 0

we are going to use matlab to obtain the relative maxima

of this function recall that an analytical method for

determining critical points is compute the partials

and set the two partials equal to zero

alright and then after that when you get the solutions

for your critical points then compute the values of these

second derivatives and obtain the discriminant D

and remember you have done these questions

just by hand that is id D>0 and if the second derivative

with respect to x at that point is greater than 0

then we have a relative min etc etc so you can easily recall that

so we shall enter our symbolic functions

symbolic function rather

remember that is what you did and you wanted to enter

a function symbolically the function is x to the 4

plus 2 times y to the 4 okay here we have to be a little cautious

I am sorry 2 times y to the 4 then minus 12 x y square so

x times y square and then at the end we have minus 20 y square

right so here we go okay I made a mistake alright

let us what I did bad I just forgot putting

star over here right the multiplication sign

good so here we have the function now okay

now what we shall do is that we shall go ahead

and define the or ask it to obtain I am sorry

let us define our partials here the partial derivatives

that is we are defining the derivative of the function with

respect to x as fx and the derivative with respect to y as

fy okay alright and the next thing that we will do is

that we would want to solve for two equations by setting

these two partials equal to zero so this how we will

obtain the solution that we shall let a b be critical point

and what do we want to do is we want to solve for them

and very likely in here we are going to get what we are going to

get you know the exact values may not be very pleasant to

look at okay so we will go ahead and find approximate

values let us get approximate values of these numbers

or the critical points alright so what we get

0 0 is a critical point then 6.6247 3.9842 3.6247 and negative 3.9842

they are critical points okay so now we have to check

at which of them we are able to find max or min or you know

which ones are answered by this test that we are using

in order to find the discriminant let us go ahead

and give the program the definition for the second derivative

that is f x x is the second derivative of f with respect

to x I am sorry second derivative of with respect to x

and f x y will be the derivative of fx with respect to y

and fyy will be the derivative of fy with respect to y

okay now we will define our D that is who is D remember

I am just taking it from our earlier narration so here we go

so we have defined D now what remains to be done is

the evaluation of the discriminant and the second derivative of f

with respect to x at the points that we get in this manner

we shall substitute this value at the critical point

okay sorry the coordinates of this particular critical point

precisely speaking and here what is the answer for D

the value of D is positive that is all that we cared about at the moment

right okay and let us try to see okay yah now we

want to compute this for the second derivative of f

with respect to x and see here that is also a positive number

so what do we conclude that we have a relative minima at

this point and if you want you can go ahead and look these

values for the other one even though we see that our value

x is positive and all the powers on y are even so we

are going to get I think the same conclusion

and the same thing we should get for these values right

so here I am getting it for this one and there you go

this is positive again okay so what we have this 0 does

not tell us anything and for this particular point it took

told us that we have a relative min and the same thing here

okay and may be we can go ahead and look at a graph

does not cost us anything so let us see what would

the graph suggest so as I said we are going to look at

a graph and I am going to go by easy surf to keep things easy

it is about the conclusion of the course okay

so we are let go to the window 0 5 0 5 for now

because we saw one of the set was in this range and here

we go we will go ahead and rotate it

so you can see this here that we do have a relative minimum

here give me a moment let me just drag this down

so that we can see okay so this what I meant that we

have a relative min here and we can go ahead and graphically

visualize it for the other critical numbers as well

okay now let us look at what is going on near 0 okay

graphically alright so we will go for yah say go for easy surface

f we want to stay near 0 okay so let us go like -1 1

-1 1 okay oops what happened oh I forgot to close the bracket

right sorry about that okay so here we go and here

is a graph we can see looks like a saddle point here

but let see this portion with a little better view and we may

do this just look at it with aah let me change the window

for this one right here and see what we get so looks

like we do have a saddle point here and I think that you

will agree so graphically we can determine that we have

a saddle point at 0 aah for x equals 0 and y equals 0

or there is a saddle point at the origin

alright and now I am going to ask you a very similar simple example

okay to work using this method

The Description of MATLAB for Local Extrema