フィルターのクリア

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

2 ビュー (過去 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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by