complex contour integral ...plz help me

2 次查看(过去 30 天)
I write the limits of integration from 0 to 2*pi when he give me a Full Circle ,, but what I write
instead of 2*pi when he give me half circle as show in figure? :
this statement of matlab when he give me a contour for full circle :
q1=quad(@(t) fun(g(t)).*gprime(t),0,2*pi)
I want instead it by contour for half circle ,, what I write instead( 0,2*pi)?
this problem that I want answer it:
find the integral around half contour
∫(x^3+3)/((x^2+1)(x^2+4))

回答(1 个)

Torsten
Torsten 2015-3-16
fun=@(z)(x.^3+3)./((x.^2+1).*(x.^2+4));
g1=@(theta)R*cos(theta)+1i*R*sin(theta);
g1prime=@(theta)-R*sin(theta)+1i*R*cos(theta);
g2=@(t)-R+t*2*R;
g2prime=2*R;
q=quad(@(t)fun(g1(t)).*gprime(t),0,pi)+quad(@(t)fun(g2(t))*g2prime,0,1);
Best wishes
Torsten.
  1 个评论
Siwei Wang
Siwei Wang 2021-4-24
I correct a few typos in Torsten's answer:
R=10;
fun=@(x)(x.^3+3)./((x.^2+1).*(x.^2+4));
g1=@(theta)R*cos(theta)+1i*R*sin(theta);
g1prime=@(theta)-R*sin(theta)+1i*R*cos(theta);
g2=@(t)-R+t*2*R;
g2prime=2*R;
q=quad(@(t)fun(g1(t)).*g1prime(t),0,pi)+quad(@(t)fun(g2(t))*g2prime,0,1)
The result is q=1.57079596718350 + 3.14159265928277i

请先登录,再进行评论。

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by