#Knihovna mvcalp zari 1998
#autor Roman Plch
#Pokud je text napovedy v anglictine, je procedura prejata z knihovny
#mvcal (http://fmwww.bc.edu/MT/gopher/maple/mvcal/dir.html),
#pokud je text napovedy v cestine, je procedura nove naprogramovana.

mvcalp[takereal] := proc(list)
local i,j,result,real;
 result := {};
        for i to nops(list) do
            real := true;
            for j to nops(op(i,list)) do
                if not type(op(2,op(j,op(i,list))),realcons) then real := false
                fi
            od;
            if real = true then result := result union {op(i,list)} fi
        od;
 RETURN(result)
end:

mvcalp[sing] := proc(f)
local cp;
cp:={solve({diff(f,x)=0, diff(f,y)=0}, {x,y})};
RETURN(cp)
end:

mvcalp[mvextrem] := proc(f)
local zxx, zyy, zxy, D, i, p2, pom;
zxx:=diff(f,x,x);
zyy:=diff(f,y,y);
zxy:=diff(f,x,y);
pom:=map(allvalues, sing(f));
pom:=takereal(pom);
for i from 1 to nops(pom) do
p2:=op(i,pom);
D:=evalf(subs(p2,zxx)*subs(p2,zyy)-subs(p2,zxy)^2);
   if D=0 then print( p2, ` nelze rozhodnout`);
   elif D<0 then print( p2, ` extrem nenastava`);
   else
       if evalf(subs(p2,zxx)) > 0 then print( p2, ` lokalni minimum`);
       else print( p2, ` lokalni maximun`);
       fi;
   fi;
od;
end:

mvcalp[GraphTan] := proc(f,xrange,yrange,pt)

local xmin,xmax,ymin,ymax,x0,y0,z0,dx,dy,xsour,ysour,
       tanfunc,gpha,gphb,tanpt,optio,rovnice;

with (plots,pointplot):
with (plots,display):

x0 := op(2,pt)[1]:
y0 := op(2,pt)[2]:
xmin := op(1,op(2,xrange)):
xmax := op(2,op(2,xrange)):
ymin := op(1,op(2,yrange)):
ymax := op(2,op(2,yrange)):
optio:=args[5..nargs];

dx := subs(x=x0,y=y0,diff(f,x)):
dy := subs(x=x0,y=y0,diff(f,y)):

z0 := subs(x=x0,y=y0,f):

tanfunc:=z0+dx*(x-x0)+dy*(y-y0):

tanpt:=pointplot({[x0,y0,z0]},color=red):
gpha := plot3d(f,xrange,yrange,optio):
xsour:=abs(xmax-xmin)/4;
ysour:=abs(ymax-ymin)/4;
gphb:=plot3d(tanfunc,x=x0-xsour..x0+xsour,y=y0-ysour..y0+ysour,optio):

rovnice:=z=tanfunc:
print(`Tecna rovina ma rovnici `);
print(rovnice);

display ([gpha, gphb,tanpt]);
end:

mvcalp[difer]:=proc()

local derx,dery,dif;

if nargs=1 then
                #print('Diferencial v obecnem bode ');
                print(diff(args[1],x)*h+diff(args[1],y)*k);
fi;
if nargs=5 then
               # print('Diferencial funkce v danem bode a s danymi diferencemi je');
                derx:=subs(x=args[2],y=args[3],diff(args[1],x));
                dery:=subs(x=args[2],y=args[3],diff(args[1],y));
                dif:=derx*args[4]+dery*args[5];
RETURN(dif);
fi;
if nargs<>1 and nargs <>5 then print ('Spatne_zadano')
fi;
end:

mvcalp[difern]:=proc(funkce,m)
local j;
RETURN(sum(binomial(m,j)*diff(funkce, x$j,y$(m-j))*h^j*k^(m-j), j=0..m));
end:

mvcalp[ParamTan]:= proc (f,srange,trange,pt)
#Define local variables
local
planefunc,s0,t0,smin,smax,tmin,tmax,pama,dfs,dft,z0,pamb,pamc,tanpt,optio;
#Allow us to use (display) and (pointplot) commands
with(plots,pointplot):
with(plots,display):

