Documente Academic
Documente Profesional
Documente Cultură
html
lineintvec.mws
> restart;
> libname:=libname,"C:/mylib/vec_calc7":
> with(linalg):with(student):with(plots):
Warning, the protected names norm and trace have been redefined and
unprotected
where is a constant. A particle of charge moves through this field along the line segment from
to . We want to find the work done by this electric field on the charged
particle.
> E:=MF([x,y,z],[2*k*lambda*x/sqrt(x^2+y^2),2*k*lambda*y/sqrt(x^2+y^2),0]);
> v:=D(r);
> Er:=E(op(r(t)));
Another way to compute this line integral is to use the Line_int_vector command (or its alias Liv ) from
the vec_calc package which works directly with the parametrized curve and the vector field:
There is a second way to compute this work. The electric field is conservative because it is curl-free:
> CURL(E);
> POT(E,'phi');
> phi(x,y,z);
By the Fundamental Theorem of Calculus, the work is the change in the potential energy:
> Work:=q*phi(3,2,1)-q*phi(1,2,3);
>
> r:=MF(t,[2*cos(t),2*sin(t),3]);
> v:=D(r);
Caution: Don't confuse the velocity (tangent vector) of the curve with the velocity of the fluid
Another way to compute this line integral is to use the Line_int_vector command (or its alias Liv ) from
the vec_calc package which works directly with the parametrized curve and the vector field:
>
>