File: zoom-differentiability.gel

package info (click to toggle)
genius 1.0.27-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 25,308 kB
  • sloc: ansic: 75,620; xml: 71,565; sh: 4,445; makefile: 1,927; lex: 523; yacc: 298; perl: 54
file content (25 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Category: Calculus
# Name: Differentiability of a function of two variables

the_answer = AskButtons("Zoom into a...", "nondifferentiable function", "differentiable function");

PlotWindowPresent(); # Make sure the window is raised

SurfacePlotDrawLegends = false;

# use standard variable names (in case they got reset)
SurfacePlotVariableNames = ["x","y","z"];

if the_answer == 1 then (
     for n=1 to 200 do (
        SurfacePlot(`(x,y)=if x!=0.0 or y!=0.0 then (y^3)/(x^2+y^2)+0.4*sin(2*x)^2-0.3*atan(y) else 0.0,(0.95^n)*[-5,5,-5,5,-5,5]);
        if (n==1) then wait(2);
        wait(0.02);
    )
) else if the_answer == 2 then (
    for n=1 to 200 do (
        SurfacePlot(`(x,y)=0.4*x+0.3*y+0.2*x^2-0.3*y^2,(0.95^n)*[-5,5,-5,5,-5,5]);
        if (n==1) then wait(2);
        wait(0.02);
    )
)