Solving Complex Line Integrals

조회 수: 12 (최근 30일)
Josée Mallah
Josée Mallah 2021년 3월 21일
댓글: Bjorn Gustavsson 2021년 3월 22일
Hello everyone!
How to define a circle (e.g. | z-1 |=3) as an integral path using Waypoints?
For example, C here is a square contour:
C = [1+i -1+i -1-i 1-i];
q2 = integral(fun,1,1,'Waypoints',C)
How to define C as a circle?
Or else, how could I define the same circle ( | z-1 |=3) instead of the unit circle in the code below?
g = @(theta) cos(theta) + 1i*sin(theta);
gprime = @(theta) -sin(theta) + 1i*cos(theta);
q1 = integral(@(t) fun(g(t)).*gprime(t),0,2*pi)
Thank you
  댓글 수: 1
darova
darova 2021년 3월 21일
THe question is unclear. Do you have any picture or something? What are you trying to integrate?

댓글을 달려면 로그인하십시오.

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2021년 3월 22일
Wouldn't it be simplest to just multiply the radius of the polar representation of your unit-circle with the desired radius?
g = @(theta) 3*cos(theta) + 1i*3*sin(theta);
gprime = @(theta) -3*sin(theta) + 1i*3*cos(theta);
q1 = integral(@(t) fun(g(t)).*gprime(t),0,2*pi);
If you have some more complex curve sometimes those too can be more straightforwardly represented in polar coordinates. Then
You might also be lucky enough to have an analytical function - which makes integration around a closed loop in the complex plane that much easier.
HTH
  댓글 수: 2
Josée Mallah
Josée Mallah 2021년 3월 22일
I guess this is satisfactory enough! Ok I got how it works, thank you so much.
Bjorn Gustavsson
Bjorn Gustavsson 2021년 3월 22일
Great.
It's just to remember that any single-variable parameterization of your perimeter is good enough as long as you have some way to calculate dl too.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by