#Extract specific variables we need from the larger variables define as input from user
s0:= op (2,pt)[1]:
t0:= op (2,pt)[2]:
smin := op(1,op(2,srange)):
smax := op(2,op(2,srange)):
tmin := op(1,op(2,trange)):
tmax := op(2,op(2,trange)):
optio:= args[5..nargs];

#Plot the parametric surface.  Note: f is a 3-vector as defined by user
    pama:= plot3d(f,srange,trange,style=HIDDEN,axes=BOXED):

# Find the tanget vectors by taking partials with respect to s and then to t
    dfs := subs(s=s0,t=t0,diff(f,s)):
    dft := subs(s=s0,t=t0,diff(f,t)):

#Find the point of tangency
   z0  := subs (s=s0,t=t0,f);

#Plot point of tangency under variable name tanpt
  tanpt := pointplot ({z0},color=black):

# Parameterize plane using tangent vectors and k,l as parameters, add z0 to give proper translation
   planefunc := evalm (k*dfs+l*dft+z0):

#Plot the tangent plane under variable name pamb, limit parameters so as not to obstruct viewing
   pamb:=plot3d(planefunc,k=-(smax-smin)/8..(smax-smin)/8,l=-(tmax-tmin)/8..(tmax-tmin)/8,style=PATCHNOGRID):

#Display the plots
display ([pama,pamb,tanpt],optio);
end:

mvcalp[ImplicitTan] := proc (F,xrange,yrange,zrange,pt)
#Define local variable names
local f,K,gradat,tanpt,x0,y0,z0,impa,impb,dx,dy,dz,vec0,planefunc,optio;
#Allows us to use (implicitplot3D), (display), and (pointplot) commands
with(plots,pointplot):
with(plots,display):
with(plots,implicitplot3d):

# Allows (innerprod) command
with (linalg,innerprod):

#Extract different variables we need from larger variable given by user input
x0 := op (2,pt)[1]:
y0 := op (2,pt)[2]:
z0 := op (2,pt)[3]:
optio:=args[6..nargs];

#Plot implicit surface under variable name impa
impa := implicitplot3d(F,xrange,yrange,zrange,style=HIDDEN,axes=BOXED):

#If F is just an expression rename it f
  f := F:

#If F is an equation, extract the expression as f and the constant as K
if type(F,`=`) = 'true' then
f:= lhs (F):
K := rhs (F):
fi;

#Evaluate partials of f with repect to x, y, and z.
dx := subs(x=x0,y=y0,z=z0,diff(f,x)):
dy := subs(x=x0,y=y0,z=z0,diff(f,y)):
dz := subs(x=x0,y=y0,z=z0,diff(f,z)):

#Create the gradient vector at [x0,y0,z0] Which we know is normal to suface
gradat := [dx,dy,dz]:

#Find the fuction for tangent plane (implicitly defined)
#Using fact that plane is given by--  grad(x0,y0,z0) dot ([x-x0,y-y0,z-z0]) = 0

vec0:=  (evalm([x,y,z]-[x0,y0,z0])):
planefunc:= innerprod(gradat,vec0):

#Plot tangent plane under variable name impb
impb := implicitplot3d(planefunc,xrange,yrange,zrange):

#Plot point of tangency
tanpt := pointplot({[x0,y0,z0]},color=red):

#Display surface, tangent plane, tangent point
display ([impa,impb,tanpt],optio);
end:

mvcalp[kmen] := proc(m,n)
if diff(m,y)=diff(n,x) then
simplify(integrate(m,x)+integrate(n-diff(integrate(m,x),y),y));
else print(`Zadany vyraz neni diferencialem zadne funkce`);
fi
end:

mvcalp[dzd1] := proc(z,uu,vv,u,v,x,y)
diff(z,u)*diff(uu,x)+diff(z,v)*diff(vv,x);
end:

mvcalp[dzd2] := proc(z,uu,vv,u,v,x,y)
diff(z,u)*diff(uu,y)+diff(z,v)*diff(vv,y);
end:

mvcalp[dzdd1] := proc(z,uu,vv,u,v,x,y)
diff(z,u,u)*diff(uu,x)^2+2*diff(z,u,v)*diff(vv,x)*diff(uu,x)+
diff(z,v,v)*diff(vv,x)^2+diff(z,u)*diff(uu,x,x)+
diff(z,v)*diff(vv,x,x);
end:

