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

조회 수: 1 (최근 30일)
Thien Son Phan
Thien Son Phan 2018년 4월 3일
댓글: CARLOS RIASCOS 2018년 4월 3일
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
Thien Son Phan
Thien Son Phan 2018년 4월 3일
Does MatLab actually produce 0 as an answer?
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