kill(all)$

maxima : analysis of function of (one variable, general = x,properties),version 1.0
peter.vlasschaert@gmail.com,07/06/2022

use : lambda function.

analysis : limit of function
-----------------------------------

p1:x^2*sin(1/x);

wxplot2d([p1], [x,-0.01,0.01])$

rem : profile above : parabola ,below : parabola.

analysis : maximum,minimum

simplification : inverse trig function.
------------------------------------------------

triginverses;/*default*/

p2: [asin(sin(x)),acos(sin(x))];

→ option triginverses {true,false,all} ,some called flag option.

triginverses:all$

p2a:asin(sin(x));

p2b:ev(p2,nouns);

option : triginverses no effect on : solve.

solve(ev(p1=0,nouns),x);

limit for p1 around "0"
------------------------------

→ rhs:limit

p3a:'limit(p1,x,0,plus) =limit(p1,x,0,plus);

→ lhs:limit

p3b:'limit(p1,x,0,minus)=limit(p1,x,0,minus);

check : "see:above".

p3:'limit(p1,x,0)=limit(p1,x,0);

concept used : maximize (= function)
--------------------------------

How to use : differentation.

given : 
1e ) function     A = x*y       
2e ) constraint   L = 2*x+2*y  

assume(L>0);

p4a:A = x*y;
p4b: L = 2*x+2*y;  

procedure : a) find g(x)
                   b) find g'(x) = 0 , extremum
                   c) plot : g(x)

a) →  find :g(x)

p4c1: solve(p4b,y);

p4c2:subst(p4c1,p4a);

p4c2a:rhs( p4c2);

rem : L = constant , A =g(x)

p4c3:g(x) := ''p4c2a;

b) → g'(x) =0

p4d:diffgx=diff(g(x),x);

p4d1:rhs(p4d)=0;

p4d2:solve(p4d1,x);

c) → plot2d

suppose : L =4

L:4;

p4e:g(x);

p4e1:expand(p4e);

rem : general equation parabola
g1(x) = a1*x^2+b1*x+c1

g1:lambda([x,a1,b1,c1],a1*x^2+b1*x+c1);

fig 1: v1

wxplot2d([p4e,rhs(p4d2[1])], [x,-5,5])$

use : Menu → Plot → Plot2d...

? What extremum: maximum,from graph

→ analysis : secondorder derivative. = g''(x)

p5:'diff(rhs(p4d),x) = diff(rhs(p4d),x);

rem : maximum → g''(x) < 0

general : local maximum → g''(x) < 0
               local minimum →  g''(x) >0

v1:g1(x,-1,2,0);

v2:g1(x,1,2,0);

→ plot : v2 = function

fig 2: v2

wxplot2d([v2,-1], [x,-5,5])$ /*local minimum*/

→ second order derivative  : of v2 

v2a:'diff(v2,x,2)=diff(v2,x,2);

→ g1(x,a1,b1,c1)  "y=g1,second order equation ,term x^2"

rem : a1 < 0 : minimum  : fig 1
         a1 > 0  : maximum : fig 2

find zeros of v2: (crossing with x-axis)
-------------------------------------------------

→ v2 =0

p6:v2=0;

p6a:solve(p6,x);

→ points on the fig , "below"

x11:makelist(rhs(p6a[i]),i,1,length(p6a));
y11:makelist(0,i,1,length(p6a));

→ find : minimum

p6b:'diff(v2,x)=diff(v2,x);

p6c:solve(rhs(p6b)=0,x);

wxplot2d([[discrete,x11,y11], v2,rhs(p6c[1])], [x,-5,5],
        nobox,grid2d, [axes, solid],
        [style, [points,5,2,6], [lines,1,1], [lines,2,4]],
        [color,blue,red],
        [legend,"zeros :v2","v2","minimum"],
        [title,"zeros and function(v2)"],
        [xlabel,"x-values"], [ylabel,"y-values"])$

rem : same axis in both direction , "same_xy", option wxplot2d

rem : combination of two graphs or more on the canvas.