janhardo

335 Reputation

8 Badges

11 years, 43 days

MaplePrimes Activity


These are replies submitted by janhardo

@janhardo I see that the input parameters from the second procedure as local variables are declared in the main procedure .
Indeed the sub procedure is treated like a local variable

@tomleslie 
Thanks

Its one procedure nowypou made.

It was more about the concept/mechanism of a second or more procedures , how to include this in a mainprocedure ...

@Carl Love 

That makes the last code version more versitale for using f(x,y,z) , but for this the code needs to be modified a lot i think.
To make this code general also makes it more versatile

Your expertise for coding in Maple is beyond the average user.
Still wonder why , how the average user of Maple with no strong programming skills can use the inbuilt commands(statements)  and construct easily a procedure to make his homework?

Looked again to code in ExtremaAndSaddles_onderzoek_code_(6).mw
Comparing the two saddle point procedures with debug shows more about their structure?

@janhardo 

Was looking first at this

Gradient:= proc(f)
local x, y, V:= (x,y); 
    unapply(diff~(f(V), [V]), [V])
end proc
:

later on this is changed into the code hereunder , but tried to figure out the idea behind this first code piece.

#Returns a list of procedures that return the 1st partial derivatives #of f.

Gradient:= proc(f, {arity::posint:= 2})
local x, i, V:= seq(x[i], i= 1..arity);
    map(unapply, diff~(f(V), [V]), [V])
end proc

@Carl Love 
Thanks

Amazing code to see all critical points in the graph. 
The colored points on the graph and in the table have educational value.
Saddle points are now clear to examine.
Also the gradients patterns between a min/max and a saddlepoint and were there is hardly a gradienvector to see , there has it the value 0. 
Two minima points to see, but there is no distinction between them.
The gradient occurs at a levelcurve in the graph.  
To learn from this you need at least two of the types of critical points in a graph 

This all with only a function input in the procedure, that's convenient.
Domain is now automatically set, but perhaps manual too in order to see more critcal points
A message to do this ..or not 

Note: i get two graphs with a colored table?

@janhardo 

Seems to be difficult to make a procedure out of the calculations of  special points of f(x)  from @kitonum and @Acer 
The only way out to make a procedure seems to be the high level procedure programming  from @ Carl
I should think that the average Maple user uses the inbuilt procedures,.Problem is the input for the main procedure when there are subprocdures, but maybe it is collecting all inputparameters of the sub procedure(s) and use them as inputparameters for the mainprocedure.

@Carl Love 

Thanks

That is is nice thing of calculus the geometric/graphical way for seeing the big picture. 

Remember me solving long ago by hand with the help of the "hessian"  determinant  to investigate  the special points of a f(x,y) function, so some basics i do know. 

Three conditions :A ,B and C must fulfilled to know what type of special point is concerned for f(x,y)
For a extreme point (condition B)  you need the hessian determinant.  

The hessiaan determinant is filled with : with second order partial deratives and two in the determinant are equal ..and so on .
Got here old studymaterial what makes you think  : 
For example : Determine the conditions for a function with a maximum in (a1,a2)
Indeed i do see also now the gradient=0  as conditions here, but did not memorize it. 

Geometrical interpretation ..i try this with the complex numbers and their functions : differentating and integrating
Is there a serie of lessons to find for  Maple for complex numbers and analyse?

GettingStarted.pdf

 

Added also the Getting Started helpfile frorm where it must be possible according to the developer to install the calculus package.
Well, id not get it clear from these instructions what exactly to install for Maple 2021 ?

@janhardo 

I could add the partial deratives from  f(x,y)  in x and y direction, directional derative and gradient also in the 3D plot 
Showing also the level curve and the gradient as vectorfield from  f(x,y)
A while ago i do want to know more about vectorfields and ended at a tensor from vectorcalculus (if i am correct) , that becomes too complex 

@Carl Love 

The gradient vector is in a stationary point of a function of two variables the value 0 ( no vector : the zero vector) 
The stationary points thus found through the gradient are examined with the second partial derivative in those stationary points ( this is the "second derivative test" )

Now I know why the gradient is defined in the procedure 

@janhardo 

I like to see also a procedure made out of the calculation made by @Kitonum and @Acer if possible?

Better is trying to make it by meself first.

@Carl Love 
Thanks
Unfortunaly, no idea how this procedure is constructed 
See some sub procedures contained in a main procedure, but that's all 
How the sub  procedures are constructed ?
How the main procdure is constructed with the automatic scaling ?

Its complicated, because i am not really strong in vector calculus , so defining for example a gradient in terms of partial deratives ..?

Gradient:= proc(f)
local x, y, V:= (x,y); 
    unapply(diff~(f(V), [V]), [V])
end proc
:

For a 3D plot it is a levelcurve and standing on this is the gradient vector , and don't know why is used a gradientvector in the procedure

@acer 

We do now know the steps to solve this.

I think in general if you want to automate calculations with a procedure out of these calculations : what are the considerations ?
What are the steps to take.  

@acer 

The green points are the saddle points and drawing two levelcurves there shows exactly what characterise these saddle points

@acer 

Thanks

For a procedure to make there is the function itself and the domain to specify as input 
So a message : enter function and domain.
For educational purpose : showing the steps in the calculation as a list 
Showing in the critical points the two tangentlines and  levelcurves

Also interesting is to go  further with a plot of two functions also in a procedure and do something with a gradient and level curves

First 9 10 11 12 13 14 15 Last Page 11 of 38