Line integral and curvilinear integral
|
05-15-2015, 08:17 PM
(This post was last modified: 01-17-2021 05:14 PM by salvomic.)
Post: #1
|
|||
|
|||
Line integral and curvilinear integral
hi all,
here there are two programs (CAS) to calculate Line integral (for vectorial functions fields) and Curvilinear Integral (for scalar functions). intcur: INPUT a scalar function (x,y,z), a parametric form of a curve [r(t), r(t), r(t)], lower and high bound and the programs returns curvilinear integral intlin: INPUT a vectorial function, a parametric form of a curve (as above), lower and high bound and the program returns linear integral. These programs work with 2 or 3 components (parametric expression: [r1(t), r2(t), r3(t)] or [r1(t), r2(t)])... Examples: 1.0 to find the curvilinear integral of z in a circle (parametric: x=COS(t), y=SIN(t), z=t) from 0 to 2π intcur(z, [COS(t), SIN(t), t], 0, 2*π) -> 2*√2*π^2 2. to find the line integral of F=‹x*SIN(y), y› along the path ‹t, t^2› from -1 to 2 intlin([x*SIN(y), y], [t, t^2], -1,2) -> (15/2)+(COS(1)-COS(4))/2 Enjoy! Salvo Micciché Code:
... Code:
EDIT: put above a slightly new code, in which t is a local variable that's now purged first to being used in the integral calculus, to avoid to leave a global variable in CAS Vars. ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)