mvcalp[dzdd2] := proc(z,uu,vv,u,v,x,y)
diff(z,u,u)*diff(uu,y)^2+2*diff(z,u,v)*diff(vv,y)*diff(uu,y)+
diff(z,v,v)*diff(vv,y)^2+diff(z,u)*diff(uu,y,y)+
diff(z,v)*diff(vv,y,y);
end:

mvcalp[dzdd12]:=proc(z,uu,vv,u,v,x,y)
diff(z,u,u)*diff(uu,x)*diff(uu,y)+diff(z,u,v)*diff(vv,y)*diff(uu,x)+
diff(z,u,v)*diff(vv,x)*diff(uu,y)+diff(z,v,v)*diff(vv,x)*diff(vv,y)+
diff(z,u)*diff(uu,x,y)+diff(z,v)*diff(vv,x,y);
end:

mvcalp[implicitdiff] := proc(g)
local tmp,DIFFg,DIFFy,DIFFy0,p1:
DIFFg:= diff(g,x):
DIFFy:=simplify(solve(subs(diff(y(x),x)=p1,DIFFg)=0,p1));
end:

mvcalp[implicitdiffb] := proc(x0,y0,g)
local tmp,DIFFg,DIFFy,DIFFy0,p1:
tmp:=subs(y(x)=y0,g):
if (simplify(subs(x=x0,tmp)) <> 0) then
ERROR(` x0,y0 appear not to be on the curve`):
fi:
DIFFg:= diff(g,x):
DIFFy:=simplify(solve(subs(diff(y(x),x)=p1,DIFFg)=0,p1)):
DIFFy0:= simplify(subs(x=x0,y(x0)=y0,DIFFy)):
DIFFy0
end:

mvcalp[graf_t] := proc() local a,b,c,u,v,k;
  a:=diff(args[1],x);
  b:=diff(args[1],y);
  u:=op(1,args[2]);
  v:=op(2,args[2]);
  c:=eval(subs({x=u,y=v},args[1]));
  if c=0 then
  k:=(subs({x=u,y=v},a)*(x-u)+subs({x=u,y=v},b)*(y-v));
  print(`Rovnice tecny v bode`,args[2],`je `,k=0);
  if nargs(graf_t)=6 then
  RETURN (plots[implicitplot]({args[1],k},x=args[3]..args[4],y=args[5]..args[6]));
  fi;
  fi;
  if c<>0 then
  print(`Bod`,args[2],`nelezi na krivce `,args[1]=0);
   fi;
  end:

mvcalp[drawpoint] := proc( point)
local u1 , u2, u3, u4;
u1 := point[1] ; u2 := point[2]; u3 := point[3];
u4 := max( abs(u1),abs(u2),abs(u3));
plot3d( {[u1+t, u2+t, u3], [u1, u2+t, u3+t],[u1+t, u2, u3+t], [u1, u2,s*u3],
[s*u1, u2, 0], [u1, s*u2,0]}, t=-0.1*u4-0.01..0.1*u4+0.01, s=0..1,
grid=[2,2], view=[-u4-1..u4+1,
-u4-1..u4+1, -u4-1..u4+1], axes= NORMAL); end :

mvcalp[lagrange] := proc(f,c,g,h,v)
        local curve;
                curve := solve(f=c, y);
        plot({curve, solve(g,y)},h,v);
end:

mvcalp[drawplane] := proc()
local a ,b , c, d, temp ;
if (nops(args[1]) <> 2) then
ERROR(`input equation is not a plane` ) fi;
temp := op(1, args[1])- op(2, args[1]):
a:= diff(temp,x) : b:=diff(temp,y):  c:= diff(temp, z): d:=subs(x=0,y=0,z=0,
temp):
if not type (evalf(a), numeric) or not type (evalf(b), numeric) or not type
(evalf(c), numeric) or not type (evalf(d), numeric)  then
ERROR(`input equation is not a plane` ) fi;
if (op(1, args[2]) = 'x') or (op(1, args[3]) = 'x') then
       if (op(1, args[2]) = 'y') or (op(1, args[3]) = 'y')  then
              if (evalf(c) =0) then
                   ERROR(`the given expression cannot draw a plane`)
              else
            plot3d( (-d-a*x-b*y)/c,  args[2..nargs], grid=[5,5],
axes=framed);    fi;
         else
              if (evalf(b) =0) then
                   ERROR(`the given expression cannot draw a plane`)
              else
        plot3d( [x, (-d-a*x-c*z)/b, z], args[2..nargs], grid=[5,5],
axes=framed);  fi;
        fi;
