Differences between revisions 47 and 53 (spanning 6 versions)
Revision 47 as of 2012-03-16 06:53:53
Size: 57910
Editor: jason
Comment:
Revision 53 as of 2012-04-23 00:28:01
Size: 57675
Editor: rbeezer
Comment: Five derivatives now explicity with respect to t
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
[[HTML(<b>hi</b><script>alert('hi');</script>)]]
{{{#!rhtml
<script type="text/javascript" src="http://aleph.sagemath.org/static/jquery.min.js"></script>
<script type="text/javascript" src="http://aleph.sagemath.org/embedded_sagecell.js"></script>
<script type="text/javascript">alert('hi');</script>
    <script>
$(function() {
    var makecells = function() {
        sagecell.makeSagecell({
            inputLocation: '#interact1',
            evalButtonText: 'Interact'});
    }
    sagecell.init(makecells);
})</script>

}}}
Line 26: Line 10:
{{{#!html
<div id="interact1"><script type="text/code">
{{{#!sagecell
Line 66: Line 49:
</script></div>
Line 77: Line 59:
{{{ {{{#!sagecell
Line 119: Line 101:
{{{ {{{#!sagecell
Line 135: Line 117:
{{{ {{{#!sagecell
Line 155: Line 137:
{{{ {{{#!sagecell
Line 183: Line 165:
{{{ {{{#!sagecell
Line 256: Line 238:
{{{ {{{#!sagecell
Line 269: Line 251:
{{{ {{{#!sagecell
Line 367: Line 349:
{{{ {{{#!sagecell
Line 473: Line 455:
{{{ {{{#!sagecell
Line 515: Line 497:
{{{ {{{#!sagecell
Line 538: Line 520:
{{{ {{{#!sagecell
Line 565: Line 547:
{{{ {{{#!sagecell
Line 591: Line 573:
{{{ {{{#!sagecell
Line 606: Line 588:
{{{ {{{#!sagecell
Line 652: Line 634:
{{{
from scipy.special.orthogonal import p_roots
{{{#!sagecell
import scipy
import numpy

from scipy.special.orthogonal import p_roots, t_roots, u_roots
Line 662: Line 646:
            'Chebyshev': {'w': 1/sqrt(1-x**2), 'xmin': -1, 'xmax': 1, 'func': t_roots},
                'Chebyshev2': {'w': sqrt(1-x**2), 'xmin': -1, 'xmax': 1, 'func': u_roots},
                'Trapezoid': {'w': 1, 'xmin': -1, 'xmax': 1, 'func': lambda n: (linspace(-1r,1,n), numpy.array([1.0r]+[2.0r]*(n-2)+[1.0r])*1.0r/n)},
                'Simpson': {'w': 1, 'xmin': -1, 'xmax': 1, 'func': lambda n: (linspace(-1r,1,n), numpy.array([1.0r]+[4.0r,2.0r]*int((n-3.0r)/2.0r)+[4.0r,1.0r])*2.0r/(3.0r*n))}}
     'Chebyshev': {'w': 1/sqrt(1-x**2), 'xmin': -1, 'xmax': 1, 'func': t_roots},
     'Chebyshev2': {'w': sqrt(1-x**2), 'xmin': -1, 'xmax': 1, 'func': u_roots},
     'Trapezoid': {'w': 1, 'xmin': -1, 'xmax': 1,          'func': lambda n: (linspace(-1r,1,n), numpy.array([1.0r]+[2.0r]*(n-2)+[1.0r])*1.0r/n)},
     'Simpson': {'w': 1, 'xmin': -1, 'xmax': 1,          'func': lambda n: (linspace(-1r,1,n),
            
numpy.array([1.0r]+[4.0r,2.0r]*int((n-3.0r)/2.0r)+[4.0r,1.0r])*2.0r/(3.0r*n))}}
Line 669: Line 656:
    return polygon([(center-width2,0),(center+width2,0),(center+width2,height),(center-width2,height)],**kwds)     return polygon([(center-width2,0),
        
(center+width2,0),(center+width2,height),(center-width2,height)],**kwds)
Line 673: Line 661:
def weights(n=slider(1,30,1,default=10),f=input_box(default=3*x+cos(10*x)),show_method=["Legendre", "Chebyshev", "Chebyshev2", "Trapezoid","Simpson"]): def weights(n=slider(1,30,1,default=10),f=input_box(default=3*x+cos(10*x),type=SR),
    
show_method=["Legendre", "Chebyshev", "Chebyshev2", "Trapezoid","Simpson"]):
Line 682: Line 671:
    scaled_ff = fast_float(scaled_func)     scaled_ff = fast_float(scaled_func, 'x')
Line 690: Line 679:
    stems = sum(line([(x,0),(x,scaled_ff(x))],rgbcolor=(1-y,1-y,1-y),thickness=2,markersize=6,alpha=y) for x,y in coords_scaled)
    points = sum([point([(x,0),(x,scaled_ff(x))],rgbcolor='black',pointsize=30) for x,_ in coords])
    stems = sum(line([(x,0),(x,scaled_ff(x))],rgbcolor=(1-y,1-y,1-y),
        
thickness=2,markersize=6,alpha=y) for x,y in coords_scaled)
    points = sum([point([(x,0),
        
(x,scaled_ff(x))],rgbcolor='black',pointsize=30) for x,_ in coords])
Line 696: Line 687:
    show(graph,xmin=plot_min,xmax=plot_max)     show(graph,xmin=plot_min,xmax=plot_max,aspect_ratio="auto")
Line 704: Line 695:
    html("$$\sum_{i=1}^{i=%s}w_i\left(%s\\right)= %s\\approx %s =\int_{-1}^{1}%s \,dx$$"%(n,latex(f.subs(x="x_i")), approximation, integral, latex(scaled_func)))     html("$$\sum_{i=1}^{i=%s}w_i\left(%s\\right)= %s\\approx %s =\int_{-1}^{1}%s \,dx$$"%(n,
        
latex(f), approximation, integral, latex(scaled_func)))
Line 717: Line 709:
{{{ {{{#!sagecell
Line 829: Line 821:
{{{ {{{#!sagecell
Line 866: Line 858:
velocity = derivative( position(t) )
acceleration = derivative(velocity(t))
velocity = derivative( position(t), t)
acceleration = derivative(velocity(t), t)
Line 869: Line 861:
speed_deriv = derivative(speed) speed_deriv = derivative(speed, t)
Line 871: Line 863:
dT = derivative(tangent(t)) dT = derivative(tangent(t), t)
Line 874: Line 866:
## dB = derivative(binormal(t)) ## dB = derivative(binormal(t), t)
Line 957: Line 949:
{{{ {{{#!sagecell
Line 992: Line 984:
{{{ {{{#!sagecell
Line 1029: Line 1021:
{{{ {{{#!sagecell
Line 1082: Line 1074:
{{{
%hide
%auto
{{{#!sagecell
Line 1143: Line 1133:
{{{ {{{#!sagecell
Line 1181: Line 1171:
{{{ {{{#!sagecell
Line 1221: Line 1211:
{{{ {{{#!sagecell
Line 1328: Line 1318:
{{{ {{{#!sagecell
Line 1385: Line 1375:
{{{ {{{#!sagecell
Line 1406: Line 1396:
{{{ {{{#!sagecell

Sage Interactions - Calculus

goto interact main page

Root Finding Using Bisection

by William Stein

bisect.png

Newton's Method

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

by William Stein

http://sagenb.org/home/pub/2824/

newton.png

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

by William Stein

http://sagenb.org/home/pub/2823/

mountains.png

A simple tangent line grapher

by Marshall Hampton

tangents.png

Numerical integrals with the midpoint rule

by Marshall Hampton

num_int.png

Numerical integrals with various rules

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

num_int2.png

Some polar parametric curves

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

polarcurves1.png

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.

funtool.png

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.

newtraph.png

Coordinate Transformations

by Jason Grout

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

Taylor Series

by Harald Schilly

taylor_series_animated.gif

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.

snapshot_epsilon_delta.png

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

by Wai Yan Pong

sinelimit.png

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.

quadrics.png

The midpoint rule for numerically integrating a function of two variables

by Marshall Hampton

numint2d.png

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

By Rob Beezer

A fast_float() version is available in a worksheet

motion2d.png

Vector Calculus, 3-D Motion

by Rob Beezer

Available as a worksheet

motion3d.png

Multivariate Limits by Definition

by John Travis

http://www.sagenb.org/home/pub/2828/

3D_Limit_Defn.png

3D_Limit_Defn_Contours.png

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

3Dgraph_with_points.png

Approximating function in two variables by differential

by Robert Marik

3D_differential.png

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).

taylor-3d.png

Volumes over non-rectangular domains

by John Travis

http://www.sagenb.org/home/pub/2829/

3D_Irregular_Volume.png

Lateral Surface Area

by John Travis

http://www.sagenb.org/home/pub/2826/

Lateral_Surface.png

Parametric surface example

by Marshall Hampton

parametric_surface.png

Line Integrals in 3D Vector Field

by John Travis

http://www.sagenb.org/home/pub/2827/

3D_Line_Integral.png

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