Differences between revisions 57 and 58
Revision 57 as of 2013-04-24 18:45:37
Size: 58970
Editor: travis
Revision 58 as of 2013-04-24 18:48:01
Size: 61047
Editor: travis
Deletions are marked like this. Additions are marked like this.
Line 971: Line 971:
http://www.sagenb.org/home/pub/2828/ http://sagenb.mc.edu/home/pub/97/
Line 981: Line 981:
## An updated version of this worksheet may be available at http://sagenb.mc.edu
Line 986: Line 985:
Line 988: Line 988:
def _(f=input_box(default=(x^3-y^3)/(x^2+y^2)),R=slider(0.1/10,Rmax,1/10,2),x0=(0),y0=(0)):
def _(f=input_box((x^2-y^2)/(x^2+y^2),width=30,label='$f(x)$'),
        R=slider(Rmin,Rmax,1/10,Rmax,label=',   $R$'),
        curves=checkbox(default=false,label='Show curves'),
        graphjmol=checkbox(default=true,label='Interactive graph')):
    if graphjmol:
        view_method = 'jmol'
        view_method = 'tachyon'
Line 997: Line 1008:
Line 999: Line 1010:
    limit = plot3d(g,(t,0,2*pi),(r,1/100,R),transformation=cylinder,rgbcolor=(0,1,0))     collapsing_surface = plot3d(g,(t,0,2*pi),(r,1/100,R),transformation=cylinder,rgbcolor=(0,1,0))
Line 1001: Line 1012:
    print html('Enter $(x_0 ,y_0 )$ above and see what happens as R approaches zero.')
    print html('The surface has a limit as $(x,y)$ approaches ('+str(x0)+','+str(y0)+') if the green region collapses to a point')
    G = surface+collapsing_surface
    html('Enter $(x_0 ,y_0 )$ above and see what happens as $ R \\rightarrow 0 $.')
    html('The surface has a limit as $(x,y) \\rightarrow $ ('+str(x0)+','+str(y0)+') if the green region collapses to a point.')

# If checked, add a couple of curves on the surface corresponding to limit as x->x0 for y=x^(3/5),
# and as y->y0 for x=y^(3/5). Should make this more robust but perhaps using
# these relatively obtuse curves could eliminate problems.

    if curves:
        curve_x = parametric_plot3d([x0-t,y0-t^(3/5),f(x=x0-t,y=y0-t^(3/5))],(t,Rmin,Rmax),color='red',thickness=10)
        curve_y = parametric_plot3d([x0+t^(3/5),y0+t,f(x=x0+t^(3/5),y=y0+t)],(t,Rmin,Rmax),color='red',thickness=10)
        R2 = Rmin/4
        G += arrow((x0-Rmin,y0-Rmin^(3/5),f(x=x0-Rmin,y=y0-Rmin^(3/5))),(x0-R2,y0-R2^(3/5),f(x=x0-R2,y=y0-R2^(3/5))),size=30 )
        G += arrow((x0+Rmin^(3/5),y0+Rmin,f(x=x0+Rmin^(3/5),y=y0+Rmin)),(x0+R2^(3/5),y0+R2,f(x=x0+R2^(3/5),y=y0+R2)),size=30 )

        limit_x = limit(f(x=x0-t,y=y0-t^(3/5)),t=0)
        limit_y = limit(f(x=x0+t^(3/5),y=y0+t),t=0)
        text_x = text3d(limit_x,(x0,y0,limit_x))
        text_y = text3d(limit_y,(x0,y0,limit_y))
        G += curve_x+curve_y+text_x+text_y
        html('The red curves represent a couple of trajectories on the surface. If they do not meet, then')
        html('there is also no limit. (If computer hangs up, likely the computer can not do these limits.)')
        html('\n<center><font color="red">$\lim_{(x,?)\\rightarrow(x_0,y_0)} f(x,y) =%s$</font>'%str(limit_x)+' and <font color="red">$\lim_{(?,y)\\rightarrow(x_0,y_0)} f(x,y) =%s$</font></center>'%str(limit_y))
    if in_3d:

Sage Interactions - Calculus

goto interact main page

Root Finding Using Bisection

by William Stein


Newton's Method

Note that there is a more complicated Newton's method below.

by William Stein



A contour map and 3d plot of two inverse distance functions

by William Stein



A simple tangent line grapher

by Marshall Hampton


Numerical integrals with the midpoint rule

by Marshall Hampton


Numerical integrals with various rules

by Nick Alexander (based on the work of Marshall Hampton)


Some polar parametric curves

by Marshall Hampton. This is not very general, but could be modified to show other families of polar curves.


Function tool

Enter symbolic functions f, g, and a, a range, then click the appropriate button to compute and plot some combination of f, g, and a along with f and g. This is inspired by the Matlab funtool GUI.


Newton-Raphson Root Finding

by Neal Holtz

This allows user to display the Newton-Raphson procedure one step at a time. It uses the heuristic that, if any of the values of the controls change, then the procedure should be re-started, else it should be continued.


Coordinate Transformations

by Jason Grout

coordinate-transform-1.png coordinate-transform-2.png

Taylor Series

by Harald Schilly


Illustration of the precise definition of a limit

by John Perry

I'll break tradition and put the image first. Apologies if this is Not A Good Thing.


A graphical illustration of sin(x)/x -> 1 as x-> 0

by Wai Yan Pong


Quadric Surface Plotter

by Marshall Hampton. This is pretty simple, so I encourage people to spruce it up. In particular, it isn't set up to show all possible types of quadrics.


The midpoint rule for numerically integrating a function of two variables

by Marshall Hampton


Gaussian (Legendre) quadrature

by Jason Grout

The output shows the points evaluated using Gaussian quadrature (using a weight of 1, so using Legendre polynomials). The vertical bars are shaded to represent the relative weights of the points (darker = more weight). The error in the trapezoid, Simpson, and quadrature methods is both printed out and compared through a bar graph. The "Real" error is the error returned from scipy on the definite integral.

quadrature1.png quadrature2.png

Vector Calculus, 2-D Motion FIXME

By Rob Beezer

A fast_float() version is available in a worksheet


Vector Calculus, 3-D Motion

by Rob Beezer

Available as a worksheet


Multivariate Limits by Definition FIXME

by John Travis




Directional Derivatives

This interact displays graphically a tangent line to a function, illustrating a directional derivative (the slope of the tangent line).

directional derivative.png

3D graph with points and curves

By Robert Marik

This sagelet is handy when showing local, constrained and absolute maxima and minima in two variables. Available as a worksheet


Approximating function in two variables by differential

by Robert Marik


Taylor approximations in two variables

by John Palmieri

This displays the nth order Taylor approximation, for n from 1 to 10, of the function sin(x2 + y2) cos(y) exp(-(x2+y2)/2).


Volumes over non-rectangular domains

by John Travis



Lateral Surface Area

by John Travis



Parametric surface example

by Marshall Hampton


Line Integrals in 3D Vector Field

by John Travis



interact/calculus (last edited 2020-08-11 14:10:09 by kcrisman)