else
if (evalf(a) =0) then
         ERROR(`the given expression cannot draw a plane`)
else
plot3d([(-d-b*y-c*z)/a, y, z], args[2..nargs], grid=[5,5], axes=framed);
fi; fi; end :

mvcalp[levelcurve]:= proc()
local a1, a2, a3, a4, b, b1, b2, b3, b4, c1, e, f, F, c,
opts, x, y, xrange,
yrange, curve, r, i, ans, j;
F:=args[1]:
c:=args[2]:
x:=lhs(args[3]):
y:=lhs(args[4]):
xrange:=args[3]:
yrange:=args[4]:
opts:=args[5..nargs]:
if type(c, constant) then c1 := [c] else c1 := c fi;
if not type(c1, list(constant)) then
ERROR(`illegal constant`) fi;
curve := {};
b3 := diff(F,y$3) ;
a3 := diff(F,x$3) ;
if b3 =0 then
if a3 =0 then
for i from 1 to nops(c1) do
ans := {solve(F=c1[i],x)};
for j from 1 to nops(ans) do
curve := curve union { [subs(y=t,ans[j]), t, t =op(2,yrange)]};
od;
od;
for i from 1 to nops(c1) do
ans := {solve(F=c1[i],y)};
for j from 1 to nops(ans) do
curve := curve union { [t, subs(x=t, ans[j]), t=op(2,xrange)]};
od;
od;
if nargs<5 then plot(curve, xrange, yrange); else plot(curve, xrange,
yrange,opts); fi;
else
for i from 1 to nops(c1) do
curve := curve union {solve(F=c1[i],y)};
od;
if nargs<5 then plot(curve, xrange, yrange); else plot(curve, xrange,
yrange,opts); fi;
fi;
else
if a3 =0 then
for i from 1 to nops(c1) do
ans := {solve(F=c1[i],x)};
for j from 1 to nops(ans) do
curve := curve union { [ans[j], y, yrange]};
od;
od;
if nargs < 5 then plot(curve, xrange, yrange);
else plot(curve, xrange,
yrange,opts); fi;
else
if diff( subs(x^4=r, subs(x^2=r, f)),x) = 0 then
for i from 1 to nops(c1) do
ans := {solve(F=c1[i],x)};
for j from 1 to nops(ans) do
curve := curve union { [ans[j], y,yrange]};
od;
od;
if nargs<5 then plot(curve, xrange, yrange); else plot(curve, xrange,
yrange,opts); fi;
else
for i from 1 to nops(c1) do
curve := curve union {solve(F=c1[i],y)};
od;
if nargs<5 then plot(curve, xrange, yrange);
else plot(curve, xrange,
yrange,opts); fi;
fi;
fi;
fi;
end:

mvcalp[levelsurface] := proc(f, c, h, v)
        local surface, i, j, ans;
       if nops(c) = 1 then
                if not (diff(f, z) = 0) then
                surface := solve(f = c, z);
                plot3d({surface}, h, v, grid=[12,12]);
                else
                surface :={ } ;
                ans := {solve(f=c, y) };
                for j from 1 to nops(ans) do
                        surface := surface union{[x, ans[j], z]};
                  od;
                plot3d(surface, h, z=-2..2, grid=[12,12]);
              fi;
        else
                surface := {};
               if not (diff(f, z) = 0) then
                    for i from 1 to nops(c) do
                        surface := surface union {solve(f = c[i], z)};
                    od;
                plot3d(surface, h, v, grid=[12,12]);
               else
                                for i from 1 to nops(c) do
                 ans := {solve(f=c[i], y) };
                for j from 1 to nops(ans) do
                        surface := surface union{[x, ans[j], z]};
                od;
                  od;
                plot3d(surface, h, z=-2..2, grid=[12,12]);
              fi;
        fi;
end :



#Maple help file for mvcalp package by Roman Plch
#Last modified 1998

