Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Thien Son Phan
Thien Son Phan el 3 de Abr. de 2018
Comentada: CARLOS RIASCOS el 3 de Abr. de 2018
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

Respuestas (1)

CARLOS RIASCOS
CARLOS RIASCOS el 3 de Abr. de 2018
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 comentarios
Thien Son Phan
Thien Son Phan el 3 de Abr. de 2018
Does MatLab actually produce 0 as an answer?
CARLOS RIASCOS
CARLOS RIASCOS el 3 de Abr. de 2018
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by