How do I compute a line integral of a function over a helix?

2 次查看(过去 30 天)
So I need to find line the integral of
F=<(e^z)*(y^2), 2(e^z)xy, (e^z)x(y^2)> over a helix parametized as
x=2cost
y=2sint
z=t/5
for 0<= t <= 5pi.
I've no clue how to do this. I don't think I quite conceptually understand the requirement either.
Here's an attempt, however:
t=0:0.1:5*pi;
x=2.*cos(t);
y=2.*sin(t);
z=t./5;
myfunction =@(x,y,z) [(exp(z))*(y.^2); 2.*(exp(z)).*x.*y; (exp(z)).*x.*(y.^2)];
integral3(myfunction,-2,2,-2,2,0,pi);
Unfortunately, it did not work

回答(1 个)

CARLOS RIASCOS
CARLOS RIASCOS 2018-4-3
Hello brother, here is a code I did with symbolic mathematics using the mathematical definition of line integral with a vector field F. Postscript: The integral gives 0 LOL.
syms t
%Parametrization of the Curve:
x=2*cos(t); y=2*sin(t); z=t/5;
%Vector field:
F = [exp(z)*(y^2), 2*exp(z)*x*y, exp(z)*x*(y^2)];
%Dot product F*dr:
D = F*[diff(x,t); diff(y,t); diff(z,t)];
%Integral of line respect of t (dt):
I = int(D,t,0,5*pi);
i=double(I);
%disp:
disp('Value:')
disp(i)
  2 个评论
CARLOS RIASCOS
CARLOS RIASCOS 2018-4-3
Yes, It must be because the vector field F, is conservative, therefore its line integral on a closed curve in this case an ellipse is zero. But the code is fine, I tested it with exercises and the results of the code matched the results of the exercises. I hope my code will help you.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by