`help/text/mvcalp` := TEXT(
`HELP FOR: Introduction to the mvcalp package`,
`   `,
`CALLING SEQUENCE:`,
`       <function>(args)`,
`   `,
`SYNOPSIS:   `,
`   `,
`-To use a function from mvcalp, invoke it with the call <function>(args),`,
` where <function> is the name of the function and args are the appropriate`,
` arguments for the function.`,
`   `,
`-The available functions are:`,
`       difer, difern`,
`       drawpoint`,
`       drawplane`,
`       dzd1, dzd2`,
`       dzdd1, dzdd2, dzdd12`,
`       GraphTan, ParamTan, ImplicitTan`,
`       graf_t`,
`       implicitdiff`,
`       implicitdiffb`,
`       kmen`,
`       lagrange   `,
`       levelcurve`,
`       levelsurface`,
`       mvextrem`,
`       sing`,
`       takereal`,
`   `,
`-For more information about a particular function, invoke help for that `,
` function with the command ?<function>`,
`       `,
`SEE ALSO: with, help`,
`  `
):

`help/text/difer`:=TEXT(
`HELP FOR: mvcalp[difer]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       difer(f(x,y))`,
`       difer(f(x,y),x0,y0,h,k)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje totalni diferencial zadane funkce v obecnem bode,`,
` pri zadani s 5-ti parametry totalni diferencial dane funkce`,
` v bode [x0,y0] s diferencemi h,k.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> difer(x^3+ln(x*y));`,
`       `,
`> difer(x^3+ln(x*y),1,3,0.2,-0.01);`,
`       `,
`SEE ALSO: mvcalp[difern]`,
`       `
):

`help/text/difern`:=TEXT(
`HELP FOR: mvcalp[difern]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       difern(f(x,y),m)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita diferencial m-teho radu funkce f.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> difern(y/x,2);`,
`       `,
`> difern(f(x,y),3);`,
`       `,
`SEE ALSO: mvcalp[difer]`,
`       `
):

`help/text/drawplane` := TEXT(
`HELP FOR: mvcalp[drawplane]`,
`   `,
`CALLING SEQUENCE:`,
`   `,
`       drawplane(a*x+b*y+c*z=d,x=x1..x2,y=y1..y2,opts)`,
`       drawplane(a*x+b*y+c*z=d,x=x1..x2,z=z1..z2,opts)`,
`       drawplane(a*x+b*y+c*z=d,y=y1..y2,z=z1..z2,opts)`,
`   `,
`PARAMETERS:`,
`   `,
`       a, b, c, d, x1, x2, y1, y2, z1, and z2 are symbolic constants,`,
`       such as Pi and E, integers, or real floating point numbers;`,
`       i.e., evalf(a), evalf(b), etc. must all be of type numeric.`,
`       `,
`       opts is a list of plot3d options`,
`   `,
`SYNOPSIS:   `,
`   `,
`-The drawplane function will draw the plane described by the equation`,
` a*x+b*y+c*z=d as a graph of a linear function of the two variables`,
` specified by the ranges given in the second and third arguments of the`,
` function call. For example, the call drawplane(x+y-2*z=3,x=0..1,z=-2..3)`,
` plots the portion of the plane y=2*z-x+3 over the rectangle 0<=x<=1,`,
` -2<=z<=3. The function returns a plot3d structure.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> drawplane(x+y-2*z=3,x=0..1,z=-2..3);`,
`       `,
`> drawplane(2*x+y=1,x=2.3..4,z=0..3,axes=BOXED);`,
`       `,
`SEE ALSO: mvcalp[drawplane],`,
`       plot3d, plot3d[options]`,
`   `):

`help/text/drawpoint` := TEXT(
`HELP FOR: mvcalp[drawpoint]`,
`   `,
`CALLING SEQUENCE:`,
`   `,
`       drawpoint(pt);`,
`   `,
`PARAMETERS:`,
`   `,
`       pt is a three-element list.`,
`   `,
`SYNOPSIS:`,
`   `,
`-The drawpoint function plots the location of the point pt by showing`,
` the x-, y-, and z-componts of it relative to the axes. The drawpoint`,
` function returns a plot3d structure.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> drawpoint([1,1,1]);`,
`       `,
`SEE ALSO: plot3d, plot3d[options]`,
`   `):

