Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168768
Image: ubuntu2004

Arclength

Let's start by examining arclength.  To find arc length, you just add up a bunch of small parts of speed, ds=rdtds=|r'| dt.

var('t') r=vector([cos(t), sin(t)])
dr=diff(r, t) dr
(-sin(t), cos(t))
speed=norm(dr) speed
sqrt(abs(-sin(t))^2 + abs(cos(t))^2)
ds=speed ds
sqrt(abs(-sin(t))^2 + abs(cos(t))^2)
ds.simplify_full().simplify_trig()
1
integrate(ds.simplify_full().simplify_trig(), t, 0, 2*pi)
2*pi
numerical_integral(ds, 0, 2*pi)
(6.2831853071795862, 6.9757369960172638e-14)
parametric_plot(list(r), (t, 0, 2*pi))

The same procedure works in 3d (wow, you gotta love these vectors; we can do computations in whatever dimension we need!)

var('t') r=vector([cos(t), sin(t)]) dr=diff(r, t) speed=norm(dr) ds=speed integrate(ds, t, 0, 2*pi)
pi