`help/text/dzd1`:=TEXT(
`HELP FOR: mvcalp[dzd1]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       dzd1(z,uu,vv,u,v,x,y)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita parcialni derivaci 1. radu slozene funkce dvou`,
` promennych podle 1. promenne (x). Parametry procedury`,
` jsou: z je funkce z=f(u,v),`,
` uu je funkce u(x,y) a vv v(x,y), u,v,x,y promenne, ve kterych`,
` jsou funkce zapsany.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> dzd1(z(u,v), u(x,y), v(x,y), u,v,x,y);`,
`       `,
`> dzd1(exp(u)*sin(v), x*y, x+y, u,v,x,y);`,
`       `,
`SEE ALSO: mvcalp[dzd2], mvcalp[dzdd1], mvcalp[dzdd1], mvcalp[dzdd12]`,
`       `
):

`help/text/dzd2`:=TEXT(
`HELP FOR: mvcalp[dzd2]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       dzd2(z,uu,vv,u,v,x,y)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita parcialni derivaci 1. radu slozene funkce dvou`,
` promennych podle 2. promenne (y). Parametry procedury`,
` jsou: z je funkce z=f(u,v),`,
` uu je funkce u(x,y) a vv v(x,y), u,v,x,y promenne, ve kterych`,
` jsou funkce zapsany.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> dzd2(z(u,v), u(x,y), v(x,y), u,v,x,y);`,
`       `,
`> dzd2(exp(u)*sin(v), x*y, x+y, u,v,x,y);`,
`       `,
`SEE ALSO: mvcalp[dzd1], mvcalp[dzdd1], mvcalp[dzdd1], mvcalp[dzdd12]`,
`       `
):

`help/text/dzdd1`:=TEXT(
`HELP FOR: mvcalp[dzdd1]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       dzdd1(z,uu,vv,u,v,x,y)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita parcialni derivaci 2. radu slozene funkce dvou`,
` promennych podle 1. promenne (y). Parametry procedury`,
` jsou: z je funkce z=f(u,v),`,
` uu je funkce u(x,y) a vv v(x,y), u,v,x,y promenne, ve kterych`,
` jsou funkce zapsany.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> dzdd1(z(u,v), u(x,y), v(x,y), u,v,x,y);`,
`       `,
`> dzdd1(z(u,v), x+a*y, x-a*y, u,v,x,y);`,
`       `,
`SEE ALSO: mvcalp[dzd1], mvcalp[dzd2], mvcalp[dzdd2], mvcalp[dzdd12]`,
`       `
):

`help/text/dzdd2`:=TEXT(
`HELP FOR: mvcalp[dzdd2]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       dzdd2(z,uu,vv,u,v,x,y)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita parcialni derivaci 2. radu slozene funkce dvou`,
` promennych podle 2. promenne (y). Parametry procedury`,
` jsou: z je funkce z=f(u,v),`,
` uu je funkce u(x,y) a vv v(x,y), u,v,x,y promenne, ve kterych`,
` jsou funkce zapsany.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> dzdd2(z(u,v), u(x,y), v(x,y), u,v,x,y);`,
`       `,
`> dzdd2(z(u,v), x+a*y, x-a*y, u,v,x,y);`,
`       `,
`SEE ALSO: mvcalp[dzd1], mvcalp[dzd2], mvcalp[dzdd1], mvcalp[dzdd12]`,
`       `
):

`help/text/dzdd12`:=TEXT(
`HELP FOR: mvcalp[dzdd12]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       dzdd12(z,uu,vv,u,v,x,y)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita smisenou parcialni derivaci 2. radu slozene funkce dvou`,
` promennych. Parametry procedury`,
` jsou: z je funkce z=f(u,v),`,
` uu je funkce u(x,y) a vv v(x,y), u,v,x,y promenne, ve kterych`,
` jsou funkce zapsany.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> dzdd12(z(u,v), u(x,y), v(x,y), u,v,x,y);`,
`       `,
`> dzdd12(z(u,v), x+a*y, x-a*y, u,v,x,y);`,
`       `,
`SEE ALSO: mvcalp[dzd1], mvcalp[dzd2], mvcalp[dzdd1], mvcalp[dzdd2]`,
`       `
):

`help/text/GraphTan`:=TEXT(
`HELP FOR: mvcalp[GraphTan]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       GraphTan(f(x,y),x=a..b,y=c..d,bod=[x0,y0],opts)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita rovnici tecne roviny k funkci f(x,y) v bode [x0,y0]`,
` a zobrazi do jednoho obrazku funkci i jeji tecnou rovinu.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> GraphTan(4-x^2-y^2, x=-4..4, y=-4..4, bod=[3,2], axes=boxed);`,
`       `,
`> GraphTan(x^2-y^3, x=-3..3, y=-3..3, bod=[1,2], grid=[30,30]);`,
`       `,
`SEE ALSO: mvcalp[ParamTan], mvcalp[ImplicitTan]`,
`       `
):

`help/text/ParamTan`:=TEXT(
`HELP FOR: mvcalp[ParamTan]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       ParamTan([exprf,exprg,exprh], s=a..b, t=c..d, point=[s0,t0], opts)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Generuje PC-graf plochy dane parametricky a jeji tecne roviny`,
` v bode [s0,t0].`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`>ParamTan([(3+cos(s))*cos(t),(3+cos(s))*sin(t),sin(s)],s=0..2*Pi,t=0..2*Pi,`,
`>point=[1,2]);`,
`       `,
`SEE ALSO: mvcalp[GraphTan], mvcalp[ImplicitTan]`,
`       `
):

`help/text/ImplicitTan`:=TEXT(
`HELP FOR: mvcalp[ImplicitTan]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       ImplicitTan(F(x,y,z), x=a..b, y=c..d, z=p..q. point=[x0,y0, z0], opts)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Generuje PC-graf plochy dane implicitne rovnici F(x,y,z)=0  a jeji tecne roviny`,
` v bode [x0,y0,z0].`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> ImplicitTan(x^2+y^2+z^2=2, x=-2..2, y=-2..2, z=-2..2, point=[1,1,0]);`,
`       `,
`SEE ALSO: mvcalp[GraphTan], mvcalp[ParamTan]`,
`       `
):

`help/text/graf_t`:=TEXT(
`HELP FOR: mvcalp[graf_t]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       graf_t(F(x,y),[a,b])`,
`       `,
`       graf_t(F(x,y), [a,b], x1,x2,y1,y2)`,
`       `,
`SYNOPSIS:`,
`       `,
`-Pocita rovnici tecny ke krivce dane implicitne rovnici F(x,y)=0`,
` v bode [a,b].`,
` Pokud jsou dany meze x1,y1,x2,y2, procedura nakresli graf`,
` krivky i tecny v zadanych mezich.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> graf_t(y^3-x*y+6, [7,2], -10,10,-4,4);`,
`       `,
`> graf_t(y^3-x*y+6, [1,1]);`,
`       `,
`SEE ALSO: mvcalp[dzd1], mvcalp[dzd2], mvcalp[dzdd1], mvcalp[dzdd2]`,
`       `
):

`help/text/implicitdiff`:=TEXT(
`HELP FOR: mvcalp[implicitdiff]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       implicitdiff(F(x,y))`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje derivaci funkce dane implicitne rovnici F(x,y)=0.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> implicitdiff(y(x)^3-x*y(x)+6);`,
`       `,
`SEE ALSO: mvcalp[implicitdiffb], mvcalp[graf_t]`,
`       `
):

`help/text/implicitdiffb`:=TEXT(
`HELP FOR: mvcalp[implicitdiff]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       implicitdiffb(x0,y0,F(x,y))`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje hodnotu derivace funkce dane implicitne rovnici F(x,y)=0`,
` v bode [x0,y0].`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> implicitdiffb(7,2,y(x)^3-x*y(x)+6);`,
`       `,
`SEE ALSO: mvcalp[implicitdiff], mvcalp[graf_t]`,
`       `
):

`help/text/kmen`:=TEXT(
`HELP FOR: mvcalp[kmen]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       kmen(m(x,y),n(x,y))`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje, zda je zadany vyraz m(x,y)dx + n(x,y)dy diferencialem nejake`,
`funkce a v pripade, ze ano, tuto funkci urci.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> kmen(x^2-y^2,5-2*x*y);`,
`       `,
`SEE ALSO: `,
`       `
):

`help/text/lagrange` := TEXT(
`HELP FOR: mvcalp[lagrange]`,
`   `,
`CALLING SEQUENCE:`,
`   `,
`       lagrange(f,L,g,x=a..b,y=c..d)`,
`   `,
`PARAMETERS:`,
`   `,
`       f is an expression in x and y,`,
`       L is a numerical value or symbolic constant,`,
`       g is an equation in x and y,`,
`       a, b, c, d are numerical values or symbolic constants.`,
`   `,
`SYNOPSIS:   `,
`   `,
`-The lagrange function plots the level curve f=L together with the curve`,
` defined implicitly by the equation g over the rectangle [a,b]x[c,d]. The`,
` function returns a plot structure.`,
`       `,
`EXAMPLES:   `,
`   `,
`> with(mvcalp);`,
`   `,
`> lagrange(10*x*y,3,x^2+y^2=1,x=-2..2,y=-2..2);`,
`   `,
`> lagrange(10*x*y,5,x^2+y^2=1,x=-2..2,y=-2..2);`,
`   `,
`> lagrange(x^2+y^2, 3, x^2-2*x+y^2-4*y=0,x=-5..5,y=-5..5);`,
`       `,
`SEE ALSO: plot, plot[options]`,
`   `):

`help/text/levelcurve` := TEXT(
`HELP FOR: mvcalp[levelcurve]`,
`   `,
`CALLING SEQUENCE:`,
`   `,
`       levelcurve(f,L,x=a..b,y=c..d)`,
`   `,
`PARAMETERS:`,
`   `,
`       f is an expression in x and y,`,
`       L is a numerical value or a list of numerical values,`,
`       a, b, c, d are numerical values (including symbolic constants).`,
`   `,
`SYNOPSIS:   `,
`   `,
`-The levelcurve function plots the level curve(s) f=L. This function is `,
` superceded by implicitplot in MapleV release 2 and higher. The function `,
` returns a plot structure.`,
`       `,
`EXAMPLES:   `,
`   `,
`> with(mvcalp);`,
`   `,
`> levelcurve(x^2+y^2,2,x=-2..2,y=-2..2);`,
`   `,
`> levelcurve(x^2+y^2,[0,2,4],x=-2..2,y=-2..2);`,
`       `,
`SEE ALSO: plots[implicitplot], plots[contourplot], mvcalp[levelsurface],`,
`       plot, plot[options]`,
`   `):

`help/text/levelsurface` := TEXT(
`HELP FOR: mvcalp[levelsurface]`,
`   `,
`CALLING SEQUENCE:`,
`   `,
`       levelsurface(f,L,x=a..b,y=c..d)`,
`   `,
`PARAMETERS:`,
`   `,
`       f is an expression in x, y, and z,`,
`       L is a numerical value or a list of numerical values,`,
`       a, b, c, d are numerical values (including symbolic constants).`,
`   `,
`SYNOPSIS:   `,
`   `,
`-The levelsurface function plots the level surface(s) f=L. This function is `,
` superceded by implicitplot3d in MapleV release 2 and higher. The function `,
` returns a plot3d structure.`,
`       `,
`EXAMPLES:   `,
`   `,
`> with(mvcalp);`,
`   `,
`> levelsurface(x^2+y^2+z^2,1,x=-3..3,y=-3..3);`,
`   `,
`> levelsurface(x^2+y^2-z^2,[-1,0,1],x=-2..2,y=-2..2);`,
`       `,
`SEE ALSO: plots[implicitplot3d], mvcalp[levelcurve], plot3d, plot3d[options]`,
`   `):

`help/text/mvextrem`:=TEXT(
`HELP FOR: mvcalp[mvextrem]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       mvextrem(f(x,y))`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje lokalni extremy funkce dvou promennych.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> mvextrem(x^4+y^4-x^2-2*x*y-y^2);`,
`       `,
`SEE ALSO: mvcalp[sing]`,
`       `
):

`help/text/sing`:=TEXT(
`HELP FOR: mvcalp[sing]`,
`       `,
`CALLING SEQUENCE:`,
`       `,
`       sing(f(x,y))`,
`       `,
`SYNOPSIS:`,
`       `,
`-Urcuje singularni body zadane funkce dvou promennych.`,
`       `,
`EXAMPLES:`,
`       `,
`> with(mvcalp);`,
`       `,
`> sing(x^3+y^2);`,
`       `,
`SEE ALSO: mvcalp[mvextrem]`,
`       `
):